/* ===================================
   TBCPL - Minimalistic AMOLED Theme
   True Black Theme
   =================================== */

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

:root {
    /* True AMOLED Colors */
    --background: #000000;
    --surface: #0a0a0a;
    --surface-elevated: #151515;
    --border: #1a1a1a;
    --border-hover: #2a2a2a;

    /* Christmas Accents - Subtle */
    --accent-red: #dc2626;
    --accent-green: #16a34a;
    --accent-gold: #eab308;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-tertiary: #737373;

    /* Minimal Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.8);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.9);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-top: 56px;
}

/* === LOADING SCREEN === */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.christmas-loader {
    text-align: center;
}

.christmas-logo {
    width: 80px;
    height: 80px;
    opacity: 0.9;
}

.loading-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* === CHRISTMAS BACKGROUND (Minimal) === */
.christmas-bg {
    display: none; /* Hidden for performance */
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* === NAVIGATION BAR === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: border-color 0.2s ease;
}

.navbar.scrolled {
    border-bottom-color: var(--border-hover);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.nav-logo:hover {
    color: var(--accent-red);
}

.nav-logo-img {
    height: 32px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.nav-link.active {
    color: var(--accent-red);
}

.nav-link i {
    font-size: 0.875rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* === HERO SECTION === */
.hero-section {
    text-align: center;
    padding: var(--spacing-2xl) 0 var(--spacing-xl) 0;
}

.festive-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Subtle Christmas accent on first letter */
.festive-title .title-word:first-child {
    color: var(--accent-red);
}

.title-word {
    display: inline-block;
}

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

/* === SEARCH & FILTER === */
.search-container {
    margin: var(--spacing-xl) auto;
    max-width: 640px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
    outline: none;
    font-family: var(--font-sans);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:focus {
    border-color: var(--accent-red);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

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

.filter-btn.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

/* === STATS SECTION === */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: border-color 0.2s ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
}

.stat-card.reveal {
    opacity: 1;
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    opacity: 0.7;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === WARNING CARD === */
.warning-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-red);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.warning-icon {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.warning-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.warning-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.festive-link {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.festive-link:hover {
    color: var(--accent-green);
}

.inline-icon {
    height: 18px;
    vertical-align: middle;
}

/* === COMMUNITY SECTION === */
.community-section-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.community-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

.community-links {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.community-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.community-link:hover {
    border-color: var(--border-hover);
}

.community-icon {
    width: 18px;
    height: 18px;
}

/* === COMMUNITY CARDS === */
.community-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.community-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    transition: border-color 0.2s ease;
}

.community-card:hover {
    border-color: var(--border-hover);
}

.community-card.reveal {
    opacity: 1;
}

.card-icon {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    opacity: 0.7;
}

.community-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.875rem;
    line-height: 1.4;
}

.card-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-red);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.card-button:hover {
    background: #b91c1c;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* === SECTIONS === */
.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    transition: border-color 0.2s ease;
}

.section:hover {
    border-color: var(--border-hover);
}

.section.reveal {
    opacity: 1;
}

.section-header {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    letter-spacing: -0.01em;
}

/* Christmas accent on section headers */
.section-header::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent-red);
    border-radius: 2px;
}

.section-header::after {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent-red);
    /* background: var(--accent-green); */
    border-radius: 2px;
}

.header-icon {
    font-size: 1.25rem;
    opacity: 0.7;
}

/* === LINKS GRID === */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--spacing-md);
}

.link-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 90px;
}

.link-card:hover {
    border-color: var(--accent-red);
}

.card-logo {
    max-width: 110px;
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.link-card:hover .card-logo {
    transform: scale(1.05);
}




/* === BACK TO TOP === */
.back-to-top-wrapper {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top-wrapper.show {
    opacity: 1;
    visibility: visible;
}

.scroll-progress-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    transform: rotate(-90deg);
    pointer-events: none;
}

.scroll-progress-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 2;
}

.scroll-progress-fill {
    fill: none;
    stroke: var(--accent-red);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 144.51;
    stroke-dashoffset: 144.51;
    transition: stroke-dashoffset 0.1s ease;
}

.back-to-top {
    width: 50px;
    height: 50px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* === FOOTER === */
.footer {
    text-align: center;
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl) var(--spacing-lg);
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--accent-red);
}

.footer-text {
    color: var(--text-secondary);
    margin: var(--spacing-md) 0;
}

.footer-text p {
    margin: var(--spacing-xs) 0;
    font-size: 0.875rem;
}

.disclaimer {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface);
    border-radius: var(--radius-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.copyright {
    margin-top: var(--spacing-md);
    font-size: 0.875rem;
}

.dmca-link {
    color: var(--accent-red);
    text-decoration: none;
    padding: 2px 8px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: var(--radius-sm);
    margin-left: var(--spacing-sm);
    transition: background 0.2s ease;
}

.dmca-link:hover {
    background: rgba(220, 38, 38, 0.2);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
    }

    .nav-container {
        padding: 0 var(--spacing-md);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }

    .nav-menu.active {
        max-height: 300px;
        padding: var(--spacing-md);
        opacity: 1;
    }

    .nav-link {
        padding: 10px;
        width: 100%;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .link-card {
        padding: var(--spacing-md);
        min-height: 75px;
    }

    .card-logo {
        max-width: 85px;
        max-height: 35px;
    }

    .card-hover-text {
        display: none;
    }

    .section {
        padding: var(--spacing-lg);
    }

    .community-section-compact {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .community-links {
        flex-direction: column;
        width: 100%;
    }

    .community-link {
        width: 100%;
        justify-content: center;
    }

    .back-to-top-wrapper {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .stats-section {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* === FOCUS STATES === */
.link-card:focus-visible,
.card-button:focus-visible,
.footer-link:focus-visible,
.filter-btn:focus-visible,
.search-input:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

/* === CONTAINER 404 === */
.container-404 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* === PRINT STYLES === */
@media print {
    .loading-screen,
    .navbar,
    .back-to-top {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        padding-top: 0;
    }
}
