/* ============================================
   VARIÁVEIS GLOBAIS
   ============================================ */
:root {
    --primary-color: #1a5f7a;
    --primary-dark: #0d3b4f;
    --secondary-color: #2c7da0;
    --accent-color: #61a5c2;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Lato', 'Roboto', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    border-top: 2px solid #4a9eff;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-text h3 {
    margin-bottom: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.cookie-text p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
}

.cookie-text p a {
    color: #4a9eff;
    text-decoration: underline;
    transition: color 0.3s;
}

.cookie-text p a:hover {
    color: #6db3ff;
}

.cookie-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 10px 0;
}

.cookie-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #ddd;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.cookie-options label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cookie-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4a9eff;
    flex-shrink: 0;
}

.cookie-options input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-options input[type="checkbox"]:disabled + span {
    opacity: 0.6;
}

.cookie-options span {
    font-size: 13px;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.cookie-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.cookie-btn.accept {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
}

.cookie-btn.accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(39, 174, 96, 0.4);
}

.cookie-btn.reject {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

.cookie-btn.reject:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
}

.cookie-btn.customize {
    background: transparent;
    color: #ddd;
    border: 1px solid #555;
}

.cookie-btn.customize:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #888;
}

/* ============================================
   HEADER PADRONIZADO WAZZIMAGIYGG
   ============================================ */
.header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo-area-header {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-area-header img {
    height: 36px;
    border-radius: 8px;
}

.logo-area-header h1 {
    font-size: 1.1em;
    font-weight: 600;
}

.logo-area-header small {
    font-size: 0.65em;
    opacity: 0.7;
    display: block;
    font-weight: 300;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1em;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar:hover { transform: scale(1.05); }

.user-name {
    font-weight: 500;
    font-size: 0.85em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.user-email {
    font-size: 0.7em;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75em;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-logout:hover { background: rgba(255,255,255,0.2); }

.btn-login {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75em;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-login:hover { background: rgba(255,255,255,0.25); }

.badge-admin {
    background: #e94560;
    color: white;
    font-size: 0.55em;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-banned {
    background: #dc3545;
    color: white;
    font-size: 0.55em;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ============================================
   NOTIFICATION BELL
   ============================================ */
.notification-bell {
    position: relative;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 30px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.notification-bell:hover {
    background: rgba(255,255,255,0.1);
}

.notification-bell .material-icons {
    font-size: 20px;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e94560;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1a1a2e;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-height: 350px;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: none;
    z-index: 200;
    color: #1a1a2e;
}

.notification-dropdown.show {
    display: block;
}

.notification-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-dropdown-header h3 {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}

.notification-dropdown-header button {
    background: none;
    border: none;
    color: #4a6cf7;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
}

.notification-item {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #eef2ff;
    border-left: 3px solid #4a6cf7;
}

.notification-item .notif-title {
    font-weight: 600;
    font-size: 12px;
    color: #1a1a2e;
}

.notification-item .notif-message {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

.notification-item .notif-time {
    font-size: 10px;
    color: #999;
    margin-top: 3px;
}

.notification-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.notification-empty .material-icons {
    font-size: 36px;
    opacity: 0.4;
}

/* ============================================
   BANNED OVERLAY
   ============================================ */
.banned-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    padding: 20px;
}

.banned-overlay.show { display: flex; }

.banned-box {
    background: #1a1a1a;
    border: 2px solid #e94560;
    border-radius: 16px;
    padding: 50px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    color: white;
}

.banned-box .icon { font-size: 80px; margin-bottom: 20px; }
.banned-box h2 { color: #e94560; margin-bottom: 15px; }
.banned-box p { color: #aaa; margin-bottom: 20px; line-height: 1.6; }
.banned-box .btn-logout-banned {
    background: #e94560;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}
.banned-box .btn-logout-banned:hover { background: #c0392b; }
.banned-box .ban-details {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 13px;
    color: #888;
}

/* ============================================
   SCIENTIFIC BANNER
   ============================================ */
.scientific-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px 24px;
    text-align: center;
}

.scientific-banner h2 {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Roboto Slab', serif;
    margin-bottom: 8px;
}

.scientific-banner p {
    opacity: 0.9;
    font-size: 1rem;
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 60px;
    z-index: 99;
    box-shadow: var(--shadow-sm);
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.stats-label {
    color: var(--text-light);
    font-size: 14px;
}

/* ============================================
   SEARCH SECTION
   ============================================ */
.search-section {
    background: white;
    padding: 30px;
    margin: 30px auto;
    max-width: 1400px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.search-main {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 32px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.advanced-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.filter-select {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px 30px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    font-family: 'Roboto Slab', serif;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.filter-group select, .filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
}

.year-range {
    display: flex;
    gap: 10px;
}

.year-range input {
    width: 50%;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

/* ============================================
   ARTICLES CONTAINER
   ============================================ */
.articles-container {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    color: var(--text-light);
    font-size: 14px;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

/* ============================================
   ARTICLE CARD
   ============================================ */
.article-card {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.article-card:hover {
    background: var(--light-bg);
    transform: translateX(5px);
}

.article-title {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Roboto Slab', serif;
    margin-bottom: 10px;
}

.article-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.article-title a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.article-authors {
    color: #2e7d32;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.article-meta i {
    font-size: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.article-abstract {
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 10px;
}

.status-published {
    background: #4caf50;
    color: white;
}

.status-draft {
    background: #ff9800;
    color: white;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    border-radius: 16px 16px 0 0;
}

.modal-body {
    padding: 25px;
}

.close-modal {
    cursor: pointer;
    font-size: 24px;
    color: var(--text-light);
    background: none;
    border: none;
}

.citation-box {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    margin-top: 15px;
}

/* ============================================
   ADMIN TOOLBAR
   ============================================ */
.admin-toolbar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.admin-toolbar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-add {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-add:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-add i {
    font-size: 18px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%);
    border-top: 1px solid #2a2a2a;
    margin-top: 40px;
    padding: 25px 20px 20px;
    border-radius: 16px 16px 0 0;
    font-family: 'Lato', sans-serif;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 15px;
}

.footer-link {
    color: #aaa !important;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    padding: 4px 0;
    display: inline-block;
}

.footer-link:hover {
    color: #667eea !important;
    transform: translateY(-1px);
}

.footer-link.highlight {
    color: #ffb347 !important;
}

.footer-link.highlight:hover {
    color: #ff9500 !important;
    text-shadow: 0 0 8px rgba(255, 180, 71, 0.3);
}

.footer-divider {
    color: #444;
    font-size: 11px;
    margin: 0 2px;
}

.footer-copyright {
    color: #666;
    font-size: 11px;
    padding-top: 12px;
    border-top: 1px solid #222;
    margin-top: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .header-content, .stats-container, .main-layout, .search-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    .search-main {
        flex-direction: column;
    }
    .search-btn {
        padding: 12px;
        justify-content: center;
    }
    .logo-area-header img {
        height: 30px;
    }
    .logo-area-header h1 {
        font-size: 0.9em;
    }
    .scientific-banner h2 {
        font-size: 1.5rem;
    }
    .stats-number {
        font-size: 20px;
    }
    .stats-item {
        flex-direction: column;
        text-align: center;
    }
    .notification-dropdown {
        width: 300px;
        right: -20px;
    }
    .footer-links {
        gap: 6px 8px;
    }
    .footer-link {
        font-size: 10px;
    }
    .footer-divider {
        font-size: 9px;
    }
    .footer-copyright {
        font-size: 9px;
    }
    .cookie-options {
        flex-direction: column;
        gap: 8px;
    }
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    .cookie-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .cookie-content {
        gap: 12px;
    }
    .cookie-text h3 {
        font-size: 16px;
    }
    .cookie-text p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .user-name, .user-email { display: none; }
    .notification-dropdown {
        width: calc(100vw - 40px);
        right: -10px;
    }
    .article-card {
        padding: 15px;
    }
    .article-title {
        font-size: 16px;
    }
    .main-layout {
        padding: 0 15px 15px;
    }
    .banned-box {
        padding: 30px 20px;
    }
}
