/* ═══════════════════════════════════════════════ */
/*  VidExtractor.app — Hacker Terminal Theme       */
/* ═══════════════════════════════════════════════ */

:root {
    --bg-deep: #050508;
    --bg-primary: #0a0a0f;
    --bg-surface: #0f0f1a;
    --bg-elevated: #141425;
    --bg-card: #111120;
    --green-primary: #00ff88;
    --green-dim: #00cc6a;
    --green-glow: rgba(0, 255, 136, 0.15);
    --green-glow-strong: rgba(0, 255, 136, 0.3);
    --cyan: #00d4ff;
    --cyan-dim: #00a8cc;
    --cyan-glow: rgba(0, 212, 255, 0.12);
    --orange-cta: #ff6b35;
    --orange-cta-hover: #ff8555;
    --orange-glow: rgba(255, 107, 53, 0.2);
    --text-primary: #e0e0e8;
    --text-secondary: #9898a8;
    --text-muted: #5a5a6e;
    --border: #1e1e35;
    --border-active: #2a2a4a;
    --scanline: rgba(0, 255, 136, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        var(--scanline) 2px,
        var(--scanline) 4px
    );
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.02) 0%, transparent 50%),
        linear-gradient(rgba(30, 30, 50, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 30, 50, 0.3) 1px, transparent 1px);
    background-size: 100%, 100%, 60px 60px, 60px 60px;
}

/* ═══════ HEADER ═══════ */
.header {
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 8, 0.85);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border: 2px solid var(--green-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--green-primary);
    box-shadow: 0 0 15px var(--green-glow), inset 0 0 10px var(--green-glow);
    animation: pulse-border 3s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 15px var(--green-glow), inset 0 0 10px var(--green-glow); }
    50% { box-shadow: 0 0 25px var(--green-glow-strong), inset 0 0 15px var(--green-glow); }
}

.logo-text {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text .vid { color: var(--text-primary); }
.logo-text .extractor { color: var(--green-primary); }
.logo-text .dot-app { color: var(--text-muted); font-weight: 400; font-size: 13px; }

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-status {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-primary);
    box-shadow: 0 0 8px var(--green-primary);
    animation: blink-dot 2s ease-in-out infinite;
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.header-cta {
    background: transparent;
    border: 1px solid var(--orange-cta);
    color: var(--orange-cta);
    padding: 7px 14px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.header-cta:hover {
    background: var(--orange-glow);
    box-shadow: 0 0 20px var(--orange-glow);
}

/* ═══════ HERO ═══════ */
.hero {
    text-align: center;
    padding: 50px 32px 36px;
}

.hero-pre {
    font-size: 12px;
    color: var(--green-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.7;
}

.hero h1 {
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
}

.hero h1 .highlight {
    color: var(--green-primary);
    text-shadow: 0 0 30px var(--green-glow);
}

.hero-sub {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 300;
}

.hero-sub strong {
    color: var(--cyan);
    font-weight: 500;
}

/* ═══════ TOOL CONTAINER ═══════ */
.tool-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 20px 50px;
}

.tabs {
    display: flex;
    gap: 0;
}

.tab {
    flex: 1;
    padding: 13px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-bottom: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.tab:first-child { border-radius: 8px 0 0 0; }
.tab:last-child { border-radius: 0 8px 0 0; }

.tab:hover {
    color: var(--text-secondary);
    background: var(--bg-elevated);
}

.tab.active {
    background: var(--bg-elevated);
    color: var(--green-primary);
    border-color: var(--border-active);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 2px;
    background: var(--green-primary);
    box-shadow: 0 0 10px var(--green-primary);
}

.tab-icon { font-size: 15px; }

/* ── Input Panel ── */
.input-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-active);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 24px;
}

.input-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-label .prompt { color: var(--green-dim); }

.input-row {
    display: flex;
    gap: 12px;
}

.input-field {
    flex: 1;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 13px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    caret-color: var(--green-primary);
}

.input-field::placeholder {
    color: var(--text-muted);
    font-size: 13px;
}

.input-field:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px var(--green-glow), 0 0 20px var(--green-glow);
}

.btn-extract {
    background: var(--green-primary);
    color: var(--bg-deep);
    border: none;
    border-radius: 6px;
    padding: 13px 26px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-extract:hover {
    background: #33ff99;
    box-shadow: 0 0 30px var(--green-glow-strong), 0 4px 20px var(--green-glow);
    transform: translateY(-1px);
}

.btn-extract:active { transform: translateY(0); }

.btn-extract:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.input-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
}

.input-hint code {
    background: var(--bg-deep);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    color: var(--cyan);
    border: 1px solid var(--border);
}

/* ── Loading bar ── */
.loading-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--bg-deep) 25%, var(--green-primary) 50%, var(--bg-deep) 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 2px;
    margin-top: 12px;
    display: none;
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.loading-bar.active { display: block; }

/* ── Error ── */
.error-message {
    margin-top: 16px;
    background: rgba(255, 71, 87, 0.08);
    border: 1px solid rgba(255, 71, 87, 0.2);
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 13px;
    color: #ff4757;
}

/* ═══════ RESULTS ═══════ */
.results-section {
    margin-top: 20px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.results-count .num {
    color: var(--green-primary);
    font-weight: 700;
    font-size: 15px;
}

.total-info {
    color: var(--cyan);
    font-size: 12px;
    margin-left: 4px;
}

.limit-badge {
    display: inline-block;
    background: var(--orange-glow);
    color: var(--orange-cta);
    border: 1px solid rgba(255, 107, 53, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.export-btns {
    display: flex;
    gap: 8px;
}

.btn-export {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 7px 12px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-export:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--cyan-glow);
}

.btn-export.primary-export {
    border-color: var(--green-dim);
    color: var(--green-primary);
}

.btn-export.primary-export:hover {
    background: var(--green-glow);
    box-shadow: 0 0 15px var(--green-glow);
}

/* ── Video Cards ── */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.video-card {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    align-items: center;
    transition: all 0.2s;
}

.video-card:hover { background: var(--bg-elevated); }

.video-thumb {
    width: 140px;
    height: 79px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    background: var(--bg-deep);
    border: 1px solid var(--border);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.video-card:hover .video-thumb img { opacity: 1; }

.thumb-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 500;
}

.video-info { min-width: 0; }

.video-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-url {
    font-size: 11px;
    color: var(--cyan);
    margin-bottom: 5px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.video-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-copy-url {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy-url:hover {
    border-color: var(--green-primary);
    color: var(--green-primary);
    box-shadow: 0 0 10px var(--green-glow);
}

.btn-copy-url.copied {
    border-color: var(--green-primary);
    color: var(--green-primary);
}

/* ── Limit Banner ── */
.limit-banner {
    margin-top: 14px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08) 0%, rgba(255, 107, 53, 0.03) 100%);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 8px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.limit-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.limit-text strong { color: var(--orange-cta); }

.btn-vidcurato {
    background: var(--orange-cta);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 22px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-decoration: none;
}

.btn-vidcurato:hover {
    background: var(--orange-cta-hover);
    box-shadow: 0 0 30px var(--orange-glow);
    transform: translateY(-1px);
}

/* ═══════ FEATURES ═══════ */
.features-strip {
    max-width: 880px;
    margin: 0 auto 50px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--border-active);
    background: var(--bg-elevated);
}

.feature-icon { font-size: 26px; margin-bottom: 10px; }
.feature-title { font-size: 13px; font-weight: 600; color: var(--green-primary); margin-bottom: 6px; }
.feature-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ═══════ CTA SECTION ═══════ */
.cta-section {
    max-width: 880px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.cta-box {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(20, 20, 37, 0.8) 100%);
    border: 1px solid var(--border-active);
    border-radius: 12px;
    padding: 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--orange-cta), transparent);
}

.cta-box h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.cta-box h2 .highlight-orange { color: var(--orange-cta); }

.cta-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.cta-feature {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cta-feature .check { color: var(--green-primary); }

.cta-price {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.cta-price .amount {
    font-size: 30px;
    font-weight: 700;
    color: var(--orange-cta);
}

.cta-price .once {
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-cta-main {
    background: var(--orange-cta);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 36px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-cta-main:hover {
    background: var(--orange-cta-hover);
    box-shadow: 0 0 40px var(--orange-glow), 0 6px 20px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

/* ═══════ FOOTER ═══════ */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover { color: var(--green-primary); }

.footer-links { display: flex; gap: 18px; }
.footer-brand span { color: var(--green-dim); }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 768px) {
    .header { padding: 12px 16px; }
    .header-status { display: none; }
    .hero { padding: 36px 16px 24px; }
    .tool-container { padding: 0 12px 36px; }

    .tab { padding: 11px 8px; font-size: 12px; }
    .tab .tab-label { display: none; }

    .input-panel { padding: 16px; }
    .input-row { flex-direction: column; }
    .btn-extract { justify-content: center; }

    .video-card {
        grid-template-columns: 100px 1fr;
        gap: 10px;
    }
    .video-thumb { width: 100px; height: 56px; }
    .video-actions { display: none; }

    .results-header { flex-direction: column; align-items: flex-start; }
    .limit-banner { flex-direction: column; text-align: center; }
    .features-strip { grid-template-columns: 1fr; }
    .cta-features { flex-direction: column; gap: 10px; }

    .footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 16px;
    }
}