/* ===================================
   PHISHFINDER - OPTIMIZED STYLES
   =================================== */

/* === COLOR VARIABLES === */
:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #475569;
    --secondary-light: #64748b;
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

[data-theme="dark"] {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #334155;
    --secondary-light: #475569;
    --accent: #0ea5e9;
    --accent-hover: #38bdf8;
    
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --border-hover: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* === RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
p { color: var(--text-secondary); }

.main-content {
    padding: 2rem 1rem;
    max-width: 1280px;
    margin: 80px auto 0;
    min-height: calc(100vh - 200px);
}

/* === NAVIGATION === */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.nav-brand a:hover { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.logout-btn {
    background: var(--danger);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.logout-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 5rem 0 2rem;
}

.mobile-sidebar.active { right: 0; }

.mobile-sidebar .nav-link,
.mobile-sidebar .user-menu,
.mobile-sidebar .auth-buttons {
    display: flex;
    flex-direction: column;
    padding: 1rem 2rem;
    width: 100%;
}

.mobile-sidebar .nav-link {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
}

.mobile-sidebar .nav-link::after { display: none; }

.mobile-sidebar .user-name {
    padding: 1rem 2rem;
    border-top: 2px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.mobile-sidebar .logout-btn,
.mobile-sidebar .btn {
    margin: 0 2rem;
    text-align: center;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* === BUTTONS === */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover { background: var(--secondary-light); }

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover { opacity: 0.9; }

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

/* === SCANNER (HOME) === */
.scanner-container { text-align: center; padding: 2rem 0; }

.scanner-header { margin-bottom: 3rem; }

.scanner-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.scanner-header h1 {
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle { color: var(--text-secondary); font-size: 1.1rem; }

.scanner-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    max-width: 800px;
    margin: 0 auto 3rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
}

.scanner-card h2 { margin-bottom: 0.5rem; }
.scanner-description { color: var(--text-muted); margin-bottom: 2rem; }

.scanner-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.url-input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.url-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.scan-btn { padding: 1rem 2rem; min-width: 140px; }

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Result Display */
.result-container {
    margin-top: 2rem;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    border-radius: var(--radius);
    padding: 2rem;
    text-align: left;
}

.result-card.legitimate {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success);
}

.result-card.phishing {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-icon { font-size: 2.5rem; }
.result-title h3 { margin-bottom: 0.25rem; }
.result-title h3.legitimate { color: var(--success); }
.result-title h3.phishing { color: var(--danger); }
.result-title p { margin: 0; color: var(--text-secondary); }

.result-details { display: grid; gap: 1rem; }

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--text-primary);
    font-size: 1rem;
}

.url-truncate {
    display: block;           /* ensures width rules apply consistently */
    max-width: 100%;          /* never exceed the parent container */
    overflow: hidden;         /* keep any overflow controlled */
    text-overflow: ellipsis;  /* still use ellipsis where applicable */
    white-space: normal;      /* allow wrapping on small screens */
    overflow-wrap: anywhere;  /* break long tokens (no spaces) when necessary */
    word-break: break-word;   /* fallback for older browsers */
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: 0.75rem; }
.feature-card p { font-size: 0.95rem; }

/* Stats Section */
.stats-section { margin-top: 4rem; text-align: center; }
.stats-section h2 { margin-bottom: 2rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* === DASHBOARD, SETTINGS, CONTRIBUTE === */
.dashboard-container,
.settings-container,
.contribute-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header,
.settings-header,
.contribute-header { margin-bottom: 2rem; }

.dashboard-header h1,
.settings-header h1,
.contribute-header h1 { margin-bottom: 0.5rem; }

.dashboard-header p,
.settings-header p,
.contribute-header p { color: var(--text-muted); }

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon { font-size: 2.5rem; }
.stat-info { flex: 1; }
.stat-number { font-size: 2rem; font-weight: 700; }
.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* History Table */
.history-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.history-section h2 { margin-bottom: 1.5rem; }

.history-table-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 1rem 1.25rem;
    text-align: left;
}

.history-table th {
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.history-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.history-table tbody tr:hover { background: var(--bg-primary); }
.history-table tbody tr:last-child { border-bottom: none; }

.url-cell { max-width: 300px; }

/* Status Badges & Threat Levels */
.status-badge,
.threat-level {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-legitimate,
.threat-low {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-phishing,
.threat-critical {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.threat-high {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.threat-medium {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* === CONTRIBUTE PAGE === */
.contribute-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.report-section,
.community-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.report-section h2,
.community-section h2 { margin-bottom: 1.5rem; }

.report-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.login-prompt {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.login-prompt a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover { text-decoration: underline; }

/* Report Cards */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.reports-list::-webkit-scrollbar { width: 6px; }
.reports-list::-webkit-scrollbar-track { background: var(--bg-primary); border-radius: 10px; }
.reports-list::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 10px; }

.report-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.report-card:hover {
    border-color: var(--accent);
    transform: translateX(3px);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.report-url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent);
    word-break: break-all;
}

.report-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.report-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.report-votes { display: flex; gap: 0.5rem; }

.vote-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.vote-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* === SETTINGS PAGE === */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.settings-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.settings-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.profile-info,
.api-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-hover);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-weight: 600;
    color: var(--text-secondary);
}

.api-key-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.api-key-code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    word-break: break-all;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--accent);
}

.api-actions {
    margin-top: 1rem;
}

.api-docs {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.account-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: var(--text-muted);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}


/* === ALERTS === */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-info {
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent);
    border: 1px solid var(--accent);
}

/* === FOOTER === */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* === ERROR PAGES === */
.error-container,
.login-required-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 2rem;
}

.error-container h1 {
    font-size: 8rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.login-required-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
}

.login-icon { font-size: 4rem; margin-bottom: 1rem; }
.login-required-card h1 { margin-bottom: 0.5rem; }
.login-required-card p { color: var(--text-muted); margin-bottom: 2rem; }

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.close-sidebar {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-primary);
    cursor: pointer;
}
.close-sidebar:hover {
    color: var(--accent);
}

/* === RESPONSIVE === */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .main-content {
        padding: 1.5rem 1rem;
        margin-top: 70px;
    }
    
    .contribute-grid { grid-template-columns: 1fr; }
    .scanner-card { padding: 2rem 1.5rem; }
    .features-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
}

/* Mobile & Tablet - Show Hamburger */
@media (max-width: 1023px) {
    .hamburger { display: flex; }
    
    .nav-links {
        display: none;
    }
    
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* Mobile (375px - 767px) */
@media (max-width: 767px) {
    .navbar { padding: 0.75rem 1rem; }
    
    .nav-brand a { font-size: 1.25rem; }
    
    .main-content {
        padding: 1rem 0.75rem;
        margin-top: 70px;
    }
    
    .scanner-icon { font-size: 3rem; }
    .scanner-card { padding: 1.5rem 1rem; }
    .scanner-input-group { flex-direction: column; }
    .scan-btn { width: 100%; }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card { padding: 1.5rem; }
    .stats-cards { grid-template-columns: 1fr; }
    .stat-card { padding: 1.5rem; }
    
    .history-table {
        font-size: 0.85rem;
    }
    
    .history-table th,
    .history-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .report-section,
    .community-section { padding: 1.5rem; }
    
    .settings-section { padding: 1.5rem; }
    
    .info-item {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    
    .account-actions { flex-direction: column; }
    .account-actions .btn { width: 100%; }
    
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .result-card { padding: 1.5rem; }
    .result-icon { font-size: 2rem; }
    .error-container h1 { font-size: 5rem; }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.1rem; }
}

/* Small Mobile (375px - 424px) */
@media (max-width: 424px) {
    .scanner-card { padding: 1.25rem 0.75rem; }
    .url-input {
        font-size: 0.9rem;
        padding: 0.85rem 1rem;
    }
    
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .stat-number { font-size: 1.75rem; }
    .report-card { padding: 1.25rem; }
    
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .report-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* === UTILITIES === */
.hidden { display: none; }
.visible { display: block; }

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in { animation: fadeIn 0.3s ease; }

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .theme-toggle,
    .hamburger,
    .mobile-sidebar,
    .btn { display: none; }
    
    .main-content { margin-top: 0; }
    body { background: white; color: black; }
}