/* ============================================================
   Footage Finder — GrowShakeMedia
   Dark / black UI · Inter · cyan #00E8FE accent
   ============================================================ */

:root {
    --bg:          #08090b;
    --bg-2:        #0d0e11;
    --surface:     #131519;
    --surface-2:   #1a1d22;
    --surface-3:   #23262d;
    --border:      #24272e;
    --border-2:    #31353d;
    --text:        #f3f4f6;
    --text-2:      #c7cbd3;
    --muted:       #8b909b;
    --muted-2:     #626772;
    --accent:      #00e8fe;
    --accent-press:#38ecff;
    --accent-tint: rgba(0,232,254,.12);
    --accent-ink:  #032830;
    --accent-line: rgba(0,232,254,.38);
    --link:        #43d9f0;
    --danger:      #ff5c60;
    --ok:          #3ddb8b;
    --r-card: 16px;
    --r-input: 10px;
    --r-clip: 12px;
    --sh-1: 0 1px 2px rgba(0,0,0,.4);
    --sh-2: 0 4px 14px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.35);
    --sh-3: 0 18px 44px rgba(0,0,0,.55), 0 6px 16px rgba(0,0,0,.4);
    --maxw: 1120px;
    --nav-h: 62px;
}

* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    background: var(--bg); color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px; line-height: 1.55;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* subtle top glow so the black isn't flat */
body::before {
    content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; z-index: 0; pointer-events: none;
    background: radial-gradient(60% 100% at 50% 0%, rgba(0,232,254,.07), rgba(0,232,254,0) 70%);
}
body > * { position: relative; z-index: 1; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
h1,h2,h3 { letter-spacing: -0.02em; }

/* ---------------- Top navigation bar ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 60; height: var(--nav-h);
    background: rgba(9,10,12,.72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.site-header .bar {
    max-width: var(--maxw); height: 100%; margin: 0 auto;
    display: flex; align-items: center; gap: 10px; padding: 0 24px;
}
.brand {
    display: inline-flex; align-items: center; gap: 9px;
    font-weight: 800; font-size: 18.5px; letter-spacing: -0.03em;
    color: #fff; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .dot {
    width: 10px; height: 10px; border-radius: 999px; background: var(--accent);
    box-shadow: 0 0 0 4px rgba(0,232,254,.18), 0 0 12px rgba(0,232,254,.6);
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: 18px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
    color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap;
    padding: 7px 12px; border-radius: 8px; transition: background .12s, color .12s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: #fff; font-weight: 600; background: var(--surface-3); }
.spacer { flex: 1 1 auto; }
.header-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.btn-ghost { color: var(--muted); font-size: 13.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.btn-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; color: #0a0b0d; padding: 9px 16px; border-radius: 999px;
    font-weight: 600; font-size: 13.5px; border: 0; white-space: nowrap;
    transition: transform .12s, background .15s;
}
.btn-pill:hover { text-decoration: none; background: #e9edf1; }
.btn-pill:active { transform: translateY(1px); }

/* ---------------- Login ---------------- */
.login-wrap { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login {
    width: 100%; max-width: 384px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-card); box-shadow: var(--sh-3);
    padding: 36px 32px; text-align: left;
}
.login .badge-top {
    display:inline-flex; align-items:center; gap:7px; margin-bottom:16px;
    font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
    color: var(--accent); background: var(--accent-tint);
    border:1px solid var(--accent-line); padding:5px 10px; border-radius:999px;
}
.login h1 { margin: 0 0 6px; font-size: 23px; color: #fff; }
.login .lead { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.login label { display:block; font-size:13px; font-weight:600; color:var(--text-2); margin-bottom:7px; }
.login input {
    width: 100%; padding: 12px 14px; background: var(--surface-2);
    border: 1px solid var(--border-2); border-radius: var(--r-input); color: var(--text); font-size: 15px;
}
.login input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,232,254,.2); }
.login button {
    width: 100%; margin-top: 18px; padding: 13px 14px;
    background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
    font-size: 15px; font-weight: 700;
}
.login button:hover { background: var(--accent-press); }
.login .err { color: var(--danger); margin: 14px 0 0; font-size: 14px; font-weight: 500; }

/* ---------------- Page shell ---------------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 90px; }
.page-head { margin-bottom: 24px; }
.page-head h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; color: #fff; }
.page-head p { margin: 0; color: var(--muted); font-size: 15px; max-width: 620px; }

/* ---------------- Controls ---------------- */
.controls {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-card); box-shadow: var(--sh-2);
    padding: 6px 24px 24px; margin-bottom: 34px;
}
.controls .card-label {
    display:flex; align-items:center; gap:8px;
    font-size:12px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
    color: var(--muted-2); padding: 18px 0 16px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
}
.controls label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 18px 0 0; }
.controls .hint { color: var(--muted-2); font-weight: 400; }
.controls input[type=text], .controls textarea, .controls input[type=number], .controls select {
    display: block; width: 100%; margin-top: 8px; padding: 11px 13px;
    background: var(--surface-2); border: 1px solid var(--border-2);
    border-radius: var(--r-input); color: var(--text); font-size: 14.5px; font-family: inherit;
    transition: border-color .14s, box-shadow .14s;
}
.controls input::placeholder, .controls textarea::placeholder { color: var(--muted-2); }
.controls input:focus, .controls textarea:focus, .controls select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,232,254,.16);
}
.controls textarea { resize: vertical; min-height: 172px; line-height: 1.6; }
.controls select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b909b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px; }
.controls .row { display: flex; gap: 18px; align-items: end; flex-wrap: wrap; margin-top: 20px; }
.controls .row label { flex: 0 0 120px; margin: 0; }
.controls .row label:has(select) { flex: 0 0 200px; }
.controls .row .go-wrap { flex: 1 1 auto; display: flex; justify-content: flex-end; }

.primary {
    background: var(--accent); color: var(--accent-ink); border: 0;
    padding: 12px 28px; border-radius: 999px; font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em;
    box-shadow: 0 0 0 1px rgba(0,232,254,.25), 0 6px 20px rgba(0,232,254,.28);
    transition: transform .1s, box-shadow .15s, background .15s;
}
.primary:hover { background: var(--accent-press); box-shadow: 0 0 0 1px rgba(0,232,254,.4), 0 8px 26px rgba(0,232,254,.45); }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .5; cursor: wait; box-shadow: none; }

.status { min-height: 20px; margin: 16px 0 0; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.status.err { color: var(--danger); }

/* ---------------- Scene cards ---------------- */
.scene {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-card); box-shadow: var(--sh-1);
    padding: 22px 24px; margin-bottom: 18px; transition: box-shadow .18s, border-color .18s;
}
.scene:hover { box-shadow: var(--sh-2); border-color: var(--border-2); }
.scene > header { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; padding: 0; margin: 0 0 14px; }
.scene .tc {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 700; font-size: 12.5px; color: var(--accent);
    background: var(--accent-tint); border: 1px solid var(--accent-line);
    padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.scene .words { color: var(--muted); font-size: 12px; font-weight: 600; background: var(--surface-3); padding: 4px 10px; border-radius: 999px; }
.scene .text {
    margin: 0 0 18px; color: var(--text-2); font-size: 14.5px; line-height: 1.62;
    padding-left: 14px; border-left: 2px solid var(--border-2);
}

/* ---------------- Queries ---------------- */
.queries { display: flex; flex-direction: column; gap: 14px; }
.query { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-clip); padding: 14px; }
.query .qinput {
    width: 100%; padding: 10px 12px; margin-bottom: 11px;
    background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 9px;
    color: var(--text); font-size: 14px; font-weight: 600;
}
.query .qinput:focus { outline:none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,232,254,.16); }
.query .sb {
    display: inline-flex; align-items: center; padding: 7px 14px; margin-right: 8px;
    background: var(--surface-3); color: #fff; border: 1px solid var(--border-2);
    border-radius: 999px; font-size: 12.5px; font-weight: 600; transition: background .14s, border-color .14s;
}
.query .sb:hover { text-decoration: none; background: #2c2f37; border-color: var(--accent-line); }
.query .sb-copy, .query .research {
    display: inline-flex; align-items: center; padding: 7px 13px; margin-right: 8px;
    background: transparent; color: var(--muted); border: 1px solid var(--border-2);
    border-radius: 999px; font-size: 12.5px; font-weight: 600; transition: color .14s, border-color .14s;
}
.query .sb-copy:hover, .query .research:hover { color: var(--text); border-color: var(--muted); }
.query .sb-copy.copied { color: var(--ok); border-color: var(--ok); }

/* ---------------- Clips ---------------- */
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 13px; margin-top: 15px; }
.clip {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-clip);
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: var(--sh-1); transition: transform .14s, box-shadow .18s, border-color .18s;
}
.clip:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--border-2); }
.thumbwrap { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.thumbwrap img, .thumbwrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbwrap video { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; }
.thumbwrap:hover video { opacity: 1; }
.thumbwrap .badge {
    position: absolute; top: 8px; left: 8px; padding: 3px 8px;
    background: rgba(0,0,0,.72); color: #fff; border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
}
.thumbwrap .meta {
    position: absolute; bottom: 8px; right: 8px; padding: 3px 8px;
    background: rgba(0,0,0,.7); border-radius: 999px; font-size: 10px; color: #fff;
    font-variant-numeric: tabular-nums; font-weight: 600;
}
.clip .actions { display: flex; border-top: 1px solid var(--border); }
.clip .actions a, .clip .actions button {
    flex: 1; text-align: center; padding: 9px 4px; font-size: 12px; font-weight: 600;
    color: var(--muted); background: transparent; border: 0; border-left: 1px solid var(--border); font-family: inherit;
    transition: background .12s, color .12s;
}
.clip .actions a:first-child, .clip .actions button:first-child { border-left: 0; }
.clip .actions .dl { color: var(--accent); background: var(--accent-tint); }
.clip .actions .dl:hover { background: rgba(0,232,254,.2); text-decoration: none; }
.clip .actions .copy:hover { color: var(--text); background: var(--surface-3); }
.clip .actions .copy.copied { color: var(--ok); }
.clip .actions .page:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }

.sources { margin-top: 10px; }
.empty {
    color: var(--muted); font-size: 13px; padding: 16px; text-align: center;
    background: var(--bg-2); border: 1px dashed var(--border-2); border-radius: 10px;
}

/* ---------------- Footer ---------------- */
.site-footer {
    max-width: var(--maxw); margin: 30px auto 0; padding: 22px 24px 44px;
    color: var(--muted-2); font-size: 12.5px; text-align: center; border-top: 1px solid var(--border);
}
.site-footer .dot { color: var(--accent); }

@media (max-width: 640px) {
    main { padding: 26px 16px 64px; }
    .site-header .bar { padding: 0 16px; }
    .page-head h2 { font-size: 22px; }
    .controls { padding: 4px 16px 20px; }
    .controls .row label, .controls .row label:has(select) { flex: 1 1 100%; }
    .controls .row .go-wrap { justify-content: stretch; }
    .controls .row .go-wrap .primary { width: 100%; }
}
