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

:root {
  --bg-gradient: radial-gradient(circle at 0% 0%, #161b33 0, #050816 40%, #050816 100%);
  --accent: #4c9fff;
  --accent-soft: rgba(76, 159, 255, 0.15);
  --accent-2: #ff6ec7;
  --text-main: #e5e9f0;
  --text-muted: #a0aec0;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(15, 23, 42, 0.68);
  --glass-bg-soft: rgba(15, 23, 42, 0.82);
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --blur: 18px;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.28s ease-out;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
}

/* Layout */
.container {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
}

/* Glass utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 12px auto 0;
  width: min(1120px, 100% - 32px);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.9),
      rgba(15, 23, 42, 0.7)
    );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
}

.nav-logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.98rem;
  color: #f9fafb;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  font-size: 0.9rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.nav-links a:hover {
  color: #f9fafb;
  background: rgba(148, 163, 184, 0.18);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: #0b1120;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* Hero */
.hero {
  padding: 72px 0 40px;
}

.hero-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 3vw, 3rem);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), border-color var(--transition-fast);
}

.btn-primary {
  background: radial-gradient(circle at 0 0, var(--accent-2), var(--accent));
  color: #020617;
  box-shadow: 0 12px 30px rgba(76, 159, 255, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(76, 159, 255, 0.6);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.4);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

/* Sections */
.features {
  padding: 40px 0 32px;
}

.features h2 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 22px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0 0, rgba(76, 159, 255, 0.16), transparent),
    var(--glass-bg-soft);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* CTA */
.cta {
  padding: 26px 0 40px;
}

.cta .container {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(76, 159, 255, 0.18), rgba(255, 110, 199, 0.1)),
    rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.cta h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.cta p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Page header */
.page-header {
  text-align: center;
  padding: 52px 0 22px;
}

.page-header h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Games */
.games-showcase {
  padding: 8px 0 36px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.game-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-soft);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.game-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.game-card-content {
  padding: 14px 15px 16px;
}

.game-card-content h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.game-card-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* About */
.about-content {
  padding: 12px 0 42px;
}

.about-text,
.about-stats {
  margin-bottom: 22px;
}

.about-text h2,
.about-stats h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.about-text p {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.stat-item {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(148, 163, 184, 0.25);
  text-align: center;
}

.stat-item h3 {
  font-size: 2rem;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  color: transparent;
}

.stat-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Auth */
.auth-container {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
}

.auth-box {
  width: 100%;
  max-width: 380px;
  padding: 22px 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg-soft);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

.auth-box h2 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.auth-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76, 159, 255, 0.35);
}

.btn-block {
  width: 100%;
  margin-top: 6px;
}

.form-footer {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-footer a {
  color: var(--accent);
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

.back-link {
  opacity: 0.85;
}

/* Messages */
.message {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 0.82rem;
  text-align: center;
  display: none;
}

.message.success {
  background: rgba(22, 163, 74, 0.16);
  border: 1px solid rgba(22, 163, 74, 0.4);
  color: #bbf7d0;
}

.message.error {
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

/* Dashboard */
.dashboard-container {
  padding: 40px 0 34px;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 20px;
}

.dashboard-header h1 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.dashboard-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.dashboard-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.dashboard-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.dashboard-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Footer */
.footer {
  padding: 20px 0 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links {
  margin-top: 6px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 6px;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Misc */
.loading {
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    border-radius: 16px;
  }
  .nav-links {
    display: none; /* for now, simple collapse */
  }
}