:root {
    --bg: #070909;
    --panel: rgba(18, 24, 25, .86);
    --panel-soft: rgba(255, 255, 255, .075);
    --line: rgba(255, 255, 255, .14);
    --text: #f5fbfa;
    --muted: #a9b8b5;
    --brand: #0df283;
    --brand-2: #79ffff;
    --warn: #ffd166;
    --theme-a: #0df283;
    --theme-b: #79ffff;
    --theme-bg: rgba(8, 34, 28, .72);
    --theme-panel: rgba(13, 242, 131, .12);
}

body[data-theme="1"] {
    --theme-a: #9fb2ff;
    --theme-b: #ffcf70;
    --theme-bg: rgba(21, 24, 48, .76);
    --theme-panel: rgba(159, 178, 255, .14);
}

body[data-theme="2"] {
    --theme-a: #ff74b8;
    --theme-b: #8dfff0;
    --theme-bg: rgba(42, 18, 38, .74);
    --theme-panel: rgba(255, 116, 184, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--theme-a) 22%, transparent), transparent 28%),
        linear-gradient(135deg, #081211 0%, #050706 56%, #111513 100%);
    transition: background .6s ease;
}
.hero-video-layer { position: absolute; inset: 0; z-index: 0; }
.hero-video-layer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
    position: absolute;
    inset: 0;
    filter: brightness(1.18) saturate(1.08) contrast(1.04);
}
.hero-video-layer video.active { opacity: .76; }
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(0, 0, 0, .56) 0%, rgba(0, 0, 0, .24) 52%, rgba(0, 0, 0, .46) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, .16) 0%, rgba(7, 9, 9, .76) 100%);
    pointer-events: none;
}
.nav {
    position: relative;
    z-index: 2;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    width: 160px;
    height: 46px;
}
.brand-logo {
    display: block;
    width: 160px;
    height: 46px;
    object-fit: contain;
}
.nav-links { display: flex; align-items: center; gap: 26px; color: rgba(255,255,255,.78); font-size: 14px; }
.nav-links a:hover { color: #fff; }
.nav-cta {
    color: #06100d;
    background: var(--theme-a);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    transition: background .35s ease;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 12vh 0 18vh;
    max-width: 760px;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--theme-b);
    background: rgba(0,0,0,.22);
    font-size: 14px;
    margin-bottom: 22px;
}
h1 {
    margin: 0;
    font-size: clamp(44px, 8vw, 94px);
    line-height: .96;
    font-weight: 900;
}
.hero-copy {
    margin: 24px 0 34px;
    max-width: 680px;
    color: rgba(255,255,255,.84);
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.65;
}
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--theme-a), var(--theme-b));
    color: #04100d;
    font-weight: 800;
    box-shadow: 0 14px 34px rgba(13, 242, 131, .24);
}
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 999px;
    color: #fff;
    border: 1px solid color-mix(in srgb, var(--theme-b) 58%, transparent);
    background: color-mix(in srgb, var(--theme-a) 20%, rgba(0,0,0,.26));
    font-weight: 800;
}
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: rgba(255,255,255,.86);
    background: rgba(0,0,0,.18);
}
.hero-metrics {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.08);
}
.metric {
    font: inherit;
    width: 100%;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
    padding: 22px 28px;
    background: rgba(4, 8, 8, .72);
    transition: background .35s ease, color .35s ease, box-shadow .35s ease;
}
.metric strong { display: block; font-size: 24px; margin-bottom: 6px; }
.metric span { color: var(--muted); font-size: 14px; }
.metric.active {
    color: #06100d;
    background: linear-gradient(135deg, var(--theme-a), var(--theme-b));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 -18px 46px color-mix(in srgb, var(--theme-a) 18%, transparent);
}
.metric.active span { color: rgba(6, 16, 13, .76); }

.section { padding: 86px 0; }
#tutorials {
    background:
        radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--theme-a) 20%, transparent), transparent 34%),
        linear-gradient(135deg, var(--theme-bg), rgba(7, 9, 9, .98));
    transition: background .45s ease;
}
.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.section-kicker { color: var(--theme-a); font-size: 13px; font-weight: 800; margin-bottom: 10px; transition: color .35s ease; }
h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.15; }
.section-desc { color: var(--muted); max-width: 560px; line-height: 1.8; margin: 12px 0 0; }

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.tutorial-card, .drama-card {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 8px;
    overflow: hidden;
}
.drama-card {
    display: block;
    width: 100%;
    padding: 0;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.tutorial-cover, .drama-cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-b) 18%, transparent), var(--theme-panel));
    overflow: hidden;
}
.tutorial-cover img, .drama-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.tutorial-card:hover img, .drama-card:hover img { transform: scale(1.04); }
.card-body { padding: 16px; }
.card-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.45;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-desc {
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    overflow: hidden;
}
.article-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}
.article-item:last-child { border-bottom: 0; }
.article-item h3 { margin: 0; font-size: 17px; line-height: 1.5; }
.article-item p { margin: 6px 0 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.article-date { color: rgba(255,255,255,.5); font-size: 13px; white-space: nowrap; padding-top: 3px; }

.drama-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.drama-card .card-title { min-height: auto; }
.drama-meta { color: var(--brand-2); margin-top: 10px; font-size: 13px; }

.empty {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 28px;
    color: var(--muted);
    background: var(--panel-soft);
}
.footer {
    padding: 32px 0 44px;
    color: rgba(255,255,255,.52);
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .nav-links { gap: 14px; }
    .nav-links a:not(.nav-cta) { display: none; }
    .hero-metrics, .tutorial-grid, .drama-grid { grid-template-columns: 1fr; }
    .section-header { display: block; }
    .article-item { grid-template-columns: 1fr; }
    .hero-content { padding: 8vh 0 12vh; }
}
