/* CCTubeLV homepage — dark utility lab */
:root {
    --lab-ink: #07111f;
    --lab-panel: #0c192a;
    --lab-panel-2: #102136;
    --lab-green: #42f5c2;
    --lab-blue: #65a7ff;
    --lab-violet: #9b8cff;
    --lab-line: rgba(148, 176, 207, .18);
}

body { overflow-x: hidden; }

header {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border-bottom: 1px solid var(--border);
}
header::after { display: none; }
.header-inner { height: 74px; }
.logo { gap: .72rem; }
.logo-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--lab-ink); box-shadow: none; }
[data-theme="dark"] .logo-icon { color: var(--lab-ink); background: var(--lab-green); }
.logo > span { display: flex; flex-direction: column; line-height: 1.05; }
.logo small { margin-top: .25rem; color: var(--text-muted); font-size: .54rem; font-weight: 700; letter-spacing: .2em; }
.nav-links { gap: .65rem; }
.nav-links a { padding: .5rem .65rem; border-radius: 6px; font-size: .82rem; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-deep); background: transparent; }
[data-theme="dark"] .nav-links a:hover, [data-theme="dark"] .nav-links a.active { color: var(--lab-green); }
.header-status { display: inline-flex; align-items: center; gap: .45rem; color: var(--text-muted); font: 700 .59rem/1 'JetBrains Mono', monospace; letter-spacing: .12em; }
.header-status i { width: 6px; height: 6px; border-radius: 50%; background: #16c784; box-shadow: 0 0 0 4px rgba(22,199,132,.12); }
.theme-btn, .menu-btn { border-radius: 9px; }

.hero {
    position: relative; padding: clamp(4rem, 8vw, 7rem) 0 clamp(4.5rem, 8vw, 7.5rem);
    overflow: hidden; text-align: left; border: 0; color: #eff7ff; background: var(--lab-ink);
}
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(600px 360px at 12% 15%, rgba(59,130,246,.16), transparent 68%),
        radial-gradient(520px 420px at 88% 78%, rgba(66,245,194,.1), transparent 70%);
}
.hero-grid-lines {
    position: absolute; inset: 0; opacity: .32; pointer-events: none;
    background-image: linear-gradient(var(--lab-line) 1px, transparent 1px), linear-gradient(90deg, var(--lab-line) 1px, transparent 1px);
    background-size: 58px 58px; mask-image: linear-gradient(to right, #000, transparent 72%);
}
.hero-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(390px, .94fr); gap: clamp(3rem, 7vw, 6.5rem); align-items: center; }
.hero-signal { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.5rem; color: #8ea3bb; font: 600 .68rem/1.2 'JetBrains Mono', monospace; letter-spacing: .12em; }
.hero-signal span { color: var(--lab-green); text-shadow: 0 0 15px rgba(66,245,194,.8); }
.hero-signal b { color: #3c516a; }
.hero h1 { max-width: 760px; margin: 0 0 1.55rem; color: #f4f8fc; font-size: clamp(3.25rem, 6.8vw, 6.55rem); line-height: .95; font-weight: 800; letter-spacing: -.065em; }
.hero h1 span { color: var(--lab-green); background: none; -webkit-text-fill-color: currentColor; text-shadow: 0 0 40px rgba(66,245,194,.14); }
.hero p { max-width: 690px; margin: 0 0 1.8rem; color: #a2b2c5; font-size: clamp(.98rem, 1.5vw, 1.1rem); line-height: 1.8; }
.hero .search-box { max-width: 660px; margin: 0; }
.command-search input { min-height: 62px; padding: 1rem 4rem 1rem 4.3rem; border: 1px solid #29405a; border-radius: 8px; color: #edf7ff; background: #0c1b2d; box-shadow: 0 18px 45px rgba(0,0,0,.22); font: 500 .9rem/1 'JetBrains Mono', monospace; }
.command-search input::placeholder { color: #668098; }
.command-search input:focus { border-color: var(--lab-green); box-shadow: 0 0 0 3px rgba(66,245,194,.12), 0 18px 45px rgba(0,0,0,.22); }
.command-mark { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--lab-green); font: 600 1rem/1 'JetBrains Mono', monospace; }
.command-search kbd { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); min-width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #35506d; border-bottom-width: 2px; border-radius: 6px; color: #8da4bb; background: #14263a; font: 600 .73rem/1 'JetBrains Mono', monospace; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.25rem; color: #7189a2; font-size: .72rem; }
.hero-notes i { margin-right: .35rem; color: var(--lab-green); }

.launch-panel { border: 1px solid #28425e; border-radius: 14px; background: rgba(12,25,42,.93); box-shadow: 0 34px 90px rgba(0,0,0,.36); overflow: hidden; }
.launch-head, .launch-foot { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid #20364e; color: #7f98b2; font: 600 .63rem/1 'JetBrains Mono', monospace; letter-spacing: .1em; }
.launch-head em { color: #546f89; font-style: normal; letter-spacing: 0; }
.launch-grid { display: grid; grid-template-columns: 1fr 1fr; }
.launch-grid a { position: relative; min-height: 155px; padding: 1.2rem; border-right: 1px solid #20364e; border-bottom: 1px solid #20364e; color: #edf7ff; display: flex; flex-direction: column; transition: background .2s ease, color .2s ease; }
.launch-grid a:nth-child(2n) { border-right: 0; }
.launch-grid a:nth-child(n+3) { border-bottom: 0; }
.launch-grid a:hover { color: #fff; background: #122943; }
.launch-grid a > i { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 1.1rem; border: 1px solid rgba(66,245,194,.35); border-radius: 8px; color: var(--lab-green); background: rgba(66,245,194,.08); }
.launch-grid a:nth-child(2) > i { color: var(--lab-blue); border-color: rgba(101,167,255,.35); background: rgba(101,167,255,.08); }
.launch-grid a:nth-child(3) > i { color: #ffb86b; border-color: rgba(255,184,107,.35); background: rgba(255,184,107,.08); }
.launch-grid a:nth-child(4) > i { color: var(--lab-violet); border-color: rgba(155,140,255,.35); background: rgba(155,140,255,.08); }
.launch-grid strong { font: 700 .78rem/1.2 'JetBrains Mono', monospace; letter-spacing: .04em; }
.launch-grid small { margin-top: .35rem; color: #6f88a1; font-size: .66rem; }
.launch-grid b { position: absolute; right: .8rem; top: .75rem; color: #324c67; font: 500 .6rem/1 'JetBrains Mono', monospace; }
.launch-foot { border-top: 1px solid #20364e; border-bottom: 0; letter-spacing: 0; }
.launch-foot > span { display: flex; align-items: center; gap: .5rem; }
.launch-foot > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--lab-green); box-shadow: 0 0 10px rgba(66,245,194,.8); }
.launch-foot a { color: var(--lab-green); }
.launch-foot a i { margin-left: .25rem; }

.system-strip { color: #dce8f3; background: #0a1626; border-top: 1px solid #1d334a; }
.system-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.system-grid > div { display: grid; grid-template-columns: 30px 1fr; padding: 1.45rem 1.3rem; border-right: 1px solid #1d334a; }
.system-grid > div:first-child { padding-left: 0; }
.system-grid > div:last-child { border-right: 0; }
.system-grid span { grid-row: 1 / 3; color: #3b5672; font: 600 .6rem/1 'JetBrains Mono', monospace; }
.system-grid strong { color: #c9d8e6; font: 700 .68rem/1.2 'JetBrains Mono', monospace; letter-spacing: .08em; }
.system-grid small { margin-top: .32rem; color: #607992; font-size: .65rem; }

.category-nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 2.4rem 0 .5rem; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.cat-pill { flex: 0 0 auto; padding: .55rem 1rem; border-radius: 7px; font: 650 .76rem/1.2 'JetBrains Mono', monospace; }
.cat-pill:hover, .cat-pill.active { color: #fff; border-color: var(--lab-ink); background: var(--lab-ink); box-shadow: none; }
[data-theme="dark"] .cat-pill:hover, [data-theme="dark"] .cat-pill.active { color: var(--lab-ink); border-color: var(--lab-green); background: var(--lab-green); }

.tools-section { padding: 2.2rem 0 clamp(5rem, 9vw, 8rem); }
.section-header { align-items: flex-end; margin-bottom: 1.8rem; }
.section-label { display: block; margin-bottom: .5rem; color: var(--brand); font: 700 .66rem/1 'JetBrains Mono', monospace; letter-spacing: .14em; }
.section-header h2 { font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -.05em; }
.section-header .count { padding: .42rem .7rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font: 600 .65rem/1 'JetBrains Mono', monospace; text-transform: uppercase; }
.tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; counter-reset: tool-index; }
.tool-card { counter-increment: tool-index; min-height: 220px; padding: 1.35rem; border-radius: 12px; gap: .75rem; }
.tool-card::before { content: counter(tool-index, decimal-leading-zero); top: 1rem; left: auto; right: 1rem; width: auto; height: auto; opacity: 1; color: var(--text-muted); background: none; font: 500 .6rem/1 'JetBrains Mono', monospace; }
.tool-card::after { content: '↗'; position: absolute; right: 1rem; bottom: 1rem; color: var(--text-muted); font-size: .8rem; transition: transform .2s ease, color .2s ease; }
.tool-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: 0 18px 45px rgba(14,41,63,.12); }
.tool-card:hover::after { color: var(--brand); transform: translate(2px,-2px); }
.tool-card .tool-icon, .tool-card:nth-child(n) .tool-icon { width: 45px; height: 45px; border: 1px solid var(--border); border-radius: 9px; color: var(--brand); background: var(--surface-hover); box-shadow: none; }
.tool-card:nth-child(3n+2) .tool-icon { color: #4e86dc; }
.tool-card:nth-child(3n+3) .tool-icon { color: #8a6add; }
.tool-card .tool-name { color: var(--text); font-size: 1rem; }
.tool-card .tool-desc { max-width: 92%; font-size: .8rem; line-height: 1.65; }
.tool-card .tool-tag { padding: .18rem .42rem; border-radius: 4px; font: 600 .59rem/1 'JetBrains Mono', monospace; }

.workflow-section { padding: 0 0 clamp(5rem, 9vw, 8rem); }
.workflow-shell { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 7vw, 6rem); padding: clamp(2.3rem, 6vw, 5rem); border-radius: 16px; color: #edf7ff; background: var(--lab-ink); }
.workflow-title h2 { margin-bottom: 1rem; font-size: clamp(2.4rem, 4vw, 4.3rem); line-height: 1; letter-spacing: -.055em; }
.workflow-title p { color: #8398ad; font-size: .9rem; line-height: 1.75; }
.workflow-steps { display: flex; flex-direction: column; justify-content: center; }
.workflow-steps > div { display: grid; grid-template-columns: 32px 46px 1fr; align-items: center; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid #20354c; }
.workflow-steps > div:last-child { border-bottom: 0; }
.workflow-steps b { color: #405a75; font: 600 .62rem/1 'JetBrains Mono', monospace; }
.workflow-steps i { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #2c4b68; border-radius: 9px; color: var(--lab-green); background: #0f2034; }
.workflow-steps span { display: flex; flex-direction: column; }
.workflow-steps strong { font-size: .9rem; }
.workflow-steps small { margin-top: .2rem; color: #71869c; font-size: .72rem; }

footer { border-top: 1px solid #1d334a; color: #dce8f3; background: #0a1626; }
.footer-brand h3 { color: #edf7ff; }
.footer-brand p, .footer-col a { color: #7790a8; }
.footer-col h4 { color: #506a83; }
.footer-bottom { border-top-color: #1d334a; color: #58718a; }
.footer-domain { display: inline-block; margin-top: .75rem; color: var(--lab-green); font: 600 .72rem/1 'JetBrains Mono', monospace; }

@media (max-width: 1024px) {
    .hero-layout { grid-template-columns: 1fr .85fr; gap: 2.5rem; }
    .hero h1 { font-size: clamp(3.2rem, 6.7vw, 5.4rem); }
}

@media (max-width: 820px) {
    .header-status { display: none; }
    .hero-layout { grid-template-columns: 1fr; }
    .hero-copy { text-align: center; }
    .hero-signal, .hero-notes { justify-content: center; }
    .hero p, .hero .search-box { margin-left: auto; margin-right: auto; }
    .launch-panel { width: min(100%, 580px); margin: 0 auto; }
    .system-grid { grid-template-columns: repeat(2, 1fr); }
    .system-grid > div { border-bottom: 1px solid #1d334a; }
    .system-grid > div:nth-child(2) { border-right: 0; }
    .system-grid > div:nth-child(n+3) { border-bottom: 0; }
    .system-grid > div:first-child { padding-left: 1.3rem; }
    .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workflow-shell { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .container { padding-inline: 18px; }
    .hero { padding: 3.5rem 0 4rem; }
    .hero-signal { font-size: .56rem; letter-spacing: .06em; }
    .hero h1 { font-size: clamp(3rem, 15vw, 4.25rem); }
    .hero p { font-size: .92rem; }
    .hero-notes { gap: .8rem; }
    .command-search kbd { display: none; }
    .command-search input { padding-right: 1rem; font-size: .77rem; }
    .launch-grid a { min-height: 142px; padding: 1rem; }
    .system-grid > div { padding: 1.2rem .8rem; }
    .section-header { align-items: flex-start; gap: 1rem; }
    .tools-grid { grid-template-columns: 1fr; }
    .tool-card { min-height: 0; }
    .workflow-shell { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .tool-card, .launch-grid a { transition: none !important; transform: none !important; }
}
