/* Modern Minimalist Theme - SEO Optimized */
/* Zero external fonts - System fonts only for maximum performance */
/* Clean, fast, accessible design focused on Core Web Vitals */

/* ==================== CSS Variables ==================== */
:root {
    /* Cyan/Teal Accent Colors */
    --accent-50: #ecfeff;
    --accent-100: #cffafe;
    --accent-200: #a5f3fc;
    --accent-300: #67e8f9;
    --accent-400: #22d3ee;
    --accent-500: #06b6d4;
    --accent-600: #0891b2;
    --accent-700: #0e7490;
    --accent-800: #155e75;
    --accent-900: #164e63;

    /* Neutral Dark Backgrounds */
    --bg-base: #0f0f0f;
    --bg-elevated: #1a1a1a;
    --bg-card: #1f1f1f;
    --bg-hover: #252525;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(6, 182, 212, 0.5);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 8px 24px rgba(6, 182, 212, 0.25);

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
}

/* ==================== Base Reset & Typography ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    /* System font stack - zero loading time, optimal for SEO */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ==================== Header ==================== */
header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.mod-hdr-wrap {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-lg) var(--space-xl);
}

/* Logo/Brand */
.mod-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.mod-brand a {
    text-decoration: none;
    color: var(--accent-500);
    transition: color 0.2s ease;
}

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

.mod-brand img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 100%;
}

/* Navigation */
.mod-nav-menu {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
    flex: 1;
}

.mod-nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.mod-nav-menu a:hover {
    color: var(--text-primary);
}

/* Search Box */
.mod-srch-box {
    max-width: 420px;
    width: 100%;
    position: relative;
}

.mod-srch-box form {
    position: relative;
    display: flex;
}

.mod-srch-box input[type="search"] {
    width: 100%;
    padding: 0.75rem 3.5rem 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s ease;
}

.mod-srch-box input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.mod-srch-box input[type="search"]::placeholder {
    color: var(--text-muted);
}

.mod-srch-box input[type="search"]:focus {
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px var(--border-focus);
}

.mod-srch-box button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-500);
    border: none;
    border-radius: var(--radius-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mod-srch-box button:hover {
    background: var(--accent-600);
}

.mod-srch-box button:active {
    transform: translateY(-50%) scale(0.95);
}

.mod-srch-box button svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Mobile Menu Toggle */
.mod-menu-toggle {
    display: none;
    background: var(--accent-500);
    border: none;
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mod-menu-toggle:hover {
    background: var(--accent-600);
}

.mod-menu-toggle svg {
    width: 20px;
    height: 20px;
}

/* Mobile Search Toggle */
.mod-srch-toggle {
    display: none;
    background: var(--accent-500);
    border: none;
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mod-srch-toggle:hover {
    background: var(--accent-600);
}

.mod-srch-toggle svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.mod-srch-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-xl);
    animation: fadeIn 0.2s ease;
}

.mod-srch-overlay.active {
    display: flex;
}

.mod-srch-overlay-content {
    width: 100%;
    max-width: 500px;
    margin-top: 20vh;
    position: relative;
}

.mod-srch-overlay form {
    width: 100%;
}

.mod-srch-overlay input[type="search"] {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.25rem;
    background: var(--bg-card);
    border: 2px solid var(--accent-500);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1.125rem;
    outline: none;
    box-shadow: 0 0 0 4px var(--border-focus);
}

.mod-srch-overlay input[type="search"]::placeholder {
    color: var(--text-muted);
}

.mod-srch-overlay button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-500);
    border: none;
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mod-srch-overlay button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.mod-srch-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Menu Overlay */
.mod-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

.mod-menu-overlay.active {
    display: block;
}

.mod-menu-content {
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--bg-elevated);
    animation: slideInLeft 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.mod-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-default);
}

.mod-menu-close {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mod-menu-close:hover {
    color: var(--accent-500);
}

.mod-menu-nav {
    display: flex;
    flex-direction: column;
    padding: var(--space-lg) 0;
    overflow-y: auto;
}

.mod-menu-nav a {
    padding: var(--space-md) var(--space-xl);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mod-menu-nav a:hover {
    background: var(--bg-hover);
    border-left-color: var(--accent-500);
    color: var(--accent-500);
}

/* ==================== Main Content ==================== */
.mod-main-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    min-height: calc(100vh - 200px);
}

/* Typography */
h1 {
    font-size: 2rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: var(--space-2xl) 0 var(--space-lg) !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin: var(--space-xl) 0 var(--space-md);
    color: var(--text-primary);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: var(--space-lg) 0 var(--space-md);
    color: var(--text-primary);
}

/* Page intro text */
.mod-page-intro {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 var(--space-2xl) 0;
    padding: 0;
    background: transparent;
    border: none;
    max-width: 75ch;
}

/* Breadcrumbs */
.mod-breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.mod-breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.mod-breadcrumbs a:hover {
    color: var(--accent-500);
}

.mod-breadcrumbs-sep {
    color: var(--text-muted);
    opacity: 0.5;
    user-select: none;
}

.mod-breadcrumbs-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Hide article class */
.article {
    display: none;
}

/* ==================== Video Grid (Index/Category Pages) ==================== */
.mod-vid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    list-style: none;
}

.mod-vid-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.mod-vid-card:hover {
    border-color: var(--border-default);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.mod-vid-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.mod-vid-card figure.img {
    margin: 0;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-elevated);
}

.mod-vid-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mod-vid-card:hover img {
    transform: scale(1.05);
}

/* Video duration badge */
.mod-vid-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.mod-vid-card h2 {
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin: var(--space-md) !important;
    padding: 0 !important;
    color: var(--text-primary) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mod-vid-card:hover h2 {
    color: var(--accent-500) !important;
}

/* Video metadata */
.mod-vid-meta {
    padding: 0 var(--space-md) var(--space-md);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.mod-vid-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==================== Video Player Page ==================== */
.mod-player-box {
    margin-bottom: var(--space-xl);
}

.mod-player-box video {
    width: 100%;
    max-width: 1100px;
    display: block;
    margin: 0 auto;
    background: #000;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow-lg);
}

.mod-vid-info {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.mod-vid-info p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* ==================== Thumbnail Cards (Search/Category) ==================== */
.thumbs-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.mod-thb-card {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.mod-thb-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.mod-thb-card img {
    width: 280px;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.mod-thb-card:hover img {
    transform: scale(1.05);
}

.mod-thb-card .mod-art-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mod-thb-card a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    transition: color 0.2s ease;
}

.mod-thb-card a:hover {
    color: var(--accent-500);
}

.mod-thb-card .mod-art-body p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-top: var(--space-xs);
}

.mod-thb-card .mod-art-meta {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: var(--space-sm);
}

/* ==================== Pagination ==================== */
.mod-pg-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-2xl) 0;
    flex-wrap: wrap;
}

.mod-pg-nav-btn,
.mod-pg-btn {
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    transition: all 0.2s ease;
}

.mod-pg-nav-btn:hover:not(.disabled),
.mod-pg-btn:hover:not(.disabled) {
    background: var(--bg-hover);
    border-color: var(--accent-500);
    color: var(--text-primary);
}

.mod-pg-nav-btn.active {
    background: var(--accent-500);
    border-color: var(--accent-500);
    color: white;
    font-weight: 600;
}

.mod-pg-nav-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mod-pg-nav-prev::before {
    content: '← ';
}

.mod-pg-nav-next::after {
    content: ' →';
}

/* ==================== Footer ==================== */
footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-default);
    padding: var(--space-2xl) var(--space-xl);
    margin-top: var(--space-2xl);
    text-align: center;
}

footer nav {
    margin-bottom: var(--space-lg);
}

footer nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 var(--space-md);
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

footer nav a:hover {
    color: var(--accent-500);
}

footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: var(--space-lg);
}

footer p a {
    color: var(--accent-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer p a:hover {
    color: var(--accent-400);
}

/* Footer tag lists */
.mod-tag-list,
.mod-cat-list,
.mod-star-list {
    margin: var(--space-xl) 0;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.mod-tag-list h3,
.mod-cat-list h3,
.mod-star-list h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-lg);
    text-align: center;
}

.mod-tag-list ul,
.mod-cat-list ul,
.mod-star-list ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-sm);
}

.mod-tag-list a,
.mod-cat-list a,
.mod-star-list a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.2s ease;
}

.mod-tag-list a:hover,
.mod-cat-list a:hover,
.mod-star-list a:hover {
    background: var(--bg-hover);
    border-color: var(--accent-500);
    color: var(--text-primary);
}

/* Hidden list items */
.mod-tag-list li.hidden,
.mod-cat-list li.hidden,
.mod-star-list li.hidden {
    display: none;
}

/* Expand button */
.mod-expand-btn {
    display: block;
    margin: var(--space-lg) auto 0;
    padding: var(--space-sm) var(--space-xl);
    background: var(--accent-500);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mod-expand-btn:hover {
    background: var(--accent-600);
}

.mod-expand-btn:active {
    transform: scale(0.98);
}

/* Footer buttons */
.mod-ftr-btns {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    flex-wrap: wrap;
}

.mod-ftr-btns a {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    background: var(--accent-500);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s ease;
}

.mod-ftr-btns a:hover {
    background: var(--accent-600);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .mod-hdr-wrap {
        gap: var(--space-lg);
    }

    .mod-main-wrap {
        padding: var(--space-lg);
    }
}

@media (max-width: 768px) {
    header {
        padding: 0;
    }

    .mod-hdr-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-md) var(--space-xl);
        position: relative;
    }

    /* Hamburger menu button - left */
    .mod-menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    /* Logo centered - absolute positioning for perfect centering */
    .mod-brand {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }

    .mod-brand a {
        display: block;
        line-height: 0;
    }

    .mod-brand img {
        display: block;
        height: 42px;
        width: auto;
    }

    /* Desktop navigation hidden */
    .mod-nav-menu {
        display: none;
    }

    /* Hide desktop search, show mobile toggle - right */
    .mod-srch-box {
        display: none;
    }

    .mod-srch-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .mod-main-wrap {
        padding: var(--space-lg);
    }

    .mod-vid-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--space-md);
    }

    .mod-thb-card {
        flex-direction: column;
    }

    .mod-thb-card img {
        width: 100%;
        height: 200px;
    }

    h1 {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .mod-hdr-wrap {
        padding: var(--space-md);
        grid-template-columns: 40px 1fr 40px;
        gap: var(--space-xs);
    }

    .mod-main-wrap {
        padding: var(--space-md);
    }

    .mod-vid-grid {
        grid-template-columns: 1fr;
    }

    .mod-tag-list,
    .mod-cat-list,
    .mod-star-list {
        padding: 0;
        background: transparent;
        border: none;
        text-align: center;
    }

    .mod-tag-list h3,
    .mod-cat-list h3,
    .mod-star-list h3 {
        margin-bottom: var(--space-md);
        font-size: 1rem;
        text-align: center;
    }

    .mod-tag-list ul,
    .mod-cat-list ul,
    .mod-star-list ul {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-xs);
        justify-content: center;
    }

    .mod-tag-list a,
    .mod-cat-list a,
    .mod-star-list a {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.8125rem;
        background: var(--bg-card);
        border: 1px solid var(--border-default);
        border-radius: var(--radius-sm);
        display: inline-block;
    }

    footer nav a {
        display: inline-block;
        margin: var(--space-xs) var(--space-sm);
    }
}

/* ==================== Custom Scrollbar ==================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-600);
    border-radius: 5px;
}

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

/* ==================== Focus Visible (Accessibility) ==================== */
:focus-visible {
    outline: 2px solid var(--accent-500);
    outline-offset: 2px;
}

/* ==================== Performance Optimizations ==================== */
img {
    /* Improve image rendering performance */
    image-rendering: -webkit-optimize-contrast;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
