/* ═══════════════════════════════════════
   تشيك إن FRH — Premium UI
   ═══════════════════════════════════════ */
:root {
  --bg-dark: #07070f;
  --bg-card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f8;
  --text-muted: rgba(244, 244, 248, 0.5);
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --accent: #22d3ee;
  --gold: #fbbf24;
  --success: #34d399;
  --danger: #f87171;
  --gradient-2: linear-gradient(135deg, #8b5cf6, #22d3ee);
  --gradient-gold: linear-gradient(135deg, #fbbf24, #f59e0b);
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  --radius: 22px;
  --font: 'Tajawal', sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── Background ─── */
.bg-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(34, 211, 238, 0.08), transparent),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(251, 191, 36, 0.04), transparent);
}

.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.4;
  animation: float 14s ease-in-out infinite;
}

.orb-1 { width: 450px; height: 450px; background: #8b5cf6; top: -120px; right: -120px; }
.orb-2 { width: 380px; height: 380px; background: #22d3ee; bottom: 15%; left: -100px; animation-delay: -5s; }
.orb-3 { width: 320px; height: 320px; background: #f472b6; bottom: -60px; right: 25%; animation-delay: -9s; }
.orb-4 { width: 250px; height: 250px; background: #fbbf24; top: 40%; left: 60%; animation-delay: -3s; opacity: 0.2; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -25px) scale(1.06); }
  66% { transform: translate(-15px, 15px) scale(0.94); }
}

.bg-particles {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px; height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }

/* ─── Screens ─── */
.screen { display: none; position: relative; z-index: 1; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

#screen-auth { align-items: center; justify-content: center; padding: 24px 16px; }

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ═══ LOADER ═══ */
.screen-loader {
  position: fixed; inset: 0; z-index: 5000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(7, 7, 15, 0.97);
  backdrop-filter: blur(20px);
  padding: 24px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.screen-loader.hidden { display: none; }
.screen-loader.active { display: flex; animation: loaderIn 0.5s ease; }

.screen-loader.exit {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

@keyframes loaderIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loader-orbit {
  position: relative;
  width: 120px; height: 120px;
  margin-bottom: 32px;
}

.loader-orbit-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--primary);
  border-right-color: var(--accent);
  animation: orbitSpin 1.2s linear infinite;
}

.loader-orbit-ring.delay {
  inset: 12px;
  border-top-color: var(--accent);
  border-right-color: var(--gold);
  animation-duration: 1.8s;
  animation-direction: reverse;
}

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

.loader-logo {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  animation: bounce 1.5s ease infinite;
}

.loader-greeting {
  font-size: 1.8rem; font-weight: 900;
  background: var(--gradient-2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  animation: fadeUp 0.6s ease 0.2s backwards;
}

.loader-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease 0.3s backwards;
}

.loader-bar-wrap {
  width: 100%; max-width: 280px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}

.loader-bar {
  flex: 1; height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px; overflow: hidden;
}

.loader-progress {
  height: 100%; width: 0%;
  background: var(--gradient-2);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.loader-pct {
  font-size: 0.8rem; font-weight: 800;
  color: var(--primary-light);
  min-width: 36px;
}

.loader-steps {
  display: flex; gap: 20px;
  animation: fadeUp 0.6s ease 0.4s backwards;
}

.loader-step {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  font-size: 0.7rem; color: var(--text-muted);
  transition: color 0.3s;
}

.loader-step.active { color: var(--text); }
.loader-step.done { color: var(--success); }

.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loader-step.active .step-dot {
  background: var(--gradient-2);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
  transform: scale(1.3);
}

.loader-step.done .step-dot {
  background: var(--success);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ AUTH (kept) ═══ */
.auth-wrap { width: 100%; max-width: 440px; }
.auth-card { padding: 36px 28px 28px; text-align: center; position: relative; overflow: hidden; }
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-2); animation: shimmer 3s ease infinite;
}
@keyframes shimmer { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.logo-ring {
  width: 88px; height: 88px; margin: 0 auto 8px; border-radius: 50%;
  background: conic-gradient(from 0deg, #8b5cf6, #22d3ee, #f472b6, #8b5cf6);
  padding: 3px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.35);
}
.logo-ring .logo-icon {
  width: 100%; height: 100%; border-radius: 50%; background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}

@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.auth-tabs {
  display: flex; position: relative;
  background: rgba(0, 0, 0, 0.35); border-radius: 14px;
  padding: 4px; margin-bottom: 24px; border: 1px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 12px 8px; border: none; background: transparent;
  color: var(--text-muted); font-family: var(--font); font-size: 0.95rem;
  font-weight: 700; cursor: pointer; position: relative; z-index: 1;
  transition: color 0.3s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.auth-tab.active { color: white; }
.auth-tab-indicator {
  position: absolute; top: 4px; bottom: 4px; right: 4px;
  width: calc(50% - 4px); background: var(--gradient-2); border-radius: 11px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.auth-forms { position: relative; min-height: 200px; }
.auth-form { display: none; text-align: right; }
.auth-form.active { display: block; animation: authSlideIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes authSlideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.field-group { margin-bottom: 4px; }
.field-group label { display: flex; align-items: center; gap: 6px; }
.label-hint { font-weight: 400; font-size: 0.75rem; color: var(--text-muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input-icon { position: absolute; right: 14px; font-size: 1rem; opacity: 0.6; pointer-events: none; z-index: 1; }
.input-wrap input { padding-right: 42px; padding-left: 42px; margin-bottom: 14px; }
.input-wrap input[dir="ltr"] { text-align: left; }
.toggle-pw { position: absolute; left: 10px; background: none; border: none; cursor: pointer; font-size: 1rem; opacity: 0.6; padding: 4px; z-index: 1; }
.field-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--primary-light); font-size: 0.85rem; font-weight: 600; }
.field-divider::before, .field-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.animate-field { animation: fieldIn 0.5s ease backwards; animation-delay: calc(var(--i, 0) * 0.07s); }
@keyframes fieldIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.name-preview {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
  animation: previewPulse 2s ease infinite;
}
@keyframes previewPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.2); } 50% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); } }
.preview-label { font-size: 0.85rem; color: var(--text-muted); }
.preview-name { font-size: 1.3rem; font-weight: 900; background: var(--gradient-2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.logo-wrap { margin-bottom: 28px; }
.auth-card h1, .login-card h1 {
  font-size: 2rem; font-weight: 900; background: var(--gradient-2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-top: 12px;
}
.subtitle { color: var(--text-muted); margin-top: 8px; font-size: 0.95rem; }
.prize-hint { margin-top: 24px; font-size: 0.9rem; color: var(--text-muted); }
.prize-hint strong { color: var(--gold); }

/* Site Footer */
.site-footer {
  text-align: center;
  padding: 24px 16px 16px;
  margin-top: 8px;
}

.site-footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.site-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer-links a {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s, transform 0.25s;
}

.site-footer-links a:hover {
  color: var(--primary-light);
  transform: translateY(-1px);
}

.site-footer--auth {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.site-footer--app {
  margin-top: 28px;
  padding-bottom: 4px;
}

.site-footer--page {
  padding: 36px 20px 48px;
}

label { display: block; text-align: right; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; }
input, select {
  width: 100%; padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--border); background: rgba(0, 0, 0, 0.35);
  color: var(--text); font-family: var(--font); font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s; margin-bottom: 16px;
}
input:focus, select:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }
select option { background: #12121f; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: none; border-radius: 14px;
  font-family: var(--font); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--gradient-2); color: white; width: 100%; }
.btn-glow { box-shadow: 0 4px 24px rgba(139, 92, 246, 0.4); }
.btn-glow:hover { box-shadow: 0 6px 32px rgba(139, 92, 246, 0.55); transform: translateY(-2px); }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border); width: 100%; }
.btn-lg { padding: 18px 32px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-icon {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px; cursor: pointer;
  color: var(--text-muted); transition: all 0.25s;
  display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: rgba(255,255,255,0.12); color: var(--text); }

/* ═══ APP SHELL ═══ */
#screen-app { padding-bottom: 0; }

.app-shell {
  width: 100%; max-width: 480px; margin: 0 auto;
  min-height: 100dvh; display: flex; flex-direction: column;
  padding-bottom: calc(var(--nav-h) + 16px);
}

/* Header */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; margin: 12px 16px 0;
  background: var(--bg-card); backdrop-filter: blur(24px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.header-profile {
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: opacity 0.25s, transform 0.25s;
}
.header-profile:active { transform: scale(0.98); opacity: 0.85; }

.avatar-wrap { position: relative; }

.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.2rem;
  position: relative; z-index: 1; overflow: hidden;
}

.avatar .avatar-img,
.avatar-img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%;
}

.avatar-pulse {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.4);
  animation: avatarPulse 2.5s ease infinite;
}

@keyframes avatarPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.12); opacity: 0; }
}

.profile-name { display: block; font-size: 1.05rem; font-weight: 800; }
.greeting { display: block; font-size: 0.72rem; color: var(--text-muted); }
.user-handle { display: block; font-size: 0.68rem; color: var(--text-muted); direction: ltr; text-align: right; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.points-badge {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 6px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 8px 16px; border-radius: 999px;
  font-weight: 900; color: var(--gold); font-size: 0.95rem;
}

.points-shine {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  animation: shine 3s ease infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.app-main { flex: 1; padding: 0 16px; }

.tab-panel { display: none; padding-bottom: 16px; }
.tab-panel.active { display: block; animation: panelIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Reveal animations on app enter */
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
}

/* تبويبات ثانية ما تشغّل الـ reveal — لازم تظهر مباشرة */
.tab-panel.active .reveal-item {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

.bottom-nav.reveal-item {
  transform: none;
}

#screen-app.app-ready .reveal-item {
  animation: revealIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--reveal-i, 0) * 0.08s);
}

@keyframes revealIn {
  to { opacity: 1; transform: translateY(0); }
}

#screen-app.app-ready .app-header { --reveal-i: 0; }
#screen-app.app-ready .hero-section { --reveal-i: 1; }
#screen-app.app-ready .stats-grid { --reveal-i: 2; }
#screen-app.app-ready .prize-timer-card { --reveal-i: 3; }
#screen-app.app-ready .section-head { --reveal-i: 4; }
#screen-app.app-ready .bottom-nav {
  --reveal-i: 5;
  animation: revealNav 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--reveal-i, 0) * 0.08s);
}

@keyframes revealNav {
  from { opacity: 0; bottom: 0; }
  to { opacity: 1; bottom: 16px; }
}

/* Hero */
.hero-section { margin: 16px 0; }

.hero-card {
  position: relative; border-radius: 24px; overflow: hidden;
  background: linear-gradient(145deg, rgba(139,92,246,0.15), rgba(34,211,238,0.08));
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.hero-border-glow {
  position: absolute; inset: -1px; border-radius: 24px; padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), #8b5cf6, #22d3ee, #f472b6, #fbbf24, #8b5cf6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: borderRotate 4s linear infinite;
  pointer-events: none;
}

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@property --viewer-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

@keyframes borderRotate {
  to { --angle: 360deg; }
}

.hero-inner {
  position: relative;
  padding: 28px 24px;
  text-align: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-block; padding: 6px 14px; border-radius: 99px;
  background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 0.78rem; font-weight: 700; color: var(--primary-light);
  margin-bottom: 14px; animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); }
}

.hero-title { font-size: 1.75rem; font-weight: 900; margin-bottom: 8px; }
.hero-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; line-height: 1.7; }

.btn-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: none;
  cursor: pointer;
  padding: 18px 36px;
  border-radius: 16px;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  overflow: hidden;
  transition: transform 0.25s;
}

.btn-hero:hover { transform: translateY(-3px) scale(1.02); }
.btn-hero:active { transform: scale(0.98); }

.btn-hero-bg {
  position: absolute; inset: 0;
  background: var(--gradient-2);
  animation: heroBtnGlow 3s ease infinite;
}

@keyframes heroBtnGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

.btn-hero-text { position: relative; z-index: 1; }

.hero-sparkles span {
  position: absolute; width: 4px; height: 4px;
  background: white; border-radius: 50%; opacity: 0;
  animation: sparkle 3s ease infinite;
}

.hero-sparkles span:nth-child(1) { top: 20%; right: 15%; animation-delay: 0s; }
.hero-sparkles span:nth-child(2) { top: 60%; right: 8%; animation-delay: 0.6s; }
.hero-sparkles span:nth-child(3) { top: 30%; left: 10%; animation-delay: 1.2s; }
.hero-sparkles span:nth-child(4) { bottom: 25%; left: 20%; animation-delay: 1.8s; }
.hero-sparkles span:nth-child(5) { top: 15%; left: 40%; animation-delay: 2.4s; }

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 0.8; transform: scale(1.5); }
}

/* Stats */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 14px;
}

.stat-card {
  position: relative; overflow: hidden;
  padding: 18px 10px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(139, 92, 246, 0.15); }

.stat-icon { font-size: 1.4rem; margin-bottom: 6px; }

.stat-num {
  display: block; font-size: 1.45rem; font-weight: 900;
  background: var(--gradient-2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.stat-gold .stat-num { background: var(--gradient-gold); -webkit-background-clip: text; background-clip: text; }
.stat-cyan .stat-num { background: linear-gradient(135deg, #22d3ee, #06b6d4); -webkit-background-clip: text; background-clip: text; }

.stat-label { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; display: block; }

.prize-timer-card {
  position: relative;
  margin-bottom: 24px;
  padding: 22px 16px 18px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(251,191,36,0.16) 0%, rgba(139,92,246,0.08) 45%, rgba(7,7,15,0.6) 100%);
  border: 1px solid rgba(251, 191, 36, 0.22);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
}

.prize-timer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(251,191,36,0.55), rgba(139,92,246,0.35), rgba(34,211,238,0.25), rgba(251,191,36,0.55));
  background-size: 300% 300%;
  animation: prizeBorderFlow 6s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes prizeBorderFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.prize-timer-aurora {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 30%, rgba(251,191,36,0.22), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(139,92,246,0.18), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(34,211,238,0.08), transparent 55%);
  animation: prizeAurora 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes prizeAurora {
  0% { transform: translate(-3%, -2%) scale(1); opacity: 0.75; }
  100% { transform: translate(3%, 2%) scale(1.08); opacity: 1; }
}

.prize-timer-glow {
  position: absolute;
  inset: -70%;
  background: conic-gradient(from 0deg, transparent, rgba(251,191,36,0.14), transparent, rgba(139,92,246,0.1), transparent);
  animation: prizeGlowSpin 14s linear infinite;
  pointer-events: none;
}

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

.prize-timer-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.prize-timer-sparks span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fde68a;
  box-shadow: 0 0 10px #fbbf24;
  animation: prizeSpark 4s ease-in-out infinite;
}

.prize-timer-sparks span:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.prize-timer-sparks span:nth-child(2) { top: 72%; left: 22%; animation-delay: 0.8s; width: 3px; height: 3px; }
.prize-timer-sparks span:nth-child(3) { top: 28%; right: 14%; animation-delay: 1.4s; }
.prize-timer-sparks span:nth-child(4) { bottom: 20%; right: 20%; animation-delay: 2.1s; width: 5px; height: 5px; }
.prize-timer-sparks span:nth-child(5) { top: 50%; left: 8%; animation-delay: 2.8s; opacity: 0.7; }
.prize-timer-sparks span:nth-child(6) { top: 40%; right: 8%; animation-delay: 3.5s; opacity: 0.8; }

@keyframes prizeSpark {
  0%, 100% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: translateY(-18px) scale(1.2); opacity: 0.9; }
  80% { opacity: 0.3; }
}

.prize-timer-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
  z-index: 1;
}

.prize-timer-trophy {
  font-size: 2.6rem;
  animation: trophyFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(251,191,36,0.65));
}

@keyframes trophyFloat {
  0%, 100% { transform: translateY(0) rotate(-6deg) scale(1); }
  50% { transform: translateY(-8px) rotate(6deg) scale(1.06); }
}

.prize-timer-amount {
  display: block;
  font-size: 1.75rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  animation: prizeAmountPulse 3s ease-in-out infinite;
}

@keyframes prizeAmountPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(251,191,36,0.3)); }
  50% { filter: drop-shadow(0 0 16px rgba(251,191,36,0.55)); }
}

.prize-timer-amount small { font-size: 0.85rem; font-weight: 700; -webkit-text-fill-color: var(--gold); }

.prize-timer-sub {
  display: block;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.prize-timer-grid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  direction: ltr;
  z-index: 1;
  perspective: 800px;
}

.prize-timer-grid--mini {
  margin: 12px 0 6px;
  gap: 5px;
  perspective: 600px;
}

.prize-timer-grid--mini .timer-digit-box { min-width: 42px; height: 46px; border-radius: 12px; }
.prize-timer-grid--mini .timer-val { font-size: 1.25rem; }
.prize-timer-grid--mini .timer-unit { min-width: 48px; padding: 0; background: none; border: none; box-shadow: none; }
.prize-timer-grid--mini .timer-lbl { font-size: 0.55rem; margin-top: 6px; }
.prize-timer-grid--mini .timer-sep { font-size: 1rem; margin-top: 8px; }

.timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.timer-unit--live .timer-digit-box {
  border-color: rgba(34,211,238,0.45);
  box-shadow: 0 0 24px rgba(34,211,238,0.2), 0 8px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}

.timer-unit--live .timer-digit-box::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid rgba(34,211,238,0.35);
  animation: liveRing 1.2s ease-out infinite;
  pointer-events: none;
}

@keyframes liveRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.12); opacity: 0; }
}

.timer-digit-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 62px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0.45) 100%);
  border: 1px solid rgba(251,191,36,0.28);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12), inset 0 -8px 16px rgba(0,0,0,0.25);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 500px;
}

.timer-digit-box::before {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 1px;
  background: rgba(0,0,0,0.35);
  z-index: 2;
  pointer-events: none;
}

.timer-digit-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.18) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: digitShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes digitShimmer {
  0%, 70% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.timer-val {
  position: relative;
  z-index: 1;
  font-size: 1.85rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff7d6 0%, #fde68a 35%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  display: block;
  transform-origin: center bottom;
  text-shadow: 0 2px 12px rgba(251,191,36,0.25);
}

.timer-unit.timer-tick .timer-digit-box {
  animation: digitBoxPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes digitBoxPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); box-shadow: 0 0 28px rgba(251,191,36,0.35); }
  100% { transform: scale(1); }
}

.timer-val.timer-out {
  animation: timerFlipOut 0.28s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

.timer-val.timer-in {
  animation: timerFlipIn 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes timerFlipOut {
  0% { transform: rotateX(0deg); opacity: 1; }
  100% { transform: rotateX(-85deg); opacity: 0; }
}

@keyframes timerFlipIn {
  0% { transform: rotateX(85deg); opacity: 0; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

.timer-lbl {
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timer-sep {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  opacity: 0.55;
  animation: timerSepBlink 1s steps(2, start) infinite;
  align-self: flex-start;
  margin-top: 16px;
  text-shadow: 0 0 12px rgba(251,191,36,0.45);
}

@keyframes timerSepBlink {
  0%, 100% { opacity: 0.25; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1); }
}

.prize-timer-date {
  position: relative;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  z-index: 1;
}

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h3 { font-size: 1rem; font-weight: 800; }
.section-badge {
  font-size: 0.72rem; font-weight: 700; padding: 4px 10px;
  background: rgba(139, 92, 246, 0.15); color: var(--primary-light);
  border-radius: 99px;
}

.page-head { margin: 16px 0 20px; }
.page-head h2 { font-size: 1.5rem; font-weight: 900; margin-bottom: 4px; }
.page-head p { color: var(--text-muted); font-size: 0.85rem; }

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  width: auto;
  max-width: 448px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  background: rgba(12, 12, 22, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px;
  height: var(--nav-h);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.nav-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: calc(20% - 4px);
  border-radius: 14px;
  background: var(--gradient-2);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.45);
  transition: right 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  right: 6px;
  transform: none;
}

.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font); color: var(--text-muted);
  font-size: 0.62rem; font-weight: 600;
  position: relative; z-index: 1;
  transition: color 0.3s; padding: 8px 4px;
}

.nav-item.active { color: white; }
.nav-icon { font-size: 1.25rem; transition: transform 0.3s; }
.nav-item.active .nav-icon { transform: scale(1.15); }
.nav-icon-main { font-size: 1.45rem; }

/* Feed */
.feed-list { display: flex; flex-direction: column; gap: 10px; }

.feed-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: transform 0.25s, border-color 0.25s;
  animation: feedIn 0.5s ease backwards;
}

.feed-item:hover { transform: translateX(-4px); border-color: rgba(139, 92, 246, 0.25); }

@keyframes feedIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.feed-item img {
  width: 54px; height: 54px; border-radius: 14px;
  object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.feed-item img:active { transform: scale(0.94); }

.feed-info { flex: 1; min-width: 0; }
.feed-info strong { display: block; font-size: 0.95rem; font-weight: 700; }
.feed-info span { font-size: 0.78rem; color: var(--text-muted); }

.feed-points {
  font-weight: 900; color: var(--gold); font-size: 0.95rem;
  padding: 6px 12px; border-radius: 10px;
  background: rgba(251, 191, 36, 0.1);
}

.empty-state {
  text-align: center; padding: 40px 24px;
  color: var(--text-muted); font-size: 0.9rem;
  border: 1px dashed var(--border); border-radius: 18px;
}

/* Check-in */
.checkin-card, .suggest-card { padding: 24px; margin-bottom: 20px; }

.checkin-card.checkin-sending {
  pointer-events: none;
  opacity: 0.88;
  position: relative;
}

.checkin-card.checkin-sending::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.08), transparent);
  background-size: 200% 100%;
  animation: checkinSendShimmer 1.2s ease infinite;
  pointer-events: none;
}

@keyframes checkinSendShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.hint { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }

.points-preview {
  background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px; padding: 10px 16px; margin: -8px 0 16px;
  font-weight: 700; color: var(--gold); text-align: center;
}

.camera-box {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 2px dashed rgba(139, 92, 246, 0.35);
  margin-bottom: 16px; min-height: 210px;
  background: rgba(0, 0, 0, 0.25); cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.camera-box:hover { border-color: var(--primary-light); box-shadow: 0 0 30px rgba(139, 92, 246, 0.15); }

.camera-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; width: 100%; height: 100%; }

.camera-placeholder {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 210px; gap: 12px;
  color: var(--text-muted); pointer-events: none;
}

.camera-ring {
  width: 80px; height: 80px; border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.4);
  display: flex; align-items: center; justify-content: center;
  animation: cameraRing 2s ease infinite;
}

@keyframes cameraRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3); }
  50% { box-shadow: 0 0 0 12px rgba(139, 92, 246, 0); }
}

.camera-icon { font-size: 36px; }
.photo-preview { width: 100%; max-height: 280px; object-fit: cover; display: block; }

.location-status {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 20px; font-size: 0.85rem;
  cursor: pointer; transition: border-color 0.2s;
}
.location-status:hover { border-color: rgba(34, 211, 238, 0.45); }

.loc-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); animation: locPulse 1.5s ease infinite;
}

@keyframes locPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.location-status.error { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.25); }
.location-status.error .loc-pulse { background: var(--danger); }
.location-status.ok { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.25); }
.location-status.ok .loc-pulse { background: var(--success); }

/* Location Modal */
.location-modal { max-width: 380px; text-align: center; }
.location-modal-icon {
  font-size: 64px; margin-bottom: 12px;
  animation: bounce 2s ease infinite;
}
.location-modal h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 12px; }
.location-modal-desc {
  color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 20px;
}
.location-modal-desc strong { color: var(--accent); }
.location-modal-status {
  min-height: 24px; font-size: 0.85rem; margin-bottom: 16px;
  color: var(--danger);
}
.location-modal-status.ok { color: var(--success); }
.location-modal-hint {
  font-size: 0.72rem; color: var(--muted); margin-top: 12px; line-height: 1.4;
}
#btn-location-later { margin-top: 10px; }

/* Leaderboard */
.lb-hero {
  position: relative; text-align: center;
  padding: 32px 24px; margin: 16px 0 24px;
  border-radius: 24px; overflow: hidden;
  background: linear-gradient(145deg, rgba(251,191,36,0.12), rgba(139,92,246,0.08));
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.lb-hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(251,191,36,0.15), transparent 60%);
  pointer-events: none;
}

.lb-trophy-wrap { margin-bottom: 8px; }
.lb-trophy { font-size: 56px; display: inline-block; animation: trophyBounce 2s ease infinite; }

@keyframes trophyBounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-12px) rotate(5deg); }
}

.lb-hero h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.lb-prize { font-size: 2.5rem; font-weight: 900; color: var(--gold); line-height: 1; }
.lb-prize small { font-size: 1rem; }
.lb-countdown-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 6px;
  font-weight: 700;
}

.lb-cycle-note {
  position: relative;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 10px;
  opacity: 0.9;
}

/* Podium */
.lb-podium { margin: 20px 0 24px; }

.podium-stage {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 10px; padding: 0 8px;
}

.podium-slot {
  flex: 1; max-width: 110px;
  display: flex; flex-direction: column; align-items: center;
  animation: podiumUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes podiumUp {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.podium-slot.gold { order: 2; }
.podium-slot.silver { order: 1; }
.podium-slot.bronze { order: 3; }

.podium-medal { font-size: 1.5rem; margin-bottom: 6px; animation: bounce 2s ease infinite; }
.podium-slot.gold .podium-medal { font-size: 2rem; }

.podium-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.1rem; margin-bottom: 6px;
  border: 2px solid rgba(255,255,255,0.15);
}

.podium-slot.gold .podium-avatar {
  width: 58px; height: 58px; font-size: 1.3rem;
  border-color: rgba(251,191,36,0.5);
  box-shadow: 0 0 24px rgba(251,191,36,0.35);
}

.podium-name {
  font-size: 0.78rem; font-weight: 700; text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; margin-bottom: 4px;
}

.podium-pts {
  font-size: 0.85rem; font-weight: 900; color: var(--gold);
  margin-bottom: 8px;
}

.podium-bar {
  width: 100%; border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, rgba(139,92,246,0.4), rgba(139,92,246,0.15));
  border: 1px solid var(--border); border-bottom: none;
}

.podium-slot.gold .podium-bar { height: 90px; background: linear-gradient(180deg, rgba(251,191,36,0.35), rgba(251,191,36,0.1)); }
.podium-slot.silver .podium-bar { height: 65px; background: linear-gradient(180deg, rgba(192,192,192,0.3), rgba(192,192,192,0.08)); }
.podium-slot.bronze .podium-bar { height: 50px; background: linear-gradient(180deg, rgba(205,127,50,0.3), rgba(205,127,50,0.08)); }

.podium-you .podium-avatar { box-shadow: 0 0 0 3px var(--primary-light); }
.podium-slot.empty { visibility: hidden; }

.leaderboard { display: flex; flex-direction: column; gap: 10px; }

.lb-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  animation: feedIn 0.5s ease backwards;
  transition: transform 0.25s;
}

.lb-row:hover { transform: translateX(-4px); }
.lb-row.rank-1 { background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(251,191,36,0.04)); border-color: rgba(251,191,36,0.3); }
.lb-row.rank-2 { background: linear-gradient(135deg, rgba(192,192,192,0.12), transparent); border-color: rgba(192,192,192,0.25); }
.lb-row.rank-3 { background: linear-gradient(135deg, rgba(205,127,50,0.12), transparent); border-color: rgba(205,127,50,0.25); }

.lb-rank {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.9rem; background: rgba(255,255,255,0.08);
}

.rank-1 .lb-rank { background: var(--gold); color: #1a1a2e; }
.rank-2 .lb-rank { background: #c0c0c0; color: #1a1a2e; }
.rank-3 .lb-rank { background: #cd7f32; color: white; }

.lb-name { flex: 1; font-weight: 700; font-size: 1.05rem; }
.lb-points { font-weight: 900; color: var(--gold); }
.lb-you { border-color: var(--primary-light) !important; box-shadow: 0 0 20px rgba(139,92,246,0.2); }

/* Places */
.places-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.place-card {
  padding: 20px 14px; border-radius: 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  text-align: center; transition: all 0.3s;
  animation: feedIn 0.5s ease backwards;
}

.place-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.3);
}

.place-name { font-weight: 700; font-size: 0.92rem; margin-bottom: 8px; }
.place-pts { color: var(--gold); font-weight: 900; font-size: 1.15rem; }

.suggest-input-wrap {
  display: flex; gap: 10px; align-items: center;
}

.suggest-input-wrap input { margin-bottom: 0; flex: 1; }

.btn-suggest {
  width: 48px; height: 48px; border-radius: 14px; border: none;
  background: var(--gradient-2); color: white;
  font-size: 1.5rem; font-weight: 700; cursor: pointer;
  flex-shrink: 0; transition: transform 0.2s;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.btn-suggest:hover { transform: scale(1.08); }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(10px); }
.modal-content { position: relative; padding: 40px 32px; text-align: center; max-width: 360px; width: 100%; }

.success-burst {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  font-size: 2rem; animation: burstSpin 1s ease;
}

@keyframes burstSpin {
  from { transform: translateX(-50%) scale(0) rotate(0deg); opacity: 0; }
  to { transform: translateX(-50%) scale(1) rotate(180deg); opacity: 1; }
}

.success-icon { font-size: 64px; margin-bottom: 12px; }
.success-points {
  font-size: 3rem; font-weight: 900; color: var(--gold);
  margin: 16px 0 24px;
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Custom place input */
.custom-place-wrap {
  margin-top: 12px;
  animation: slideDown 0.35s ease;
}
.custom-place-wrap label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.custom-place-wrap input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--text); font-size: 1rem;
}
.custom-place-wrap input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(139,92,246,0.2); }
.custom-place-hint { font-size: 0.75rem; color: var(--muted); margin-top: 6px; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pending check-in modal */
.modal-content.is-pending {
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 60px rgba(251, 191, 36, 0.15);
}
.modal-content.is-pending h2 { color: #fcd34d; }

.pending-orbit {
  position: relative; width: 88px; height: 88px; margin: 0 auto 16px;
}
.orbit-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #fbbf24; border-right-color: rgba(251,191,36,0.3);
  animation: orbitSpin 1.2s linear infinite;
}
.orbit-ring.delay { inset: 10px; animation-duration: 1.8s; animation-direction: reverse; opacity: 0.6; }
.orbit-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; animation: orbitPulse 1.5s ease-in-out infinite;
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.pending-note {
  font-size: 0.85rem; color: var(--muted); line-height: 1.5;
  margin: -8px 0 20px; padding: 10px 12px;
  background: rgba(251,191,36,0.08); border-radius: 10px;
  border: 1px solid rgba(251,191,36,0.15);
}

/* Feed status badges */
.feed-status {
  font-size: 0.75rem; font-weight: 700; padding: 6px 10px; border-radius: 10px;
  white-space: nowrap;
}
.feed-status.pending {
  color: #fcd34d; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.25);
}
.feed-status.rejected {
  color: #fca5a5; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.25);
}
.feed-points.approved { color: var(--gold); }
.feed-item-pending { border-color: rgba(251,191,36,0.2); }
.feed-item-rejected { opacity: 0.7; }

/* Toast */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 32px); left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(18, 18, 32, 0.95); border: 1px solid var(--border);
  padding: 14px 24px; border-radius: 14px; font-weight: 600;
  z-index: 10000;
  transition: transform 0.35s ease, opacity 0.35s ease;
  max-width: 90%; text-align: center; backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1; pointer-events: auto;
}
.toast.error { border-color: rgba(248,113,113,0.5); color: #fca5a5; }
.toast.success { border-color: rgba(52,211,153,0.5); color: #6ee7b7; }

.hidden { display: none !important; }
.animate-in { animation: fadeUp 0.6s ease; }
.animate-pop { animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* Section link */
.section-link {
  border: none; background: none; color: var(--accent);
  font-family: var(--font); font-size: 0.8rem; font-weight: 700;
  cursor: pointer; padding: 4px 8px;
}
.section-link:hover { text-decoration: underline; }

.lb-cycle-note {
  font-size: 0.78rem; color: var(--text-muted); margin-top: 8px;
}

/* Notifications */
.btn-notif { position: relative; }
.notif-badge {
  position: absolute; top: -2px; left: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #f43f5e; color: white; font-size: 0.65rem; font-weight: 800;
  border-radius: 99px; display: flex; align-items: center; justify-content: center;
  animation: notifPop 0.4s ease;
}
@keyframes notifPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.notif-panel {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: flex-end; justify-content: center;
}
.notif-panel.hidden { display: none; }
.notif-panel-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}
.notif-panel-sheet {
  position: relative; width: 100%; max-width: 480px; max-height: 70vh;
  border-radius: 24px 24px 0 0; padding: 20px 16px 32px;
  animation: sheetUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sheetUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.notif-panel-head h3 { font-size: 1.1rem; }
.notif-mark-read {
  border: none; background: rgba(139,92,246,0.15); color: var(--accent);
  padding: 8px 12px; border-radius: 10px; font-family: var(--font);
  font-size: 0.75rem; font-weight: 700; cursor: pointer;
}
.notif-list { overflow-y: auto; max-height: 50vh; display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  display: flex; gap: 12px; padding: 12px; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  cursor: pointer; transition: background 0.2s;
}
.notif-item.unread { border-color: rgba(139,92,246,0.35); background: rgba(139,92,246,0.08); }
.notif-item:hover { background: rgba(255,255,255,0.06); }
.notif-type { font-size: 1.3rem; }
.notif-body p { font-size: 0.85rem; line-height: 1.4; margin-bottom: 4px; }
.notif-body time { font-size: 0.7rem; color: var(--text-muted); }

/* Friends Panel */
.friends-panel {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.friends-panel.hidden { display: none; }

.friends-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  animation: friendsBackdropIn 0.35s ease;
}

@keyframes friendsBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.friends-panel-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 82vh;
  border-radius: 28px 28px 0 0;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom, 0));
  display: flex;
  flex-direction: column;
  animation: friendsSheetUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes friendsSheetUp {
  from { transform: translateY(100%) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.friends-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.friends-panel-head h3 {
  font-size: 1.15rem;
  font-weight: 900;
}

.friends-panel-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, color 0.25s;
}

.friends-panel-close:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  transform: rotate(90deg);
}

.friends-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.friends-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  z-index: 2;
  pointer-events: none;
  transition: transform 0.3s ease;
}

.friends-search-wrap:focus-within .friends-search-icon {
  transform: translateY(-50%) scale(1.15);
}

#friends-search {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

#friends-search:focus {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.friends-search-glow {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee, #f472b6, #8b5cf6);
  background-size: 300% 100%;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.35s;
  animation: friendsSearchGlow 3s linear infinite;
  pointer-events: none;
}

.friends-search-wrap:focus-within .friends-search-glow {
  opacity: 0.35;
}

@keyframes friendsSearchGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.friends-search-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 12px 12px;
  animation: friendsHintIn 0.35s ease;
}

@keyframes friendsHintIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.friends-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 12px;
  padding-top: 4px;
}

.friends-section-head h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
}

.friends-count-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.friends-results,
.friends-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.friends-results {
  max-height: 34vh;
  margin-bottom: 8px;
  padding-bottom: 4px;
}

.friends-list {
  flex: 1;
  min-height: 80px;
  max-height: 38vh;
}

.friends-results.hidden,
.friends-search-hint.hidden { display: none; }

.friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  animation: friendCardIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--fi, 0) * 0.06s);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}

@keyframes friendCardIn {
  from { opacity: 0; transform: translateX(16px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.friend-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateX(-2px);
}

.friend-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(34, 211, 238, 0.25));
  border: 2px solid rgba(139, 92, 246, 0.35);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.friend-card-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.friend-card-avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-card-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.friend-card-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
}

.friend-card-meta span {
  margin-inline-start: 8px;
}

.friend-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-friend-add,
.btn-friend-view,
.btn-friend-remove {
  border: none;
  padding: 8px 12px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  white-space: nowrap;
}

.btn-friend-add {
  background: var(--gradient-2);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-friend-add:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.5);
}

.btn-friend-add.added {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  box-shadow: none;
  cursor: default;
}

.btn-friend-add.adding {
  animation: friendAddPulse 0.6s ease infinite;
  pointer-events: none;
}

@keyframes friendAddPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.95); opacity: 0.75; }
}

.btn-friend-view {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-friend-view:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
}

.btn-friend-remove {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn-friend-remove:hover {
  background: rgba(248, 113, 113, 0.22);
}

.friends-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 18px;
  animation: friendsHintIn 0.4s ease;
}

.friends-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.friends-search-loading::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(139, 92, 246, 0.25);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-friends {
  position: relative;
}

.friends-icon {
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-friends:hover .friends-icon {
  transform: scale(1.15) rotate(-8deg);
}

.friends-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: linear-gradient(135deg, #22d3ee, #8b5cf6);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.5);
  animation: friendsBadgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.friends-badge.hidden { display: none; }

@keyframes friendsBadgePop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* Social Feed */
.social-feed { display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }

.social-card {
  border-radius: 22px; overflow: hidden;
  animation: socialIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--i, 0) * 0.06s);
}
.social-card.compact { animation-delay: calc(var(--i, 0) * 0.04s); }

@keyframes socialIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.social-card-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px;
}
.social-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gradient-2); display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem; flex-shrink: 0; overflow: hidden;
}

.social-avatar .avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.social-meta { flex: 1; min-width: 0; }

.social-profile-link {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
  transition: transform 0.25s ease, opacity 0.25s;
}

.social-profile-link:hover { opacity: 0.88; }
.social-profile-link:active { transform: scale(0.97); }

.social-profile-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 2px;
  background: linear-gradient(90deg, var(--text), rgba(255, 255, 255, 0.85));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.social-profile-link .social-avatar {
  transition: box-shadow 0.3s, transform 0.3s;
}

.social-profile-link:hover .social-avatar {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.45);
}

.social-meta span { font-size: 0.72rem; color: var(--text-muted); }
.social-pts {
  font-weight: 900; color: var(--gold); font-size: 0.85rem;
  background: rgba(251,191,36,0.1); padding: 6px 10px; border-radius: 10px;
}

.social-photo-wrap {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.social-photo-wrap::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(7,7,15,0.35);
  opacity: 0;
  transition: opacity 0.35s ease, backdrop-filter 0.35s ease;
  backdrop-filter: blur(0);
  pointer-events: none;
}

.social-photo-wrap:active::after,
.social-card:hover .social-photo-wrap::after {
  opacity: 1;
  backdrop-filter: blur(2px);
}

.social-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-card:hover .social-photo,
.social-photo-wrap:active .social-photo { transform: scale(1.05); }

.social-card.compact .social-photo { max-height: 180px; }

/* Photo Viewer */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.photo-viewer.hidden { display: none; }

.photo-viewer:not(.hidden) { animation: viewerFadeIn 0.35s ease; }

@keyframes viewerFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: viewerBackdropIn 0.45s ease;
}

@keyframes viewerBackdropIn {
  from { opacity: 0; backdrop-filter: blur(0); }
  to { opacity: 1; backdrop-filter: blur(16px); }
}

.photo-viewer-shell {
  position: relative;
  width: min(100%, 420px);
  z-index: 1;
  animation: viewerShellIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes viewerShellIn {
  from { opacity: 0; transform: translateY(40px) scale(0.88); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.photo-viewer-close {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.25s, background 0.25s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.photo-viewer-close:hover { background: rgba(248,113,113,0.85); transform: scale(1.08); }

.photo-viewer-counter {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.photo-viewer-stage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-nav {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s, background 0.25s, opacity 0.25s;
  backdrop-filter: blur(8px);
}

.photo-nav:hover:not(:disabled) { background: rgba(139,92,246,0.5); transform: scale(1.1); }
.photo-nav:disabled { opacity: 0.25; cursor: default; }

.photo-viewer-frame {
  position: relative;
  flex: 1;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: min(68vh, 520px);
  background: #0a0a14;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.08);
}

.photo-viewer-ring {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--viewer-angle, 0deg), #8b5cf6, #22d3ee, #fbbf24, #f472b6, #8b5cf6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: viewerRingSpin 5s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes viewerRingSpin { to { --viewer-angle: 360deg; } }

.photo-viewer-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: viewerImgIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes viewerImgIn {
  from { opacity: 0; transform: scale(1.12); filter: blur(6px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.photo-viewer-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: viewerShine 2.5s ease-in-out 0.3s;
  pointer-events: none;
}

@keyframes viewerShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.photo-viewer-info {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  animation: viewerInfoIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s backwards;
}

@keyframes viewerInfoIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.photo-viewer-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.photo-viewer-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(139,92,246,0.35);
}

.photo-viewer-user strong { display: block; font-size: 1rem; }
.photo-viewer-user span { font-size: 0.78rem; color: var(--text-muted); }

.photo-viewer-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.photo-viewer-meta span:last-child {
  color: var(--gold);
  font-weight: 800;
}

.photo-viewer-shell.viewer-slide-next .photo-viewer-frame img {
  animation: viewerSlideNext 0.35s ease;
}

.photo-viewer-shell.viewer-slide-prev .photo-viewer-frame img {
  animation: viewerSlidePrev 0.35s ease;
}

@keyframes viewerSlideNext {
  from { opacity: 0; transform: translateX(30px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes viewerSlidePrev {
  from { opacity: 0; transform: translateX(-30px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.social-actions {
  display: flex; gap: 12px; padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.social-like, .social-comment-btn {
  display: flex; align-items: center; gap: 6px;
  border: none; background: rgba(255,255,255,0.05);
  padding: 10px 16px; border-radius: 12px;
  font-family: var(--font); font-size: 0.85rem; font-weight: 700;
  color: var(--text); cursor: pointer; transition: transform 0.2s, background 0.2s;
}
.social-like:hover, .social-comment-btn:hover { background: rgba(255,255,255,0.1); }
.social-like.liked { background: rgba(244,63,94,0.15); color: #fda4af; }
.social-like.pop { animation: likePop 0.4s ease; }
@keyframes likePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.social-comments {
  padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px;
  animation: slideDown 0.3s ease;
}
.social-comment {
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.04); font-size: 0.82rem; line-height: 1.4;
}
.social-comment strong { color: var(--accent); margin-left: 6px; }
.social-comment.new-comment { animation: commentIn 0.4s ease; }
@keyframes commentIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}
.social-no-comments { font-size: 0.78rem; color: var(--text-muted); text-align: center; }

.comment-form {
  display: flex; gap: 8px; margin-top: 4px;
}
.comment-form input {
  flex: 1; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(0,0,0,0.2);
  color: var(--text); font-family: var(--font);
}
.comment-form button {
  width: 44px; border: none; border-radius: 12px;
  background: var(--gradient-2); color: white; font-size: 1.1rem; cursor: pointer;
}

.feed-loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 40px; color: var(--text-muted);
}
.feed-loading .orbit-ring {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--accent);
  animation: orbitSpin 1s linear infinite;
}

.feed-list-compact .social-card.compact { margin-bottom: 0; }

/* Responsive */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px 22px; }
  .hero-title { font-size: 1.5rem; }
  .stat-num { font-size: 1.2rem; }
  .nav-label { font-size: 0.58rem; }
  .loader-steps { gap: 12px; }
  .loader-step span:last-child { font-size: 0.62rem; }
}

@media (min-width: 768px) {
  .bottom-nav { bottom: 24px; }
}

/* ═══ Profile Page ═══ */
.app-shell.profile-open .bottom-nav {
  transform: translateY(calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
}

.app-shell.profile-open .app-main {
  padding-bottom: 8px;
}

.profile-page {
  padding-bottom: 24px;
  animation: profilePageIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes profilePageIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-hero {
  position: relative;
  text-align: center;
  padding: 16px 20px 28px;
  margin: 0 -16px 20px;
  overflow: hidden;
}

.profile-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 92, 246, 0.22), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(34, 211, 238, 0.1), transparent);
  pointer-events: none;
}

.profile-back {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  margin-right: auto;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

.profile-back:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateX(4px);
}

.profile-avatar-block {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.profile-avatar-ring {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 0deg, #8b5cf6, #22d3ee, #fbbf24, #f472b6, #8b5cf6);
  box-shadow: 0 16px 48px rgba(139, 92, 246, 0.35);
  animation: profileRingGlow 4s ease-in-out infinite;
}

@keyframes profileRingGlow {
  0%, 100% { box-shadow: 0 16px 48px rgba(139, 92, 246, 0.35); }
  50% { box-shadow: 0 20px 56px rgba(34, 211, 238, 0.4); }
}

.profile-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.profile-avatar-letter {
  font-size: 2.8rem;
  font-weight: 900;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: profileAvatarIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes profileAvatarIn {
  from { opacity: 0; transform: scale(1.15); }
  to { opacity: 1; transform: scale(1); }
}

.profile-avatar-shine {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
  pointer-events: none;
  animation: profileShine 3s ease-in-out infinite;
}

@keyframes profileShine {
  0%, 100% { transform: translateX(-30%) rotate(0deg); opacity: 0; }
  50% { transform: translateX(30%) rotate(0deg); opacity: 1; }
}

.profile-change-photo {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}

.profile-change-photo:hover {
  background: rgba(139, 92, 246, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.25);
}

.profile-change-photo:active { transform: scale(0.97); }

.profile-name {
  position: relative;
  font-size: 1.65rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.profile-handle {
  position: relative;
  font-size: 0.9rem;
  color: var(--text-muted);
  direction: ltr;
  margin-bottom: 10px;
}

.profile-view-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  margin-bottom: 10px;
  animation: profileBadgeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes profileBadgeIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-other .profile-hero-bg {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34, 211, 238, 0.18), transparent 70%);
}

.profile-other .profile-avatar-ring {
  animation: profileRingGlowOther 4s ease-in-out infinite;
}

@keyframes profileRingGlowOther {
  0%, 100% { box-shadow: 0 16px 48px rgba(34, 211, 238, 0.35); }
  50% { box-shadow: 0 20px 56px rgba(244, 114, 182, 0.4); }
}

.profile-page.profile-loaded .profile-hero {
  animation: profileHeroIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes profileHeroIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-locked {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  margin-bottom: 20px;
}

.profile-stats-row {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-stat {
  min-width: 88px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  animation: profileStatPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.profile-stat:nth-child(1) { animation-delay: 0.1s; }
.profile-stat:nth-child(2) { animation-delay: 0.18s; }
.profile-stat:nth-child(3) { animation-delay: 0.26s; }

@keyframes profileStatPop {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-stat span {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.profile-section {
  padding: 20px 18px;
  margin-bottom: 16px;
  border-radius: 22px;
  animation: profileSectionIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.profile-section:nth-of-type(1) { animation-delay: 0.15s; }
.profile-section:nth-of-type(2) { animation-delay: 0.25s; }
.profile-section:nth-of-type(3) { animation-delay: 0.35s; }

@keyframes profileSectionIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-section h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.profile-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.profile-form label small { font-weight: 500; opacity: 0.8; }

.profile-input-wrap { margin-bottom: 16px; }

.profile-checkins-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) {
  .profile-checkins-grid { grid-template-columns: repeat(3, 1fr); }
}

.profile-checkins-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
  border: 1px dashed var(--border);
  border-radius: 18px;
}

.profile-checkin-item {
  animation: checkinItemIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--ci, 0) * 0.06s);
}

@keyframes checkinItemIn {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-checkin-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s;
}

.profile-checkin-photo:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.4);
}

.profile-checkin-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.profile-checkin-photo:hover img { transform: scale(1.06); }

.profile-checkin-place {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 28px 10px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-uploading .profile-avatar-ring {
  animation: profileUploadPulse 1s ease infinite;
}

@keyframes profileUploadPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

#panel-profile.active .reveal-item {
  opacity: 1;
  transform: translateY(0);
  animation: profileSectionIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* People Page */
.people-hero {
  position: relative;
  overflow: hidden;
  padding: 20px 18px;
  margin-bottom: 14px;
  border-radius: 22px;
}

.people-hero-aurora {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.35), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.25), transparent 40%);
  animation: peopleAurora 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes peopleAurora {
  from { transform: translate(-3%, -2%) rotate(0deg); }
  to { transform: translate(3%, 2%) rotate(6deg); }
}

.people-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.people-hero-inner h2 {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.people-hero-inner p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.people-hero-stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.people-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.people-stat-pill strong {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.people-stat-pill span {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.people-stat-pill.warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}

.people-stat-pill.warn strong {
  color: #fcd34d;
}

.people-segments {
  display: flex;
  gap: 6px;
  padding: 8px;
  margin-bottom: 14px;
  border-radius: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.people-segments::-webkit-scrollbar { display: none; }

.people-seg {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.25s, border-color 0.25s;
  white-space: nowrap;
}

.people-seg:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--text);
}

.people-seg.active {
  background: var(--gradient-2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
}

.people-seg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-inline-start: 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
}

.people-seg-badge.hidden { display: none; }

.people-pane {
  display: none;
  animation: peoplePaneIn 0.35s ease;
}

.people-pane.active { display: block; }

@keyframes peoplePaneIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.people-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.people-subhead {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  margin: 16px 0 8px;
  padding-inline-start: 4px;
}

.people-search-wrap {
  position: relative;
  margin-bottom: 14px;
}

.people-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
}

#people-search-input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

#people-search-input:focus {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.request-card {
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.04);
}

.btn-friend-accept,
.btn-friend-reject {
  border: none;
  padding: 8px 12px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  white-space: nowrap;
}

.btn-friend-accept {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.btn-friend-accept:hover {
  transform: scale(1.05);
}

.btn-friend-reject {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn-friend-reject:hover {
  background: rgba(248, 113, 113, 0.22);
}

.nav-icon-wrap {
  position: relative;
  display: inline-flex;
}

.nav-badge-dot {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  animation: navBadgePulse 2s ease infinite;
}

.nav-badge-dot.hidden { display: none; }

@keyframes navBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
