/* ================================================================
   PROMPTR — Detectr
   ================================================================ */

@font-face {
    font-family: 'Mencken Head Compress';
    src: url('../assets/fonts/MENCKEN/fonnts.com-Mencken-Std-Head-Compress-.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-primary: #0a1628;
    --bg-secondary: #0d1d35;
    --bg-card: #1e293b;
    --bg-input: #0f172a;

    --border: #334155;
    --border-light: #475569;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --accent-blue: #3b82f6;
    --accent-light: #60a5fa;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --nav-accent: #ff4d00;

    --font-serif: 'Mencken Head Compress', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}


/* ================================================================
   LOGIN SCREEN
   ================================================================ */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(ellipse at top, var(--bg-secondary), var(--bg-primary) 70%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.login-label {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.login-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.1;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.login-error {
    text-align: center;
    color: var(--accent-red);
    font-size: 14px;
    margin-top: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.login-footer a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--text-muted);
}


/* ================================================================
   BUTTONS
   ================================================================ */

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: var(--accent-light);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

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

.btn-ghost {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-scan {
    margin-top: 1.5rem;
    font-size: 16px;
    padding: 16px 32px;
}


/* ================================================================
   APP SCREEN
   ================================================================ */

.app-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-logo-link {
    display: flex;
}

.app-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.app-label {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.app-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-primary);
    line-height: 1.1;
}

.app-header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.app-header-wordmark {
    height: 66px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.app-header-wordmark:hover {
    opacity: 1;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-status {
    font-size: 12px;
    color: var(--accent-green);
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.app-divider {
    height: 1px;
    background: var(--border);
}

.app-container {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}


/* ================================================================
   TABS
   ================================================================ */

.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 2rem;
}

.tab {
    flex: 1;
    padding: 10px 24px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tab:hover {
    color: var(--text-secondary);
}

.tab.active {
    background: var(--border);
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}


/* ================================================================
   UPLOAD ZONE
   ================================================================ */

.section-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.section-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.upload-zone {
    position: relative;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.04);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.upload-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}


/* ================================================================
   FILE PREVIEW
   ================================================================ */

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.file-preview-item .file-size {
    color: var(--text-dim);
    font-size: 12px;
}

.file-preview-item .file-remove {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
}

.file-preview-item .file-remove:hover {
    color: var(--accent-red);
}

.file-preview-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
}


/* ================================================================
   VIDEO LAYOUT
   ================================================================ */

.video-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
}

.slider-group {
    margin-top: 0.5rem;
}

.slider-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.slider-group input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-blue);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--bg-primary);
}

.slider-value {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.cost-estimate {
    margin-top: 1rem;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}


/* ================================================================
   PROGRESS
   ================================================================ */

.progress-section {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.progress-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.progress-log {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.progress-log .log-line {
    padding: 2px 0;
}


/* ================================================================
   RESULTS
   ================================================================ */

.results-section {
    margin-top: 2rem;
}

.verdict-box {
    border: 2px solid;
    border-radius: var(--radius);
    padding: 24px 32px;
    margin-bottom: 2rem;
}

.verdict-box.compliant {
    border-color: var(--accent-green);
    background: rgba(34, 197, 94, 0.06);
}

.verdict-box.review {
    border-color: var(--accent-red);
    background: rgba(239, 68, 68, 0.06);
}

.verdict-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.verdict-text {
    font-size: 1.2rem;
    font-weight: 700;
}

.verdict-box.compliant .verdict-text {
    color: var(--accent-green);
}

.verdict-box.review .verdict-text {
    color: var(--accent-red);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.metric-value.flagged {
    color: var(--accent-red);
}

.metric-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

.results-subtitle {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}


/* ================================================================
   CELEBRITY GRID
   ================================================================ */

.celebrity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.celebrity-card {
    background: var(--bg-card);
    border: 1px solid var(--accent-red);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}

.celebrity-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.celebrity-card .celeb-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}

.celebrity-card .celeb-conf {
    font-size: 12px;
    color: var(--text-muted);
}


/* ================================================================
   ALL FACES
   ================================================================ */

.expand-btn {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 14px;
}

.faces-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.face-card {
    text-align: center;
}

.face-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}

.face-card .face-label {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
    line-height: 1.3;
}


/* ================================================================
   REPORTS
   ================================================================ */

.report-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.report-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.report-hints {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.report-hints span {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}


/* ================================================================
   FOOTER
   ================================================================ */

.app-footer {
    margin-top: auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
}

.app-footer a {
    color: var(--text-dim);
    text-decoration: none;
}

.app-footer a:hover {
    color: var(--text-muted);
}

.app-hero-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.app-hero-logo img {
    width: 160px;
    height: auto;
}

.app-footer-logo {
    height: 28px;
    width: auto;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.app-footer-logo:hover {
    opacity: 0.7;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .app-container {
        padding: 1rem;
    }

    .video-layout {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faces-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .report-buttons,
    .report-hints {
        grid-template-columns: 1fr;
    }

    .celebrity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .app-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}


/* ================================================================
   INLINE ICONS
   ================================================================ */

.icon-inline {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 4px;
}

.icon-inline svg {
    display: block;
}

.file-preview-icon {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.file-preview-icon svg {
    display: block;
}

.log-line svg {
    display: inline;
    vertical-align: middle;
    margin-right: 3px;
}

.face-label svg {
    display: inline;
    vertical-align: middle;
    margin-right: 2px;
}
