/* === VYRALZ BASE CSS === */
/* Shared styles for ALL pages (app + public) */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scrollbar-width: none; }

/* --- CSS Variables --- */
:root {
    --bg: #050507;
    --bg-card: rgba(255,255,255,0.03);
    --bg-card-hover: rgba(255,255,255,0.06);
    --bg-input: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --border-focus: rgba(155,89,182,0.5);
    --red: #FF3B30;
    --red-hover: #FF5147;
    --red-glow: rgba(255,59,48,0.4);
    --red-dim: rgba(255,59,48,0.12);
    --accent: #FF3B30;
    --accent-hover: #FF5147;
    --accent-dim: rgba(255,59,48,0.12);
    --primary-from: #FF3B30;
    --primary-to: #9b59b6;
    --primary-from-hover: #FF5147;
    --primary-to-hover: #a86bc5;
    --purple: #9b59b6;
    --purple-dim: rgba(155,89,182,0.12);
    --orange: #FF9500;
    --text: #f0f0f2;
    --text-dim: #8a8a8e;
    --text-muted: #48484a;
    --green: #30D158;
    --green-dim: rgba(48,209,88,0.12);
    --yellow: #FFD60A;
    --yellow-dim: rgba(255,214,10,0.12);
    --blue: #0A84FF;
    --blue-dim: rgba(10,132,255,0.12);
    --cyan: #06b6d4;
    --pink: #ec4899;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* --- Body Base --- */
body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* --- APP TYPOGRAPHY SCALE --- */
h1, h2, .logo, .stat-value, .kpi-value {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}
h3, p, label {
    font-family: 'Poppins', sans-serif;
}
h1 { font-size: 2rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1.05rem; }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.08); }
}

/* --- Glass Card --- */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}

/* --- Badges --- */
.badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge-shorts { background: var(--red-dim); color: var(--red); }
.badge-completed { background: rgba(48,209,88,0.12); color: var(--green); }
.badge-extracted { background: rgba(255,149,0,0.12); color: var(--orange); }
.badge-generated { background: rgba(6,182,212,0.12); color: var(--cyan); }
.badge-hookz { background: rgba(255,149,0,0.08); color: var(--orange); }
.badge-failed { background: rgba(255,59,48,0.12); color: var(--red); }
.badge-style { background: rgba(160,120,255,0.1); color: rgba(180,140,255,0.9); }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.2s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-from) 0%, var(--primary-to) 100%);
    color: #fff;
    box-shadow: 0 0 20px rgba(255,59,48,0.25), 0 0 40px rgba(155,89,182,0.15);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-from-hover) 0%, var(--primary-to-hover) 100%);
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(255,59,48,0.35), 0 0 50px rgba(155,89,182,0.2);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-danger {
    background: transparent;
    color: var(--red);
    border: 1px solid rgba(255,59,48,0.3);
}
.btn-danger:hover {
    background: var(--red-dim);
    border-color: rgba(255,59,48,0.5);
}
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-hover); }

.btn-sm {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-sm-primary {
    background: linear-gradient(135deg, var(--primary-from) 0%, var(--primary-to) 100%);
    color: #fff;
}
.btn-sm-primary:hover {
    background: linear-gradient(135deg, var(--primary-from-hover) 0%, var(--primary-to-hover) 100%);
}
.btn-sm-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm-danger {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(255,59,48,0.2);
}
.btn-sm-danger:hover {
    background: var(--red);
    color: #fff;
}
.btn-sm-danger:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-sm-ghost:hover { border-color: var(--border-hover); color: var(--text); }

/* --- Forms --- */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.92rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.25s;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(255,59,48,0.08), 0 0 20px rgba(255,59,48,0.06);
}
.form-group input:disabled { opacity: 0.4; cursor: not-allowed; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

/* --- Language Toggle --- */
.lang-toggle {
    display: flex;
    gap: 0;
    background: rgba(255,255,255,0.06);
    border-radius: 50px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.08);
}
.lang-toggle a {
    padding: 6px 10px;
    border-radius: 50px !important;
    font-size: 0.8rem;
    text-decoration: none;
    color: rgba(255,255,255,0.4);
    transition: all 0.25s ease;
    line-height: 1;
}
.lang-toggle a.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
    box-shadow: 0 0 8px rgba(255,255,255,0.06);
}
.lang-toggle a:hover { color: #fff; }

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state a {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
}
.empty-state a:hover { color: var(--red-hover); }

/* --- Utility --- */
.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; color: var(--text-dim); }

/* --- Modal (vyConfirm) --- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
    background: #111114; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 32px; width: 90%; max-width: 440px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6); transform: scale(0.95) translateY(10px);
    transition: transform 0.25s; text-align: center;
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }
.modal-icon { font-size: 2.4rem; margin-bottom: 12px; }
.modal-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.2rem;
    font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em;
}
.modal-text { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-btn {
    padding: 10px 24px; border-radius: 10px; font-size: 0.85rem;
    font-weight: 600; font-family: 'Space Grotesk', 'Inter', sans-serif;
    cursor: pointer; border: none; transition: all 0.2s;
}
.modal-btn-cancel { background: rgba(255,255,255,0.06); color: var(--text-dim); }
.modal-btn-cancel:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.modal-btn-danger { background: var(--red); color: #fff; }
.modal-btn-danger:hover { background: var(--red-hover); }
.modal-btn-primary {
    background: linear-gradient(135deg, var(--primary-from) 0%, var(--primary-to) 100%);
    color: #fff;
}
.modal-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-from-hover) 0%, var(--primary-to-hover) 100%);
}

/* --- Messages --- */
.msg {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    margin-bottom: 16px;
    display: none;
}
.msg-success { background: rgba(48,209,88,0.08); border: 1px solid rgba(48,209,88,0.2); color: var(--green); }
.msg-error { background: rgba(255,59,48,0.08); border: 1px solid rgba(255,59,48,0.2); color: var(--red); }

/* --- Scrollbar (hidden but scrollable) --- */
html::-webkit-scrollbar { display: none; }

/* --- Selection --- */
::selection { background: rgba(255,59,48,0.3); color: #fff; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; }
}
