/* Moveflex Arena — Premium Design System */
:root {
    --accent: #17ffff;
    --accent-dim: rgba(23, 255, 255, 0.12);
    --accent-glow: rgba(23, 255, 255, 0.35);
    --bg: #030303;
    --bg-elevated: #0a0a0a;
    --bg-card: rgba(18, 18, 20, 0.72);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(23, 255, 255, 0.35);
    --text: #f4f4f5;
    --text-muted: #9ca3af;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #17ffff;
    --font: 'Outfit', system-ui, sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Animated background */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(23, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(23, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(100, 100, 255, 0.03) 0%, transparent 50%);
    animation: meshPulse 12s ease-in-out infinite alternate;
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

@keyframes meshPulse {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.page-shell { padding: 2rem 0 4rem; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.85rem 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #0ea5a5);
    color: #000;
    font-weight: 800;
    font-size: 0.75rem;
    border-radius: 10px;
    letter-spacing: -0.02em;
}

.logo-mark-sm { width: 28px; height: 28px; font-size: 0.65rem; border-radius: 8px; }
.logo-text { color: var(--text); }

.nav {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover { color: var(--accent); background: var(--accent-dim); }
.nav-link-muted { opacity: 0.7; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

.main-content { flex: 1; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}

.footer-copy { color: var(--text-muted); font-size: 0.85rem; }

/* Typography */
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 0.5rem; }
h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.lead { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 1.5rem; max-width: 540px; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.accent { color: var(--accent); }
.page-title { margin-bottom: 0.25rem; }
.page-subtitle { color: var(--text-muted); margin-bottom: 2rem; }

/* Cards */
.glass-card, .card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.glass-card:hover, .card-hover:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 40px rgba(23, 255, 255, 0.06);
}

.card-narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.card-medium { max-width: 560px; margin-left: auto; margin-right: auto; }

/* Hero */
.hero {
    position: relative;
    text-align: center;
    padding: 4rem 0 3rem;
    margin-bottom: 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: var(--accent-dim);
    border: 1px solid rgba(23, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); margin-bottom: 1rem; }
.hero .lead { margin: 0 auto 2rem; font-size: 1.15rem; }

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(23,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.countdown-unit {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    min-width: 72px;
    text-align: center;
}

.countdown-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.35rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 999px;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn:active { transform: translateY(0); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(23, 255, 255, 0.4);
}

.btn-secondary:hover {
    background: var(--accent-dim);
    box-shadow: 0 8px 24px rgba(23, 255, 255, 0.12);
}

.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35); }

.btn-glow {
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-group {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

.btn-block { width: 100%; }

/* Forms */
form { display: flex; flex-direction: column; gap: 1.15rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

textarea { min-height: 110px; resize: vertical; }

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.checkbox-row input { width: auto; margin-top: 0.2rem; accent-color: var(--accent); }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.payment-fields { display: none; animation: fadeIn 0.3s ease; }
.payment-fields.active { display: block; }

/* Alerts (inline) */
.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.alert-success { background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.35); color: #86efac; }
.alert-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; }
.alert-warning { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); color: #fcd34d; }
.alert-info { background: var(--accent-dim); border: 1px solid rgba(23, 255, 255, 0.3); color: var(--accent); }

/* Toasts */
.toast-root {
    position: fixed;
    top: 5rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
    max-width: 380px;
}

.toast {
    pointer-events: auto;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.toast.toast-out { animation: toastOut 0.3s ease forwards; }
.toast-success { background: rgba(10, 30, 15, 0.92); border-color: rgba(34, 197, 94, 0.4); color: #86efac; }
.toast-error { background: rgba(30, 10, 10, 0.92); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.toast-warning { background: rgba(30, 25, 10, 0.92); border-color: rgba(245, 158, 11, 0.4); color: #fcd34d; }
.toast-info { background: rgba(5, 20, 20, 0.92); border-color: rgba(23, 255, 255, 0.35); color: var(--accent); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(100%); }
}

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(0,0,0,0.3);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(23, 255, 255, 0.03); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-pending { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.badge-reviewed { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.badge-winner { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.badge-rejected { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.badge-draft { background: rgba(161,161,170,0.12); color: #d4d4d8; border: 1px solid rgba(161,161,170,0.25); }
.badge-open { background: rgba(23,255,255,0.12); color: var(--accent); border: 1px solid rgba(23,255,255,0.3); }
.badge-closed { background: rgba(161,161,170,0.12); color: #d4d4d8; border: 1px solid rgba(161,161,170,0.25); }
.badge-finished { background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.badge-default { background: rgba(161,161,170,0.12); color: #d4d4d8; }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.stat-card .num {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-card .lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Profile progress ring */
.profile-progress {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.progress-ring {
    position: relative;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
}

.progress-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }

.progress-ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 6; }
.progress-ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}

.checklist { list-style: none; }
.checklist li {
    padding: 0.65rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.checklist li:last-child { border-bottom: none; }

.check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.check-icon.done { background: rgba(34,197,94,0.15); color: var(--success); border: 1px solid rgba(34,197,94,0.35); }
.check-icon.todo { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }

/* Contest cards */
.contest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contest-card {
    position: relative;
    overflow: hidden;
}

.contest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.contest-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Steps / How it works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.step-card {
    padding: 1.5rem;
    position: relative;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    background: var(--accent-dim);
    border: 1px solid rgba(23,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    position: relative;
}

.empty-icon::before {
    content: '';
    width: 26px;
    height: 26px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    opacity: 0.45;
}

.error-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border: 2px solid rgba(239, 68, 68, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--error);
    line-height: 1;
}

.error-icon::before {
    content: '!';
}

.check-icon.done::before {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
}

.check-icon.todo::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
}

.link-external::after {
    content: '';
    display: inline-block;
    width: 0.5em;
    height: 0.5em;
    margin-left: 0.3em;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-0.06em);
    vertical-align: middle;
    opacity: 0.75;
}

.clip-remove {
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 400;
}

/* Success state */
.success-state {
    text-align: center;
    padding: 2rem 1rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(34,197,94,0.12);
    border: 2px solid rgba(34,197,94,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-icon::before {
    content: '';
    display: block;
    width: 14px;
    height: 22px;
    border-right: 3px solid var(--success);
    border-bottom: 3px solid var(--success);
    transform: rotate(45deg) translate(-2px, -3px);
}

@keyframes successPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Auth pages */
.auth-page { max-width: 440px; margin: 2rem auto; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { margin-bottom: 0.35rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }

/* Dashboard welcome */
.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.dashboard-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Admin */
.admin-body .site-header { background: rgba(0,0,0,0.85); }
.admin-body .logo-mark { background: linear-gradient(135deg, #6366f1, #17ffff); }

.filter-bar {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    align-items: flex-end;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.filter-bar select, .filter-bar input { width: auto; min-width: 160px; }

.inline-form { display: inline; }
.inline-form button { font-size: 0.78rem; padding: 0.35rem 0.65rem; }

.admin-action-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 140px;
}

.admin-action-form select,
.admin-action-form input[type="text"] {
    font-size: 0.78rem;
    padding: 0.4rem 0.6rem;
}

.admin-action-form label {
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

/* Error page */
.error-body { justify-content: center; align-items: center; }
.error-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.error-card { max-width: 480px; text-align: center; padding: 3rem 2rem; }

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-enter { animation: fadeIn 0.5s ease; }

code {
    background: rgba(255,255,255,0.06);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.85; }
a.link-muted { color: var(--text-muted); }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

/* Clip rows (submit form) */
.clip-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.clip-row { display: flex; gap: 0.5rem; align-items: center; }
.clip-row input { flex: 1; }
.clip-remove { min-width: 2.25rem; padding: 0.35rem 0.5rem; line-height: 1; }

/* Video embeds (admin) */
.video-embed {
    position: relative;
    width: 100%;
    max-width: 325px;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}
.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.video-embed-youtube { aspect-ratio: 9 / 16; max-width: 280px; }
.video-embed-tiktok { max-width: 325px; }
.video-embed-instagram { max-width: 325px; }

.submission-list { display: flex; flex-direction: column; gap: 1.25rem; }
.submission-card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
}
.submission-card-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.25rem;
    align-items: start;
}
.submission-notes {
    margin: 0.75rem 0 0;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 3px solid var(--accent);
}
.submission-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.submission-preview { min-width: 200px; }
.submission-card-main-stacked { grid-template-columns: 1fr; }
.submission-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.submission-clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}
.submission-clip-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.clip-platform-badge { align-self: flex-start; }
.existing-clips-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.existing-clip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
}
.existing-clips-block {
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.channel-action-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.channel-action-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}
.channel-action-option input {
    margin-top: 0.15rem;
}
.channel-mismatch-block {
    padding: 1rem;
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: 10px;
}
.submission-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        gap: 0.25rem;
    }

    .nav.open { display: flex; }

    .nav-link { width: 100%; text-align: left; padding: 0.75rem 1rem; }

    .site-header { position: relative; }
    .site-header .header-inner { position: relative; }

    .hero { padding: 2.5rem 0 2rem; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .dashboard-header { flex-direction: column; }
    .toast-root { left: 1rem; right: 1rem; max-width: none; }
    .profile-progress { flex-direction: column; text-align: center; }
    .submission-card-main { grid-template-columns: 1fr; }
    .submission-preview { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
