/* ============================================================
   KLATR — MAIN CSS DESIGN SYSTEM
   assets/css/main.css
   Dark energetic theme — built for video
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --bg-primary:    #0a0a0f;
    --bg-secondary:  #12121a;
    --bg-card:       #1a1a26;
    --bg-hover:      #22223a;
    --border:        #2a2a40;
    --border-light:  #3a3a55;

    --accent:        #ff3d5a;
    --accent-dark:   #cc1f3a;
    --accent-glow:   rgba(255, 61, 90, 0.25);
    --gold:          #ffb800;
    --gold-glow:     rgba(255, 184, 0, 0.25);
    --green:         #00e676;
    --blue:          #448aff;

    --text-primary:  #f0f0ff;
    --text-secondary:#9090b0;
    --text-muted:    #5a5a78;

    --font-display:  'Bebas Neue', sans-serif;
    --font-body:     'Outfit', sans-serif;

    --radius-sm:     6px;
    --radius-md:     12px;
    --radius-lg:     20px;
    --radius-full:   999px;

    --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
    --shadow-accent: 0 4px 24px var(--accent-glow);
    --shadow-gold:   0 4px 24px var(--gold-glow);

    --transition:    all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height:    64px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
input, textarea, select { font-family: var(--font-body); }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
.display { font-family: var(--font-display); letter-spacing: 0.02em; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
}
.nav-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-shadow: 0 0 30px var(--accent-glow);
    flex-shrink: 0;
}
.nav-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}
.nav-search input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 8px 16px 8px 40px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}
.nav-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.nav-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-notif {
    position: relative;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: var(--transition);
}
.nav-notif:hover { border-color: var(--accent); color: var(--accent); }
.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.nav-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}
.nav-avatar:hover { border-color: var(--accent); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 30px var(--accent-glow);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-gold {
    background: var(--gold);
    color: #000;
    font-weight: 700;
    box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 30px var(--gold-glow);
}
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }

/* ── Form Elements ────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
}
.form-select:focus { outline: none; border-color: var(--accent); }
.form-error {
    color: var(--accent);
    font-size: 0.8rem;
    margin-top: 6px;
}
.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 6px;
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid;
}
.alert-error   { background: rgba(255,61,90,0.1);  border-color: var(--accent); color: #ff8099; }
.alert-success { background: rgba(0,230,118,0.1);  border-color: var(--green);  color: var(--green); }
.alert-info    { background: rgba(68,138,255,0.1); border-color: var(--blue);   color: var(--blue); }

/* ── Prize Pool Banner ────────────────────────────────────── */
.prize-pool-banner {
    background: linear-gradient(135deg, #1a1a10 0%, #2a2000 100%);
    border: 1px solid rgba(255,184,0,0.3);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.prize-pool-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,184,0,0.05), transparent);
    animation: shimmer 3s infinite;
}
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.pool-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.pool-amount {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
    letter-spacing: 0.02em;
}
.pool-link {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--gold);
    opacity: 0.7;
    transition: var(--transition);
}
.pool-link:hover { opacity: 1; }

/* ── Video Feed ───────────────────────────────────────────── */
.feed-container {
    max-width: 680px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 24px) 16px 100px;
}
.video-feed { display: flex; flex-direction: column; gap: 16px; }

/* ── Video Card ───────────────────────────────────────────── */
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.video-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.video-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 10px;
}
.video-card-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.video-card-username {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.video-card-username:hover { color: var(--accent); }
.video-card-time {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.video-card-follow {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    transition: var(--transition);
}
.video-card-follow:hover { opacity: 0.7; }
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    max-height: 500px;
    background: #000;
    overflow: hidden;
}
.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}
.video-duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}
.ad-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,184,0,0.9);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}
.video-card-footer {
    padding: 12px 16px 14px;
}
.video-card-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.video-card-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.video-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.video-action-btn:hover { color: var(--accent); }
.video-action-btn.liked { color: var(--accent); }
.video-action-btn span { font-size: 1.1rem; }
.video-report-btn {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.video-report-btn:hover { color: var(--accent); }

/* ── Processing State ─────────────────────────────────────── */
.video-processing {
    aspect-ratio: 9/16;
    max-height: 500px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
}
.processing-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Page wrapper for non-feed pages ──────────────────────── */
.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + 32px) 24px 80px;
}
.page-title {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 32px;
}

/* ── Auth pages ───────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,61,90,0.08) 0%, transparent 70%);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}
.auth-logo {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 30px var(--accent-glow);
}
.auth-tagline {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}
.auth-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 20px 0;
    position: relative;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 24px);
    height: 1px;
    background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 24px;
}
.auth-switch a { color: var(--accent); font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    margin-top: auto;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
    align-items: center;
}
.footer-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--accent);
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.footer-links a:hover { color: var(--text-primary); }
.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 100%;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

/* ── Utility ──────────────────────────────────────────────── */
.text-accent   { color: var(--accent); }
.text-gold     { color: var(--gold); }
.text-muted    { color: var(--text-muted); }
.text-center   { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }

/* ── Loading overlay ──────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,15,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.loading-overlay.active { opacity: 1; pointer-events: all; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    .nav { padding: 0 16px; gap: 12px; }
    .nav-search { display: none; }
    .feed-container { padding-top: calc(var(--nav-height) + 16px); }
    .auth-card { padding: 28px 20px; }
    .page-title { font-size: 2.2rem; }
}