@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════
   ROSEWOOD LOS ANGELES — DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg-primary: #08090e;
  --bg-secondary: #0f1118;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --bg-glass: rgba(12,13,20,0.75);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --accent: #ef4444;
  --accent-dark: #dc2626;
  --accent-glow: rgba(239,68,68,0.25);
  --amber: #f59e0b;
  --text: #f0f0f5;
  --text-dim: #8b8fa3;
  --text-muted: #555770;
  --nav-h: 70px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── NAVBAR ─────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  height: var(--nav-h);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(8,9,14,0.95); }
.nav-container {
  max-width: 1400px; margin: 0 auto;
  height: 100%; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-img { height: 42px; width: 42px; border-radius: 50%; object-fit: cover; }
.nav-logo-text {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: 20px; letter-spacing: 1.5px;
}
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-dim);
  transition: var(--transition); position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--accent); border-radius: 1px;
}
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border-hover);
}
.nav-username { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.nav-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 24px; cursor: pointer;
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); border: none;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #fff; box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-discord {
  background: #5865F2; color: #fff;
  box-shadow: 0 4px 15px rgba(88,101,242,0.3);
}
.btn-discord:hover { background: #4752c4; transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-logout {
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  border: 1px solid var(--border); padding: 6px 14px; font-size: 12px;
}
.btn-logout:hover { background: rgba(239,68,68,0.1); color: var(--accent); border-color: var(--accent); }

/* ─── LANDING PAGE ───────────────────────────────────── */
.landing {
  height: 100vh; display: flex;
  padding-top: var(--nav-h);
  overflow: hidden; /* Dikey scroll'u engeller */
}
.landing-hero {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; padding: 20px 60px;
  position: relative; z-index: 1;
}
.landing-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 30% 50%, rgba(239,68,68,0.06) 0%, transparent 60%);
}
.hero-logo { width: 220px; margin-bottom: 20px; border-radius: 16px; }
.hero-title {
  font-family: 'Outfit', sans-serif; font-size: 40px;
  font-weight: 800; line-height: 1.1; margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 40%, var(--text-dim));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 15px; color: var(--text-dim); line-height: 1.6; margin-bottom: 24px; max-width: 500px; }
.hero-stats {
  display: flex; gap: 16px; margin-bottom: 24px;
}
.stat-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
}
.stat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stat-dot.online { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.stat-dot.offline { background: #ef4444; }
.stat-label { font-size: 13px; color: var(--text-dim); }
.stat-value { font-family: 'Outfit'; font-size: 22px; font-weight: 700; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-links { display: flex; gap: 16px; }
.hero-links a {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.hero-links a:hover { color: var(--text); }

/* ─── GALLERY SLIDER (Landing Right) ────────────────── */
.landing-gallery {
  width: 450px; flex-shrink: 0; position: relative;
  overflow: hidden; border-left: 1px solid var(--border);
  height: 100%; /* Ensure it fills parent */
}
.landing-gallery::before, .landing-gallery::after {
  content: ''; position: absolute; left: 0; right: 0; height: 120px;
  z-index: 2; pointer-events: none;
}
.landing-gallery::before { top: 0; background: linear-gradient(to bottom, var(--bg-primary), transparent); }
.landing-gallery::after { bottom: 0; background: linear-gradient(to top, var(--bg-primary), transparent); }
.gallery-track {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px; animation: scrollUp 40s linear infinite;
}
.gallery-track:hover { animation-play-state: paused; }
.gallery-track img {
  width: 100%; border-radius: var(--radius); aspect-ratio: 16/10;
  object-fit: cover; transition: var(--transition); cursor: pointer;
}
.gallery-track img:hover { transform: scale(1.03); box-shadow: 0 8px 30px rgba(0,0,0,0.5); }
@keyframes scrollUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

/* ─── GLASS CARD ─────────────────────────────────────── */
.glass-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(12px);
  transition: var(--transition);
}
.glass-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }

/* ─── PAGE LAYOUT ────────────────────────────────────── */
.page { padding-top: calc(var(--nav-h) + 40px); min-height: 100vh; }
.page-container { max-width: 1200px; margin: 0 auto; padding: 0 40px 60px; }
.page-header { text-align: center; margin-bottom: 50px; }
.page-title {
  font-family: 'Outfit'; font-size: 42px; font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, var(--text-dim));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-subtitle { font-size: 15px; color: var(--text-dim); max-width: 600px; margin: 0 auto; }

/* ─── GALLERY PAGE ───────────────────────────────────── */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  cursor: pointer; aspect-ratio: 16/10;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: '🔍'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: rgba(0,0,0,0.4);
  opacity: 0; transition: var(--transition);
}
.gallery-item:hover::after { opacity: 1; }

/* ─── ABOUT PAGE ─────────────────────────────────────── */
.about-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 50px; max-width: 900px; margin: 0 auto;
}
.about-card p {
  font-size: 14px; line-height: 1.9; color: var(--text-dim);
  margin-bottom: 20px;
}
.about-card p:last-child { margin-bottom: 0; }

/* ─── RULES PAGE ─────────────────────────────────────── */
.rules-tabs {
  display: flex; gap: 6px; margin-bottom: 30px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px; width: fit-content;
  margin-left: auto; margin-right: auto;
}
.rules-tab {
  padding: 10px 24px; border-radius: 6px; border: none;
  background: transparent; color: var(--text-dim);
  font-family: 'Inter'; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
}
.rules-tab.active { background: var(--accent); color: #fff; }
.rules-tab:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.05); }
.rules-panel { display: none; }
.rules-panel.active { display: block; animation: fadeIn .3s; }
.rule-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px; overflow: hidden;
}
.rule-header {
  padding: 16px 20px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 14px; transition: var(--transition);
}
.rule-header:hover { background: rgba(255,255,255,0.02); }
.rule-header .arrow { transition: transform .3s; color: var(--text-muted); }
.rule-item.open .arrow { transform: rotate(180deg); }
.rule-body {
  max-height: 0; overflow: hidden; transition: max-height .5s ease;
  padding: 0 20px;
}
.rule-item.open .rule-body { max-height: 6000px; padding: 0 20px 16px; }
.rule-body p { font-size: 13px; color: var(--text-dim); line-height: 1.8; margin-bottom: 6px; }

/* ─── DONATE PAGE ────────────────────────────────────── */
.donate-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.donate-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition); cursor: pointer;
}
.donate-item:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.donate-img-wrap { position: relative; overflow: hidden; aspect-ratio: 1/1; }
.donate-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.donate-item:hover .donate-img-wrap img { transform: scale(1.08); }
.donate-info { padding: 16px; }
.donate-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.donate-price { color: var(--accent); font-weight: 700; font-size: 14px; }
.donate-buy {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); opacity: 0; transition: var(--transition);
}
.donate-item:hover .donate-buy { opacity: 1; }

/* ─── APPLICATION FORM ───────────────────────────────── */
.form-container {
  max-width: 900px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.form-container iframe { width: 100%; height: 80vh; border: none; }

/* ─── LIGHTBOX ───────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  padding: 40px; cursor: zoom-out;
}
.lightbox.active { display: flex; animation: fadeIn .2s; }
.lightbox img {
  max-width: 90%; max-height: 85vh; border-radius: var(--radius);
  cursor: default; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 20px; right: 30px;
  font-size: 32px; color: var(--text-dim); cursor: pointer;
  background: none; border: none; transition: var(--transition);
}
.lightbox-close:hover { color: #fff; }
.lightbox-info { position: absolute; bottom: 30px; text-align: center; }
.lightbox-name { font-family: 'Outfit'; font-size: 20px; font-weight: 600; }
.lightbox-price { color: var(--accent); margin-top: 4px; font-weight: 600; }
.lightbox-cta {
  margin-top: 12px; display: inline-block;
  background: var(--accent); color: #fff; padding: 10px 20px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
}

/* ─── TOAST ──────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 30px; right: 30px; z-index: 10000;
  background: var(--bg-glass); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 24px; font-size: 14px; color: var(--text);
  animation: slideInRight .3s; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.toast.error { border-color: var(--accent); }
.toast.success { border-color: #22c55e; }

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.fade-up { animation: fadeUp .8s both; }
.fade-up-delay-1 { animation-delay: .1s; }
.fade-up-delay-2 { animation-delay: .2s; }
.fade-up-delay-3 { animation-delay: .3s; }

/* ─── PARTICLES BG ───────────────────────────────────── */
.particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.particles span {
  position: absolute; width: 2px; height: 2px; background: rgba(255,255,255,0.15);
  border-radius: 50%; animation: float linear infinite;
}
@keyframes float {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ─── AUTH STATES ────────────────────────────────────── */
[data-auth] { display: none !important; }
body.auth-guest [data-auth="guest"] { display: flex !important; }
body.auth-no-wl [data-auth="no-wl"],
body.auth-no-wl [data-auth="logged-in"] { display: flex !important; }
body.auth-wl [data-auth="wl-only"],
body.auth-wl [data-auth="logged-in"] { display: flex !important; }

/* ─── ACCESS DENIED ──────────────────────────────────── */
.access-denied {
  min-height: 80vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px;
}
.access-denied h2 { font-family: 'Outfit'; font-size: 28px; margin-bottom: 12px; }
.access-denied p { color: var(--text-dim); margin-bottom: 24px; }

/* ─── LOADING ────────────────────────────────────────── */
.page-loading {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .4s;
}
.page-loading.hide { opacity: 0; pointer-events: none; }
.loader {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .landing { flex-direction: column; overflow: auto; height: auto; }
  .landing-gallery { width: 100%; height: 260px; border-left: none; border-top: 1px solid var(--border); }
  .gallery-track { flex-direction: row; animation: scrollLeft 30s linear infinite; }
  .gallery-track img { width: 240px; height: 160px; flex-shrink: 0; }
  @keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
  .landing-hero { padding: 40px; }
  .hero-title { font-size: 32px; }
  .hero-logo { width: 180px; }
}
@media (max-width: 768px) {
  .nav-container { padding: 0 20px; }
  .nav-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-glass); backdrop-filter: blur(20px);
    flex-direction: column; padding: 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%); opacity: 0;
    transition: var(--transition); pointer-events: none;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .nav-toggle { display: block; }
  .page-container { padding: 0 20px 40px; }
  .page-title { font-size: 30px; }
  .landing-hero { padding: 30px 20px; }
  .hero-title { font-size: 28px; }
  .hero-stats { flex-direction: column; }
  .about-card { padding: 30px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .donate-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
