/* ═══════════════════════════════════════════
   Adam Cada — Global Styles
   Premium black / Apple iOS style
   ═══════════════════════════════════════════ */

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

:root {
    --bg: #000000;
    --bg-deep: #000000;
    --surface: rgba(255,255,255,0.06);
    --surface-hover: rgba(255,255,255,0.10);
    --card: #111111;
    --card-hover: #1a1a1a;
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.18);
    --text: #f5f5f7;
    --text2: #86868b;
    --text3: #3a3a3c;
    --accent: #c8102e;
    --accent-hover: #e01535;
    --accent-glow: rgba(200,16,46,0.22);
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff453a;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(200,16,46,0.045) 0%, #000 60%);
    background-color: #000;
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    position: relative;
}

/* Animated crimson radial gradient — scroll-reactive */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 70% 50% at 20% 15%, rgba(200,16,46,0.05) 0%, transparent 60%),
        radial-gradient(ellipse 55% 40% at 80% 85%, rgba(150,8,25,0.04) 0%, transparent 55%),
        radial-gradient(ellipse 60% 45% at var(--gx, 50%) var(--gy, 30%), rgba(200,16,46,0.035) 0%, transparent 50%);
    animation: bgPulse 22s ease-in-out infinite alternate;
    transition: opacity 0.8s ease;
}
@keyframes bgPulse {
    0%   { opacity: 0.5; }
    50%  { opacity: 0.8; }
    100% { opacity: 1.0; }
}

/* Grain texture overlay */
body::after {
    content: '';
    position: fixed; inset: 0; z-index: 9999; pointer-events: none;
    opacity: 0.032;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Ensure page content sits above body::before */
.page-content, .topbar, .auth-page, .review-layout, nav { position: relative; z-index: 1; }

/* Prevent iOS zoom on input focus (font-size >= 16px handles it) */
input, select, textarea { font-size: 16px; }

/* iOS video inline playback */
video { -webkit-playsinline: true; }

a { color: var(--text2); text-decoration: none; }
a:hover { color: var(--text); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOPBAR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    background: rgba(0,0,0,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.topbar-link {
    font-size: 15px;
    color: var(--text2);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.topbar-link:hover { color: var(--text); }

/* Mobile hamburger menu */
.topbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.topbar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    border-radius: 1px;
    transition: all 0.3s;
}
.topbar-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.topbar-toggle.open span:nth-child(2) { opacity: 0; }
.topbar-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
    white-space: nowrap;
    color: #fff;
    background: var(--accent);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }

.btn-ghost {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); box-shadow: none; }

.btn-danger { background: var(--red); }
.btn-danger:hover { background: #dc2626; box-shadow: 0 4px 20px rgba(239,68,68,0.3); }

.btn-green { background: var(--green); }
.btn-green:hover { background: #16a34a; box-shadow: 0 4px 20px rgba(34,197,94,0.3); }
.btn-full { width: 100%; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARDS (admin / dashboard)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: all 0.35s ease;
}
.card:hover {
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.06);
}
.card-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.015em;
}
.card-meta {
    font-size: 14px;
    color: var(--text2);
    margin-bottom: 10px;
    line-height: 1.5;
}
.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GRIDS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.grid-stats { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FORMS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.form-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 32px;
}
.form-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    /* Kill browser blue autofill */
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Override browser autofill colors (Chrome / Safari blue) ── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 9999px #0a0a0a inset !important;
    box-shadow: 0 0 0 9999px #0a0a0a inset !important;
    -webkit-text-fill-color: #f5f5f7 !important;
    caret-color: #f5f5f7;
    border-color: var(--accent) !important;
    background-color: transparent !important;
    transition: background-color 600000s ease-in-out 0s;
}
textarea { min-height: 90px; resize: vertical; }

input[type="file"] { font-size: 14px; color: var(--text2); }
input[type="file"]::file-selector-button {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    margin-right: 12px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STATUS BADGES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}
.badge-review { background: rgba(245,158,11,0.12); color: var(--orange); }
.badge-approved { background: rgba(34,197,94,0.12); color: var(--green); }
.badge-changes { background: rgba(239,68,68,0.12); color: var(--red); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STAT CARDS (admin dashboard)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.stat-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    padding: 28px;
}
.stat-number { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.stat-label { font-size: 14px; color: var(--text2); margin-top: 4px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGE LAYOUT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}
.section-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABS (admin)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.tabs {
    display: flex;
    gap: 6px;
    padding: 14px 24px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tab {
    padding: 10px 20px;
    border-radius: 10px;
    color: var(--text2);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.tab.active { color: #f5f5f7; background: rgba(255,255,255,0.1); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   EMPTY STATE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.empty-state { text-align: center; padding: 80px 24px; }
.empty-title { font-size: 24px; font-weight: 600; margin-bottom: 12px; }
.empty-text { font-size: 16px; color: var(--text2); max-width: 440px; margin: 0 auto; line-height: 1.6; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACTIVITY FEED (admin dashboard)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.activity-feed {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    padding: 28px;
}
.activity-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 15px;
}
.activity-item:last-child { border: none; }
.activity-time { font-size: 13px; color: var(--text2); margin-top: 4px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AUTH PAGES (centered login)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    /* Explicit dark bg — cannot rely on body gradient alone */
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(200,16,46,0.06) 0%, #000 60%);
    background-color: #000;
}
.auth-box {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}
.auth-title { font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-subtitle { font-size: 15px; color: var(--text2); text-align: center; margin-bottom: 28px; }
.auth-box input { margin-bottom: 14px; }
.auth-box .btn { width: 100%; border-radius: 12px; }
.auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text2);
    text-align: center;
    line-height: 1.6;
}
.error-msg { color: var(--red); font-size: 14px; text-align: center; margin-bottom: 14px; }

/* Auth tabs */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text2);
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-tab.active {
    background: var(--accent);
    color: #fff;
}
.auth-tab:hover:not(.active) { color: var(--text); }

/* Avatar Picker */
.avatar-picker-section {
    margin: 20px 0 24px;
}
.avatar-picker-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 12px;
    text-align: center;
}
.avatar-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.avatar-option {
    cursor: pointer;
    text-align: center;
}
.avatar-option input { display: none; }
.avatar-option-visual {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    border: 3px solid transparent;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.avatar-option-icon { font-size: 24px; }
.avatar-option-label { font-size: 11px; color: var(--text2); }
.avatar-option input:checked + .avatar-option-visual {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 4px 16px rgba(0,0,0,0.4);
    transform: scale(1.1);
}
.avatar-option input:checked ~ .avatar-option-label { color: var(--text); font-weight: 600; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ALERTS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.alert { padding: 14px 20px; border-radius: var(--radius); font-size: 15px; margin-bottom: 20px; }
.alert-success { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.15); }
.alert-error { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.15); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VIDEO THUMBNAIL (admin cards)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text2);
    font-size: 14px;
    margin-bottom: 16px;
    overflow: hidden;
}
.video-thumb video, .video-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PORTFOLIO HOMEPAGE (Lovable-inspired)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.hero {
    padding: 140px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(200,16,46,0.07) 0%, rgba(200,16,46,0.02) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-hover);
    margin-bottom: 24px;
    position: relative;
}
.hero h1 {
    font-size: clamp(48px, 9vw, 88px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 24px;
    position: relative;
    background: linear-gradient(135deg, #ffffff 60%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: 19px;
    color: var(--text2);
    max-width: 500px;
    margin: 0 auto 36px;
    position: relative;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    position: relative;
}

/* Selected Work section */
.work-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 120px;
}
.work-header {
    margin-bottom: 48px;
}
.work-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}
.work-subtitle {
    font-size: 18px;
    color: var(--text2);
}

/* Project cards (Lovable style) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
.project-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.4s ease;
}
.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.project-media {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-media video,
.project-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    transition: transform 0.6s ease;
}
.project-card:hover .project-media video,
.project-card:hover .project-media img {
    transform: scale(1.03);
}
.project-body { padding: 24px 28px 28px; }
.project-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.015em;
}
.project-desc {
    font-size: 15px;
    color: var(--text2);
    line-height: 1.65;
    margin-bottom: 20px;
}
.project-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.project-thumb-img {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.04);
}
.project-thumb-img img { width: 100%; height: 100%; object-fit: cover; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   REVIEW PAGE LAYOUT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.review-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
.review-video-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    min-width: 0;
}
.review-video-wrap {
    flex: 1;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.review-video-wrap video,
.review-video-wrap iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Timeline */
.timeline-section {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius);
}
.timeline-bar {
    position: relative;
    height: 48px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
}
.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s linear;
}
.timeline-playhead {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: #fff;
    pointer-events: none;
    border-radius: 2px;
}
.timeline-preview {
    position: absolute;
    bottom: 60px;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}
.timeline-preview.show { opacity: 1; }
.preview-thumb {
    width: 180px;
    height: 100px;
    background: rgba(17,17,17,0.95);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.07);
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.preview-thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-time {
    margin-top: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.07);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   COMMENTS PANEL
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.comments-panel {
    width: 380px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-left: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
}
.panel-header { padding: 20px; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.comments-list { flex: 1; overflow-y: auto; padding: 16px; }
.comment-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    font-size: 15px;
}
.comment-card.important { border-left: 3px solid var(--orange); }
.comment-time { font-size: 14px; font-weight: 700; color: var(--accent-hover); cursor: pointer; }
.comment-time:hover { text-decoration: underline; }
.comment-text { margin-top: 6px; line-height: 1.5; }
.comment-author { font-size: 13px; color: var(--text2); margin-top: 6px; }
.comment-input { padding: 16px; border-top: 1px solid var(--border); }
.comment-input textarea { min-height: 70px; margin-bottom: 10px; }
.comment-input .btn { width: 100%; border-radius: 12px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY (Pixieset-style)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.gallery-hero { text-align: center; padding: 100px 24px 40px; }
.gallery-hero h1 {
    font-size: clamp(28px, 6vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}
.gallery-hero p { color: var(--text2); font-size: 16px; }
.gallery-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* Album card with blurred cover bg */
.album-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    text-decoration: none;
    color: #fff;
    transition: all 0.35s ease;
    border: 1px solid var(--border);
}
.album-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,0.4); border-color: var(--border-hover); color: #fff; }
.album-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}
.album-card:hover .album-card-bg { transform: scale(1.05); }
.album-card-content {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0 -24px -24px;
    padding: 16px 24px 18px;
}
.album-card-title {
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    margin-bottom: 4px;
}
.album-card-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
}

.gallery-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px 80px;
    columns: 4;
    column-gap: 12px;
}
.gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img { width: 100%; display: block; }
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 60%, rgba(0,0,0,0.5));
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: flex-end;
    padding: 12px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-stats { display: flex; gap: 12px; font-size: 13px; font-weight: 600; color: #fff; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.97);
    display: none;
    flex-direction: column;
}
.lightbox.open { display: flex; }
.lb-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    z-index: 10;
    flex-shrink: 0;
}
.lb-counter { font-size: 14px; color: var(--text2); }
.lb-actions { display: flex; gap: 8px; }
.lb-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lb-btn:hover { background: rgba(255,255,255,0.14); }
.lb-btn.liked { color: #ff375f; }
.lb-main { flex: 1; display: flex; align-items: center; position: relative; min-height: 0; overflow: hidden; }
.lb-image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
    min-width: 0;
    height: 100%;
}
.lb-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-nav:hover { background: rgba(255,255,255,0.15); }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
.lb-sidebar {
    width: 360px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.95);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.lb-sidebar.hidden { display: none; }
.lb-sidebar-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: 600; }
.lb-comments { flex: 1; overflow-y: auto; padding: 16px; }
.lb-comment { margin-bottom: 14px; font-size: 14px; }
.lb-comment-author { font-weight: 600; margin-bottom: 2px; }
.lb-comment-text { color: var(--text2); line-height: 1.5; }
.lb-comment-time { font-size: 12px; color: rgba(255,255,255,0.25); margin-top: 2px; }
.lb-comment-input { padding: 14px; border-top: 1px solid var(--border); }
.lb-comment-input input { margin-bottom: 8px; }
.lb-comment-input textarea { min-height: 60px; margin-bottom: 8px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GAMIFICATION — PROFILE HERO
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.profile-hero {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(200,16,46,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
}
.profile-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.profile-info { flex: 1; position: relative; z-index: 1; min-width: 0; }
.profile-name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.profile-level {
    font-size: 14px;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 6px;
}
.profile-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(200,16,46,0.15);
    color: var(--accent-hover);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

/* XP Bar */
.xp-section { margin-top: 16px; }
.xp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.xp-label { font-size: 13px; font-weight: 600; color: var(--text2); }
.xp-value { font-size: 13px; color: var(--accent-hover); font-weight: 700; }
.xp-bar {
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.xp-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #8b0020, var(--accent), var(--accent-hover));
    background-size: 200% 100%;
    animation: xpShimmer 3s ease-in-out infinite;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes xpShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.xp-remaining { font-size: 11px; color: var(--text2); margin-top: 4px; }

/* Profile stats row */
.profile-stats {
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.profile-stat {
    text-align: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 80px;
}
.profile-stat-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.profile-stat-label {
    font-size: 11px;
    color: var(--text2);
    margin-top: 2px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GAMIFICATION — RELATIONSHIP METER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.relationship-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    padding: 24px;
}
.relationship-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.relationship-title {
    font-size: 16px;
    font-weight: 700;
}
.relationship-score {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.relationship-bar {
    height: 10px;
    background: var(--surface);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}
.relationship-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.relationship-bar-fill.score-low { background: linear-gradient(90deg, #ef4444, #f59e0b); }
.relationship-bar-fill.score-mid { background: linear-gradient(90deg, #f59e0b, #22c55e); }
.relationship-bar-fill.score-high { background: linear-gradient(90deg, #22c55e, #34d399); }
.relationship-bar-fill.score-max { background: linear-gradient(90deg, #ff9f0a, #c8102e); }
.relationship-label {
    font-size: 12px;
    color: var(--text2);
    margin-top: 8px;
    text-align: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GAMIFICATION — BADGES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.badges-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 24px;
}
.badges-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(80px, calc(25% - 12px)), 1fr));
    gap: 12px;
}
.badge-item {
    text-align: center;
    padding: 12px 4px;
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: default;
    position: relative;
}
.badge-item.earned {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
}
.badge-item.locked {
    opacity: 0.3;
    filter: grayscale(1);
}
.badge-item-icon { font-size: 28px; margin-bottom: 4px; }
.badge-item-label { font-size: 11px; color: var(--text2); line-height: 1.3; }
.badge-item.earned .badge-item-label { color: var(--text); }
.badge-item:hover .badge-tooltip {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
    pointer-events: auto;
}
.badge-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateY(4px) translateX(-50%);
    background: rgba(0,0,0,0.95);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 10;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GAMIFICATION — MILESTONE PROGRESS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.milestone-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin: 20px 0 10px;
    padding: 0 10px;
}
.milestone-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 3px;
    background: var(--surface);
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 0;
}
.milestone-track-fill {
    position: absolute;
    top: 50%;
    left: 10px;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--accent));
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 1;
    transition: width 0.8s ease;
}
.milestone-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}
.milestone-dot.done {
    border-color: var(--green);
    background: rgba(34,197,94,0.15);
}
.milestone-dot.active {
    border-color: var(--accent);
    background: rgba(200,16,46,0.15);
    animation: milestonePulse 2s ease-in-out infinite;
}
@keyframes milestonePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200,16,46,0.35); }
    50% { box-shadow: 0 0 0 8px rgba(200,16,46,0); }
}
.milestone-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
}
.milestone-label {
    font-size: 10px;
    color: var(--text2);
    text-align: center;
    width: 60px;
}
.milestone-label.active { color: var(--accent-hover); font-weight: 600; }
.milestone-label.done { color: var(--green); }

/* Project completion reward */
.completion-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(200,16,46,0.1));
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    margin-top: 8px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GAMIFICATION — TOAST NOTIFICATIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.xp-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
    max-width: 280px;
    max-height: 60vh;
    overflow-y: auto;
}
.xp-toast {
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), toastFadeOut 0.3s ease 3.2s forwards;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    pointer-events: auto;
    min-width: 220px;
    flex-shrink: 0;
}
.xp-toast-icon { font-size: 22px; }
.xp-toast-text { font-size: 14px; font-weight: 600; }
.xp-toast-xp { font-size: 14px; font-weight: 700; color: var(--accent-hover); margin-left: auto; }
.xp-toast.level-up {
    border-color: rgba(168,85,247,0.3);
    box-shadow: 0 8px 32px rgba(168,85,247,0.2);
}
.xp-toast.badge-earned {
    border-color: rgba(245,158,11,0.3);
    box-shadow: 0 8px 32px rgba(245,158,11,0.2);
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(60px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastFadeOut {
    to { opacity: 0; transform: translateX(40px); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GAMIFICATION — DASHBOARD LAYOUT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.dash-sidebar-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-bottom: 32px;
}
.dash-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Welcome overlay */
.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: welcomeFadeIn 0.5s ease;
}
.welcome-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    max-width: 420px;
    animation: welcomePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.welcome-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.welcome-title { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.welcome-text { font-size: 15px; color: var(--text2); margin-bottom: 24px; line-height: 1.6; }
@keyframes welcomeFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes welcomePopIn { from { opacity: 0; transform: scale(0.85) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

@media (max-width: 1100px) {
    .gallery-grid { columns: 3; }
    .dash-sidebar-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .review-layout {
        flex-direction: column;
        height: 100dvh;
        overflow: hidden;
    }
    .review-video-col {
        padding: 8px 12px 0;
        flex: none;
        overflow: hidden;
    }
    .review-video-wrap {
        aspect-ratio: 16/9;
        flex: none;
        border-radius: 12px;
    }
    .review-video-wrap video,
    .review-video-wrap iframe { object-fit: contain; }

    /* Mobile tab strip */
    .review-mobile-tabs {
        display: flex;
        margin: 8px 12px 0;
        background: rgba(255,255,255,0.04);
        border-radius: 10px;
        padding: 3px;
        gap: 2px;
        flex-shrink: 0;
    }
    .review-mobile-tab {
        flex: 1;
        padding: 8px;
        border: none;
        border-radius: 8px;
        background: none;
        color: rgba(245,245,247,0.55);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }
    .review-mobile-tab.active {
        background: rgba(255,255,255,0.1);
        color: #f5f5f7;
    }

    /* Timeline section hidden by default on mobile, shown in video tab */
    .timeline-section {
        margin-top: 8px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    /* Comments panel fills remaining height */
    .comments-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
        flex: 1;
        overflow: hidden;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .comments-list {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 12px;
    }

    /* Sticky comment input at bottom */
    .comment-input {
        flex-shrink: 0;
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
        background: rgba(0,0,0,0.8);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255,255,255,0.07);
    }
    .comment-input textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Hamburger menu */
    .topbar-toggle { display: block; }
    .topbar-actions {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(0,0,0,0.97);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 8px 0;
        z-index: 99;
    }
    .topbar-actions.open { display: flex; }
    .topbar-actions .topbar-link,
    .topbar-actions .btn,
    .topbar-actions form {
        width: 100%;
        text-align: center;
    }
    .topbar-actions .topbar-link {
        display: block;
        padding: 14px 24px;
        font-size: 16px;
        border-bottom: 1px solid var(--border);
    }
    .topbar-actions .btn {
        margin: 12px 24px;
        width: calc(100% - 48px);
    }
    .topbar-actions form { padding: 8px 24px 12px; }
    .topbar-actions form .btn { width: 100%; margin: 0; }
    .topbar-inner { position: relative; }

    /* Layout */
    .topbar-inner { padding: 14px 16px; }
    .logo { font-size: 18px; }
    .page-content { padding: 24px 16px 48px; }
    .section-title { font-size: 24px; }
    .form-row { grid-template-columns: 1fr; }
    .tabs { padding: 12px 16px; gap: 4px; }
    .tab { padding: 8px 14px; font-size: 14px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }

    /* Hero */
    .hero { padding: 100px 16px 60px; }
    .hero-sub { font-size: 17px; }
    .hero-buttons { flex-direction: column; align-items: center; }

    /* Cards & forms */
    .stat-number { font-size: 32px; }
    .form-card { padding: 20px; }
    .card { padding: 20px; }
    .auth-box { padding: 28px 24px; }

    /* Gallery */
    .gallery-grid { columns: 2; column-gap: 8px; }
    .gallery-item { margin-bottom: 8px; }
    .gallery-cover-content { padding: 80px 16px 32px; }

    /* Lightbox */
    .lb-image-wrap { padding: 0 12px; }
    .lb-sidebar {
        position: fixed;
        inset: 0;
        width: 100%;
        z-index: 10;
        border-left: none;
        border-radius: 0;
    }
    .lb-sidebar.hidden { display: none; }
    .lb-sidebar .lb-comment-input {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    }
    .lb-topbar { padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top, 0)); }
    .lb-btn { padding: 6px 12px; font-size: 13px; }
    .lb-nav { width: 36px; height: 36px; font-size: 18px; }
    .lb-nav.prev { left: 8px; }
    .lb-nav.next { right: 8px; }
    .work-section { padding: 40px 16px 80px; }

    /* Booking */
    .booking-page { padding: 24px 16px 60px; }
    .booking-form-section { padding: 20px; }
    .cal-day { font-size: 13px; border-radius: 8px; }

    /* Review page — iPhone optimized */
    .timeline-bar { height: 40px; border-radius: 8px; } /* Taller touch target */
    .timeline-controls { gap: 6px; flex-wrap: nowrap; justify-content: space-between; }
    .timeline-controls button {
        padding: 0 12px;
        font-size: 13px;
        min-height: 40px; /* 40px minimum touch target (Apple HIG) */
        min-width: 56px;
        border-radius: 8px;
    }
    .timeline-preview { display: none; }
    .comment-input textarea {
        min-height: 44px;
        max-height: 120px;
        font-size: 16px; /* Prevent iOS zoom */
    }

    /* Reaction stamps — bigger on mobile */
    .reaction-stamp {
        padding: 9px 13px;
        font-size: 20px;
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Approve button full width on mobile */
    .panel-header .btn-green { width: 100%; }

    /* Breadcrumb spacing on mobile */
    .breadcrumbs { padding: 0 12px; margin: 8px 0 4px; }

    /* Leaderboard */
    .leaderboard-stats { display: none; }
    .leaderboard-thumb { width: 44px; height: 28px; }

    /* Loop feed */
    .loop-item { flex: 0 0 160px; }

    /* Unboxing */
    .unbox-card { min-height: 200px; }
    .unbox-title { font-size: 18px; }

    /* Gamification */
    .profile-hero { flex-direction: column; text-align: center; gap: 16px; padding: 24px; }
    .profile-stats { justify-content: center; }
    .profile-level { justify-content: center; }
    .dash-sidebar-grid { grid-template-columns: 1fr; }
    .badge-grid { grid-template-columns: repeat(4, 1fr); }
    .avatar-picker-grid { grid-template-columns: repeat(3, 1fr); }
    .xp-toast-container { right: 12px; left: 12px; top: calc(70px + env(safe-area-inset-top, 0)); }
    .xp-toast { min-width: auto; }
    .milestone-label { width: auto; font-size: 9px; }
    .auth-box { max-width: 100%; }
    .welcome-card { padding: 32px 24px; max-width: calc(100% - 32px); }
    .milestone-dot { width: 28px; height: 28px; font-size: 12px; }
}

/* iPhone-specific safe area & gesture bar */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .review-layout { height: 100dvh; }
    .comment-input {
        padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
    }
    .review-video-col {
        padding-top: max(8px, calc(env(safe-area-inset-top)));
    }
}

/* iOS keyboard accommodation — shrink layout when keyboard open */
@media (max-height: 500px) and (max-width: 900px) {
    .review-video-wrap { aspect-ratio: unset; height: 180px; }
    .timeline-section { display: none; }
    .comments-panel { flex: 1; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 38px; }
    .grid-stats { grid-template-columns: 1fr 1fr; }
    .gallery-grid { columns: 2; column-gap: 6px; }
    .gallery-item { margin-bottom: 6px; border-radius: 6px; }
    .loop-item { flex: 0 0 140px; }
    .leaderboard-row { gap: 10px; padding: 10px 0; }
    .leaderboard-rank { font-size: 15px; min-width: 24px; }
    .cal-day { font-size: 12px; border-width: 1px; }
    .approve-success { padding: 32px 24px; }
    .approve-success h2 { font-size: 24px; }
    .upload-modal { min-width: auto; padding: 32px 24px; }

    /* Gamification — small phones */
    .profile-hero { padding: 20px; }
    .profile-avatar { width: 64px; height: 64px; font-size: 30px; }
    .profile-name { font-size: 20px; }
    .profile-stats { gap: 8px; flex-wrap: wrap; }
    .profile-stat { min-width: 60px; padding: 10px 12px; }
    .profile-stat-value { font-size: 18px; }
    .badge-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .badge-item-icon { font-size: 22px; }
    .badge-item { padding: 8px 2px; }
    .avatar-picker-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .avatar-option-visual { width: 44px; height: 44px; }
    .avatar-option-icon { font-size: 20px; }
    .milestone-dot { width: 26px; height: 26px; font-size: 11px; }
    .milestone-label { font-size: 8px; }
    .relationship-score { font-size: 24px; }

    /* Timeline controls — larger touch targets */
    .timeline-controls { flex-wrap: nowrap; gap: 6px; }
    .timeline-controls button { padding: 8px 14px; font-size: 13px; min-height: 44px; min-width: 52px; }

    /* Dashboard — project cards touch feedback */
    .project-card:active { transform: scale(0.98); transition: transform 0.1s; }
    .album-card:active { transform: scale(0.98); transition: transform 0.1s; }
    .btn:active { transform: scale(0.96); }

    /* Topbar safe area */
    .topbar { padding-top: env(safe-area-inset-top, 0); }
    .topbar-inner { min-height: 52px; }

    /* Gallery — bigger tap targets for like/fav */
    .like-btn, .fav-btn { min-width: 44px; min-height: 44px; }

    /* Page content bottom safe area */
    .page-content { padding-bottom: calc(48px + env(safe-area-inset-bottom, 0)); }

    /* Auth box safe areas */
    .auth-page { padding-top: env(safe-area-inset-top, 0); padding-bottom: env(safe-area-inset-bottom, 0); }

    /* Lightbox — better on narrow screens */
    .lb-image-wrap { padding: 0 8px; }
    .lb-nav { width: 32px; height: 32px; font-size: 16px; }
    .lb-nav.prev { left: 2px; }
    .lb-nav.next { right: 2px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SCROLLBAR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY EDITOR (admin)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 24px;
}
.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}
.photo-item:hover { border-color: var(--accent); }
.photo-item.is-cover { border-color: var(--green); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: flex-end;
    padding: 10px;
    gap: 6px;
}
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-overlay button, .photo-overlay .pbtn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
}
.photo-overlay .pbtn-cover { background: var(--green); }
.photo-overlay .pbtn-delete { background: var(--red); }
.cover-badge {
    position: absolute;
    top: 8px; left: 8px;
    padding: 4px 10px;
    background: var(--green);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.photo-likes {
    position: absolute;
    top: 8px; right: 8px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.6);
    border-radius: 6px;
    font-size: 12px;
    color: #fff;
    backdrop-filter: blur(8px);
}
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 24px;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(200,16,46,0.05);
}
.upload-zone input[type="file"] { display: none; }
.upload-progress { margin-top: 12px; display: none; }
.upload-progress .progress-bar {
    height: 4px;
    background: var(--surface);
    border-radius: 2px;
    overflow: hidden;
}
.upload-progress .progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UTILITY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.text-center { text-align: center; }
.text-muted { color: var(--text2); }
.mt-16 { margin-top: 16px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   IMPROVED TIMELINE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.timeline-bar { cursor: pointer; position: relative; user-select: none; touch-action: none; }
.timeline-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}
.timeline-marker {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-hover);
    border-radius: 1px;
    opacity: 0.7;
}

.timeline-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text2);
}
.timeline-controls button {
    padding: 5px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.timeline-controls button:hover { background: var(--surface-hover); border-color: var(--border-hover); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PROGRESS STAGES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.progress-stages {
    display: flex;
    gap: 4px;
    margin-top: 12px;
}
.progress-stage {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--surface);
    position: relative;
    overflow: hidden;
}
.progress-stage.done { background: var(--green); }
.progress-stage.active {
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    animation: stagePulse 2s ease-in-out infinite;
}
@keyframes stagePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.progress-stages-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text2);
    margin-top: 6px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARE LINK
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.share-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.share-link-box input {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BOOKING
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONFETTI + APPROVE SUCCESS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.confetti-container { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti-piece {
    position: absolute;
    border-radius: 3px;
    animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.approve-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--green);
    border-radius: var(--radius-xl);
    padding: 48px 64px;
    text-align: center;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}
.approve-success.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.approve-success h2 { font-size: 32px; margin-bottom: 8px; }
.approve-success p { color: var(--text2); font-size: 16px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY — BLURRED COVER HERO
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.gallery-cover-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin-bottom: 32px;
}
.gallery-cover-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    /* Sharp photo — no blur */
    filter: brightness(0.72);
}
.gallery-cover-content {
    position: relative;
    z-index: 2;
    padding: 80px 24px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Frosted glass pill ONLY under the text — not the whole cover */
.gallery-cover-text-glass {
    background: rgba(0,0,0,0.38);
    backdrop-filter: blur(32px) saturate(150%);
    -webkit-backdrop-filter: blur(32px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 24px;
    padding: 22px 32px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 480px;
    width: 100%;
}
.gallery-cover-content h1 {
    font-size: clamp(22px, 5vw, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 2px;
    color: #fff;
}
.gallery-cover-content p {
    color: rgba(255,255,255,0.72);
    font-size: 14px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARE LINK UI
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.share-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}
.share-input-group input {
    flex: 1;
    font-size: 13px;
    padding: 8px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}
.share-input-group button {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BOOKING PAGE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.booking-page { max-width: 900px; margin: 0 auto; padding: 32px 24px 80px; }
.booking-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 32px;
}
.cal-header {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    padding: 8px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid transparent;
    background: var(--surface);
    color: var(--text);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.cal-day:focus, .cal-day:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,16,46,0.25); }
.cal-day:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.cal-day.today { border-color: var(--accent); }
.cal-day.selected { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,16,46,0.3); }
.cal-day.blocked { opacity: 0.3; cursor: not-allowed; pointer-events: none; text-decoration: line-through; }
.cal-day.past { opacity: 0.2; cursor: not-allowed; pointer-events: none; }
.cal-day.empty { background: transparent; cursor: default; pointer-events: none; }
.cal-day.has-booking { position: relative; }
.cal-day.has-booking::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: var(--orange);
    border-radius: 50%;
}

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-nav h3 { font-size: 20px; font-weight: 700; }
.cal-nav button {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
.cal-nav button:hover { background: var(--surface-hover); }

.booking-form-section {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: 32px;
}

/* Admin bookings */
.booking-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.booking-row:last-child { border: none; }
.booking-date { font-size: 15px; font-weight: 700; min-width: 100px; }
.booking-info { flex: 1; }
.booking-info strong { font-size: 15px; }
.booking-info span { font-size: 14px; color: var(--text2); }

.badge-pending { background: rgba(245,158,11,0.12); color: var(--orange); }
.badge-confirmed { background: rgba(34,197,94,0.12); color: var(--green); }
.badge-rejected { background: rgba(239,68,68,0.12); color: var(--red); }
.badge-cancelled { background: rgba(122,129,148,0.12); color: var(--text2); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UPLOAD PROGRESS OVERLAY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.upload-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.upload-overlay.show { display: flex; }
.upload-modal {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    min-width: 400px;
}
.upload-modal h3 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
.upload-progress-bar {
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}
.upload-pct { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.upload-status { font-size: 14px; color: var(--text2); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DASHBOARD — SECTION LABELS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.stats-section-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text2);
    margin-bottom: 14px;
    letter-spacing: 0.01em;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LEADERBOARD
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.leaderboard {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 32px;
}
.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.leaderboard-row:last-child { border: none; }
.leaderboard-rank {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    min-width: 32px;
    text-align: center;
}
.leaderboard-thumb {
    width: 56px;
    height: 34px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.leaderboard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leaderboard-title:hover { color: var(--accent); }
.leaderboard-meta { font-size: 13px; color: var(--text2); }
.leaderboard-stats {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: var(--text2);
    flex-shrink: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UNBOXING — WRAPPED PROJECT CARD
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.unbox-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    min-height: 240px;
    border: 1px solid var(--border);
}
.unbox-wrap {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0d0d0d 0%, #111111 50%, #000000 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
.unbox-card.opened .unbox-wrap {
    transform: scale(1.15) translateY(-30px);
    opacity: 0;
}
.unbox-ribbon {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 24px;
    margin-left: -12px;
    background: linear-gradient(180deg, var(--accent), var(--accent-hover));
    opacity: 0.5;
}
.unbox-ribbon-v {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 24px;
    margin-top: -12px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    opacity: 0.5;
}
.unbox-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-hover);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    animation: unbox-pulse 2s ease infinite;
}
@keyframes unbox-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.unbox-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}
.unbox-hint {
    font-size: 13px;
    color: var(--text2);
    margin-top: 12px;
    position: relative;
    z-index: 2;
}
.unbox-reveal {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: rgba(17,17,17,0.95);
}
.unbox-reveal img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}
.unbox-reveal .badge { position: relative; z-index: 2; align-self: flex-start; margin-bottom: 8px; }
.unbox-reveal .card-title { position: relative; z-index: 2; font-size: 18px; font-weight: 700; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   THE LOOP — INSPIRE FEED
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.loop-feed {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    padding-bottom: 16px;
    margin-bottom: 32px;
}
.loop-feed::-webkit-scrollbar { height: 4px; }
.loop-feed::-webkit-scrollbar-track { background: transparent; }
.loop-feed::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.loop-item {
    flex: 0 0 220px;
    scroll-snap-align: start;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 9/16;
    background: var(--surface);
    cursor: pointer;
    transition: transform 0.2s;
}
.loop-item:hover { transform: scale(1.03); }
.loop-item video,
.loop-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.loop-item-title {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 40px 14px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACTIVITY STATS — iOS Health style cards
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.activity-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.activity-stat-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-lg);
    padding: 18px 16px 14px;
    transition: all 0.25s ease;
}
.activity-stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}
.activity-stat-number {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 6px;
}
.activity-stat-label {
    font-size: 12px;
    color: var(--text2);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.3;
}

@media (max-width: 480px) {
    .activity-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .activity-stat-number { font-size: 28px; }
    .activity-stat-card { padding: 14px 10px 10px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ICON ANIMATIONS — Lucide hover effects
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nav-icon, .icon-animated {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    vertical-align: middle;
}
a:hover .nav-icon,
.btn:hover .nav-icon,
.icon-animated:hover { transform: scale(1.2) rotate(-8deg); }

.icon-bounce:hover { transform: scale(1.25) translateY(-3px); }
.icon-spin:hover   { transform: scale(1.15) rotate(20deg); }
.icon-shake:hover  { animation: iconShake 0.4s ease; }
@keyframes iconShake {
    0%,100% { transform: rotate(0); }
    25%      { transform: rotate(-12deg) scale(1.1); }
    75%      { transform: rotate(12deg) scale(1.1); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARD ENTRANCE ANIMATION
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.card, .stat-card, .form-card, .relationship-card, .badges-card, .album-card {
    animation: cardIn 0.45s cubic-bezier(0.16,1,0.3,1) both;
}
.card:nth-child(2), .stat-card:nth-child(2) { animation-delay: 0.07s; }
.card:nth-child(3), .stat-card:nth-child(3) { animation-delay: 0.14s; }
.card:nth-child(4), .stat-card:nth-child(4) { animation-delay: 0.21s; }
.stat-card:nth-child(5) { animation-delay: 0.28s; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHINE / REFLECTION EFFECT on CTA buttons
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.btn, .xp-bar-fill {
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -75%;
    width: 50%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
    transform: skewX(-20deg);
    animation: shineSwipe 5s ease-in-out infinite;
    pointer-events: none;
}
.btn-ghost::after { display: none; }
@keyframes shineSwipe {
    0%       { left: -75%; }
    45%, 100% { left: 150%; }
}

/* Shimmer on XP bar fill */
.xp-bar-fill::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
    animation: barShimmer 2.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes barShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FROSTED GLASS utility class
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.glass {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
}
.glass-dark {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LANGUAGE SWITCHER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(245,245,247,0.6);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
}
.lang-switcher:hover {
    background: rgba(255,255,255,0.12);
    color: #f5f5f7;
    border-color: rgba(255,255,255,0.2);
}
/* Variant inside lp-nav (public pages) */
.lp-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(245,245,247,0.55);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.lp-lang-switcher:hover {
    background: rgba(255,255,255,0.13);
    color: #f5f5f7;
}

