:root {
    --primary: #1e293b;
    --accent: #3b82f6;
    --text: #334155;
    --bg: #f8fafc;
}

body.dark-mode {
    --primary: #e2e8f0;
    --accent: #60a5fa;
    --text: #cbd5e1;
    --bg: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode .container {
    background: #1e293b;
    color: var(--text);
}

h1 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 2.2rem;
}

footer {
    margin-top: 40px;
    text-align: center;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
    margin-right: 10px;
    font-size: 1rem;
}

button:hover {
    background: var(--accent);
}

.theme-toggle {
    background: var(--accent);
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.2);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
}

input, textarea {
    padding: 12px;
    border: 2px solid var(--accent);
    border-radius: 5px;
    font-family: 'Segoe UI', sans-serif;
    background-color: white;
    color: var(--text);
    transition: border-color 0.3s;
}

body.dark-mode input,
body.dark-mode textarea {
    background-color: #2d3748;
    color: var(--text);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 5px var(--accent);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.submit-btn {
    background: var(--accent);
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.submit-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

body.dark-mode .toggle-container {
    background-color: rgba(96, 165, 250, 0.15);
}

.toggle-label {
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.4s;
    border-radius: 30px;
    border: none;
    padding: 0;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.toggle-text {
    font-size: 0.9rem;
    color: var(--text);
    margin: 0;
    min-width: 150px;
}

.email-field {
    transition: all 0.3s ease;
    max-height: 200px;
    overflow: hidden;
}

.email-field.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;    
}
.titulo-field {
    transition: all 0.3s ease;
    max-height: 200px;
    overflow: hidden;
}

.titulo-field.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;    
}
.hidden {
    display: none !important;
}
.messages-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--accent);
}

.messages-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-card {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

body.dark-mode .message-card {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.3);
}

.message-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-author {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.message-date {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.9rem;
}

.message-content {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 10px;
}

.no-messages {
    text-align: center;
    color: var(--text);
    opacity: 0.6;
    padding: 40px;
    font-style: italic;
}