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

:root {
  --bg: #050505;
  --card: rgba(20, 20, 20, 0.7);
  --card-hover: rgba(30, 30, 30, 0.9);
  --gold: #e5b85c;
  --gold-glow: rgba(229, 184, 92, 0.4);
  --text: #f5f5f5;
  --mut: #9e9e9e;
  --line: rgba(255, 255, 255, 0.08);
  --red: #ef4444;
  --radius: 16px;
  --font: 'Outfit', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: radial-gradient(circle at top right, rgba(229,184,92,0.05), transparent 40%),
                    radial-gradient(circle at bottom left, rgba(229,184,92,0.05), transparent 40%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: 0.3s ease; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 16px; }

/* Typography */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--gold); }
p { color: var(--mut); }

/* Layout */
.wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 5vw;
  flex: 1;
}

/* Premium Header */
.top {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(5, 5, 5, 0.85);
  border-bottom: 1px solid var(--line);
  padding: 1rem 5vw;
  transition: 0.3s;
}
.nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.logo span { background: linear-gradient(90deg, #fff, var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.menu { display: flex; gap: 2rem; }
.menu a { font-weight: 600; font-size: 0.95rem; color: var(--mut); }
.menu a:hover, .menu a.on { color: var(--gold); text-shadow: 0 0 10px var(--gold-glow); }

/* Search Bar */
.sf input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 30px;
  outline: none;
  width: 200px;
  transition: 0.3s;
}
.sf input:focus { border-color: var(--gold); box-shadow: 0 0 15px var(--gold-glow); width: 240px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.btn.gold {
  background: linear-gradient(135deg, var(--gold), #b88d36);
  color: #000;
  border: none;
  box-shadow: 0 4px 15px rgba(229, 184, 92, 0.3);
}
.btn.gold:hover { box-shadow: 0 6px 20px rgba(229, 184, 92, 0.5); transform: translateY(-2px); }
.btn.red { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid #ef4444; }
.btn.red:hover { background: #ef4444; color: #fff; }
.btn.sm { padding: 6px 14px; font-size: 0.85rem; }

/* Hero Section */
.hero {
  position: relative;
  padding: 6rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 3rem;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.6) 100%);
  z-index: 1;
}
.hero > * { position: relative; z-index: 2; }
.hero p { font-size: 1.2rem; max-width: 600px; margin-bottom: 2rem; }
.hero .row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Grid & Cards */
.sec { margin-bottom: 4rem; }
.sh { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; }
.sh a { font-size: 0.9rem; color: var(--gold); font-weight: 600; }
.sh a:hover { text-decoration: underline; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.4s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--gold-glow);
  background: var(--card-hover);
}
.card .th { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #111; }
.card .th img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .th img { transform: scale(1.1); }
.card h3 { font-size: 1.1rem; padding: 1rem 1rem 0.5rem; margin: 0; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card p { font-size: 0.85rem; padding: 0 1rem 1rem; color: var(--mut); }

/* Badges */
.badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  color: var(--gold);
  font-size: 0.75rem; font-weight: 800;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--gold);
  z-index: 2;
}
.badge.free { color: #4ade80; border-color: #4ade80; }
.lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; background: rgba(0,0,0,0.5); opacity: 0; transition: 0.3s; }
.card:hover .lock { opacity: 1; }

/* Forms (Auth, Admin) */
.fm { display: grid; gap: 1rem; }
.fm label { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.fm input, .fm textarea, .fm select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px;
  border-radius: 8px;
  outline: none;
  transition: 0.3s;
}
.fm input:focus, .fm textarea:focus, .fm select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Footer */
.ft {
  border-top: 1px solid var(--line);
  padding: 2rem 5vw;
  text-align: center;
  margin-top: auto;
  background: #030303;
}
.ft a { color: var(--gold); margin: 0 10px; }
.ft p { margin: 5px 0; font-size: 0.9rem; }

/* Mobile Bottom Nav */
#tb { display: none; }

/* Utilities */
.mut { color: var(--mut); font-size: 0.9rem; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #000; padding: 12px 24px; border-radius: 30px; font-weight: 600; z-index: 9999; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.toast.err { background: var(--red); color: #fff; }