* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-form, .dashboard-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.dashboard-card {
    max-width: none;
    margin-bottom: 20px;
}

.login-form h2, .dashboard-card h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-full {
    width: 100%;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.header {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #333;
    font-size: 28px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.post-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.post-type.text { background: #e3f2fd; color: #1976d2; }
.post-type.photo { background: #f3e5f5; color: #7b1fa2; }
.post-type.video { background: #fff3e0; color: #f57c00; }
.post-type.audio { background: #e8f5e8; color: #388e3c; }

.post-content {
    margin: 15px 0;
}

.post-content p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.post-media {
    margin: 10px 0;
}

.post-media img, .post-media video, .post-media audio {
    max-width: 100%;
    border-radius: 8px;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: block;
    padding: 12px;
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.3s;
    background: #f8f9fa;
}

.file-upload-label:hover {
    border-color: #667eea;
}

.file-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.empty-state {
    text-align: center;
    color: #666;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-actions {
        flex-direction: column;
    }
}


/* Estilos para enquetes */
.poll-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.poll-option input {
    flex: 1;
}

.btn-remove-option {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-option:hover {
    background: #c82333;
}

.poll-settings {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.poll-settings label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.poll-settings input[type="checkbox"] {
    margin-right: 8px;
}

.poll-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.poll-preview ul {
    margin: 10px 0;
    padding-left: 20px;
}

.poll-preview li {
    margin-bottom: 5px;
}

.post-type.poll {
    background: #17a2b8;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s;
    z-index: 1000;
}

.theme-toggle:hover,
.theme-toggle:focus {
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

@media (max-width: 600px) {
    .theme-toggle {
        top: 15px;
        right: 15px;
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

body.dark-theme {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #e5e7eb;
}

body.dark-theme a {
    color: #93c5fd;
}

body.dark-theme .theme-toggle {
    background: rgba(17, 24, 39, 0.9);
    color: #f9fafb;
    border-color: #374151;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

body.dark-theme .theme-toggle:hover,
body.dark-theme .theme-toggle:focus {
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6);
}

body.dark-theme .login-form,
body.dark-theme .dashboard-card,
body.dark-theme .header,
body.dark-theme .post-card {
    background: rgba(17, 24, 39, 0.95);
    color: #e5e7eb;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

body.dark-theme .header h1,
body.dark-theme .login-form h2,
body.dark-theme .dashboard-card h2 {
    color: #f9fafb;
}

body.dark-theme .header span {
    color: #d1d5db;
}

body.dark-theme .dashboard-card p,
body.dark-theme .dashboard-card label,
body.dark-theme .post-card p {
    color: #d1d5db;
}

body.dark-theme .post-card strong {
    color: #f9fafb;
}

body.dark-theme .post-card:hover {
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.7);
}

body.dark-theme .form-group label {
    color: #d1d5db;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea,
body.dark-theme .form-group select {
    background: #111827;
    color: #f9fafb;
    border: 1px solid #374151;
}

body.dark-theme .form-group input:focus,
body.dark-theme .form-group textarea:focus,
body.dark-theme .form-group select:focus {
    border-color: #818cf8;
}

body.dark-theme ::placeholder {
    color: #9ca3af;
}

body.dark-theme .file-upload-label {
    background: rgba(17, 24, 39, 0.7);
    border: 2px dashed #4b5563;
    color: #d1d5db;
}

body.dark-theme .file-upload-label:hover {
    border-color: #818cf8;
}

body.dark-theme .file-preview,
body.dark-theme .poll-settings,
body.dark-theme .poll-preview {
    background: rgba(17, 24, 39, 0.7);
    color: #e5e7eb;
    border: 1px solid #374151;
}

body.dark-theme .btn {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.dark-theme .btn:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

body.dark-theme .alert {
    box-shadow: none;
}

body.dark-theme .alert-success {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.5);
}

body.dark-theme .alert-error {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.5);
}

body.dark-theme .post-type.text {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

body.dark-theme .post-type.photo {
    background: rgba(192, 132, 252, 0.18);
    color: #e9d5ff;
}

body.dark-theme .post-type.video {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

body.dark-theme .post-type.audio {
    background: rgba(34, 197, 94, 0.2);
    color: #bbf7d0;
}

body.dark-theme .post-type.poll {
    background: rgba(23, 162, 184, 0.24);
    color: #67e8f9;
}

body.dark-theme .post-card .media-details {
    color: #cbd5f5;
}

body.dark-theme .empty-state {
    color: #d1d5db;
}
