
:root {
    --primary: #3a8eed;
    --secondary: #ec4899;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --border-radius: 12px;
    --card-bg: #1e293b;
    --header-bg: #1a1f35;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 32px rgba(124, 58, 237, 0.2);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

:root[data-theme="light"] {
    --primary: #3a8eed;
    --secondary: #ec4899;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --card-bg: #ffffff;
    --header-bg: #f8fafc;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 32px rgba(63, 51, 83, 0.15);
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Trebuchet MS', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER/NAVIGATION
   ======================================== */

header {
    padding: 50px 20px;
    margin: 32px auto;
    max-width: 900px;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

header::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 0;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.back-button {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateX(-2px);
}

.breadcrumb {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.header-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    margin-top: 12px;
    font-weight: 300;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

/* ========================================
   CARDS & GRIDS
   ======================================== */

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

.archive-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: cardFadeUp 0.5s ease forwards;
    opacity: 0;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

@keyframes cardFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.archive-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.card-header {
    height: 160px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    position: relative;
    overflow: hidden;
    justify-content: center;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

.card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: shimmer 4s ease-in-out infinite;
    z-index: 1;
}

.card-image-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    opacity: 0.7;
    z-index: 1;
    line-height: 1;
}

.archive-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding: 16px 16px 0 16px;
}

.archive-meta {
    display: flex;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0 16px;
    margin-bottom: 12px;
}

.content-link {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
    padding: 0 16px 16px 16px;
    flex: 1;
}

/* ========================================
   BADGES & PILLS
   ======================================== */

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-available {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.new-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.popular-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.revamped-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.beta-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.archive-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: var(--header-bg);
    color: var(--text-primary);
    padding: 60px 0;
    margin-top: 100px;
    border-top: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(4px);
    display: inline-block;
}

.footer-divider {
    height: 1px;
    background: var(--border-color);
    margin: 32px 0;
}

footer a {
    color: var(--primary);
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--secondary);
}

.copyright {
    margin: 0;
    opacity: 0.8;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .archive-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 48px 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .archive-grid {
        gap: 16px;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .card-header {
        height: 140px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    header {
        padding: 40px 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }

    .header-top {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
