/* ═══════════════════════════════════════════
   AI Auditor — Minimal Landing
   ═══════════════════════════════════════════ */

:root {
    --bg: #0B0E14;
    --bg-input: #141820;
    --bg-hover: #1A1F2B;
    --purple: #8B5CF6;
    --purple-dim: rgba(139, 92, 246, 0.15);
    --text-white: #FFFFFF;
    --text-gray: #9CA3AF;
    --text-muted: #4B5563;
    --border: #1F2937;
    --border-light: #374151;
    --success: #10B981;
    --error: #EF4444;
    --radius: 12px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-white);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 560px;
    padding: 60px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
}

.hidden { display: none !important; }

/* ── Header ── */
header {
    text-align: center;
    margin-bottom: 40px;
}

.top-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--purple);
    background: rgba(139, 92, 246, 0.06);
    margin-bottom: 28px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple);
}

h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 12px;
    color: var(--text-white);
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-gray);
    font-weight: 400;
}

/* ── Input Section ── */
.input-section {
    width: 100%;
    margin-bottom: 32px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.input-icon {
    position: absolute;
    left: 16px;
    pointer-events: none;
}

#urlInput {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-white);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#urlInput:focus {
    border-color: var(--border-light);
}

#urlInput::placeholder {
    color: var(--text-muted);
}

/* ── Buttons ── */
.btn-main {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 14px;
}

.btn-main:hover {
    background: var(--bg-hover);
    border-color: var(--text-gray);
}

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

.btn-main:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-outline {
    padding: 14px 28px;
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--text-gray);
}

.btn-outline-sm {
    padding: 10px 24px;
    background: transparent;
    color: var(--text-gray);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-sm:hover {
    border-color: var(--border-light);
    color: var(--text-white);
}

.price-note {
    text-align: center;
    color: var(--purple);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

/* ── Upload toggle ── */
.upload-toggle {
    text-align: center;
}

.upload-link {
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.2s;
    border-bottom: 1px dashed var(--text-muted);
}

.upload-link:hover {
    color: var(--text-gray);
    border-color: var(--text-gray);
}

/* ── Upload Section ── */
.upload-section {
    margin-top: 16px;
}

.upload-zone {
    border: 1px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.03);
}

.upload-text {
    color: var(--text-gray);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--purple);
    border-radius: 8px;
    margin-bottom: 12px;
}

.file-name {
    color: var(--text-white);
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.btn-clear:hover {
    color: var(--error);
}

/* ── Extras ── */
.extras {
    width: 100%;
    margin-bottom: 32px;
}

.extras-label {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.extras-row {
    display: flex;
    gap: 10px;
}

.btn-extra {
    flex: 1;
    padding: 14px 12px;
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-extra:hover:not(:disabled) {
    border-color: var(--purple);
    color: var(--purple);
}

.btn-extra:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Progress ── */
.progress-section {
    width: 100%;
    text-align: center;
    margin-bottom: 24px;
}

.video-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-white);
    margin-bottom: 20px;
    min-height: 1.2em;
}

.progress-bar-wrap {
    width: 100%;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--purple), #06B6D4);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.progress-message {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* ── Error ── */
.error-section {
    width: 100%;
    text-align: center;
    margin-bottom: 24px;
}

.error-message {
    color: var(--error);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 14px;
}

/* ── Result ── */
.result-section {
    width: 100%;
    margin-bottom: 24px;
}

.result-text {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    max-height: 360px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.result-text::-webkit-scrollbar { width: 3px; }
.result-text::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.result-meta {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.result-actions .btn-main {
    margin-bottom: 0;
}

.result-actions .btn-outline {
    flex: 1;
}

.result-actions .btn-main {
    flex: 1;
}

/* ── Analysis ── */
.analysis-section {
    width: 100%;
    margin-bottom: 24px;
}

.analysis-label {
    color: var(--purple);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.analysis-text {
    background: var(--bg-input);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-gray);
    max-height: 500px;
    overflow-y: auto;
}

/* ── Footer ── */
footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
}

footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

/* ── Animations ── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .container {
        padding: 40px 16px 32px;
    }

    h1 {
        font-size: 1.7rem;
        letter-spacing: -0.5px;
    }

    .subtitle {
        font-size: 0.92rem;
    }

    .extras-row {
        flex-direction: column;
    }

    .result-actions {
        flex-direction: column;
    }
}
