/* ================================================
   Poss Dev Studio - Global Styles
   ================================================ */

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

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; min-height: 100vh; }
a { text-decoration: none; }
button { cursor: pointer; border: none; outline: none; }

/* ================================================
   MODERN THEME (main site, apps)
   ================================================ */

body.modern {
  background: #0a0e1a;
  color: #e2e8f0;
}

/* --- Nav --- */
#nav-container { position: sticky; top: 0; z-index: 100; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 2rem;
  height: 64px;
  background: rgba(10,14,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e2a3a;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: #00d4ff;
  letter-spacing: -0.02em;
  margin-right: auto;
  white-space: nowrap;
}

.nav-links { display: flex; gap: 0.25rem; }

.nav-link {
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-link:hover { color: #e2e8f0; background: #1e2a3a; }
.nav-link.active { color: #00d4ff; background: rgba(0,212,255,0.08); }

.nav-auth { display: flex; align-items: center; gap: 0.75rem; }

.nav-username {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-nav-login {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.btn-nav-login:hover { color: #e2e8f0; background: #1e2a3a; }

.btn-nav-register {
  background: #00d4ff;
  color: #0a0e1a;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.btn-nav-register:hover { background: #22d3ee; }

.btn-nav-logout {
  background: transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #1e2a3a;
  transition: all 0.15s;
}
.btn-nav-logout:hover { color: #e2e8f0; border-color: #334155; }

.nav-toggle { display: none; background: none; color: #e2e8f0; font-size: 1.3rem; }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: #0a0e1a;
  border-bottom: 1px solid #1e2a3a;
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link { padding: 0.5rem 0; }

@media (max-width: 640px) {
  .nav-links, .nav-auth { display: none; }
  .nav-toggle { display: block; }
}

/* --- Modern Cards --- */
.card {
  background: #141827;
  border: 1px solid #1e2a3a;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s;
}
.card:hover { border-color: #334155; transform: translateY(-2px); }

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #00d4ff;
  color: #0a0e1a;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  transition: all 0.15s;
  border: none;
}
.btn-primary:hover { background: #22d3ee; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  border: 1px solid #334155;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: #4a5568; background: #1e2a3a; }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.85rem; font-weight: 500; color: #94a3b8; }
.form-input {
  background: #0a0e1a;
  border: 1px solid #1e2a3a;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.15s;
  width: 100%;
}
.form-input:focus { outline: none; border-color: #00d4ff; }
.form-input::placeholder { color: #475569; }

.form-error {
  font-size: 0.8rem;
  color: #f87171;
  min-height: 1.2em;
}

/* --- Utility --- */
.text-muted { color: #64748b; }
.text-accent { color: #00d4ff; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ================================================
   RETRO THEME (games)
   ================================================ */

body.retro {
  background: #000;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
}

body.retro #nav-container { position: sticky; top: 0; z-index: 100; }

body.retro .main-nav {
  background: #000;
  border-bottom: 2px solid #00ffff;
  box-shadow: 0 0 20px rgba(0,255,255,0.3);
}

body.retro .nav-logo {
  color: #00ffff;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  text-shadow: 0 0 10px #00ffff;
}

body.retro .nav-link {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: #888;
}
body.retro .nav-link:hover { color: #00ffff; background: rgba(0,255,255,0.05); }
body.retro .nav-link.active { color: #00ffff; }

body.retro .nav-username {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: #39ff14;
}

body.retro .btn-nav-login,
body.retro .btn-nav-logout {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: #888;
  border-color: #333;
}

body.retro .btn-nav-register {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  background: #00ffff;
  color: #000;
}

/* Retro neon text effects */
.neon-cyan  { color: #00ffff; text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff; }
.neon-green { color: #39ff14; text-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14; }
.neon-pink  { color: #ff00ff; text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff; }
.neon-yellow{ color: #ffff00; text-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; }

/* Retro panel */
.retro-panel {
  border: 2px solid #00ffff;
  box-shadow: 0 0 15px rgba(0,255,255,0.3), inset 0 0 15px rgba(0,255,255,0.03);
  background: #050505;
  padding: 1rem;
}

/* Retro leaderboard */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.55rem;
  font-family: 'Press Start 2P', monospace;
}
.leaderboard-table th {
  color: #00ffff;
  border-bottom: 1px solid #00ffff;
  padding: 0.5rem 0.3rem;
  text-align: left;
}
.leaderboard-table td {
  padding: 0.5rem 0.3rem;
  border-bottom: 1px solid #111;
  color: #aaa;
}
.leaderboard-table tr:first-child td { color: #ffff00; }
.leaderboard-table tr:nth-child(2) td { color: #aaaaaa; }
.leaderboard-table tr:nth-child(3) td { color: #cd7f32; }

/* Retro game overlay */
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 10;
}

.retro-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid currentColor;
  background: transparent;
  cursor: pointer;
  transition: all 0.1s;
  letter-spacing: 0.05em;
}
.retro-btn:hover { background: currentColor; }
.retro-btn:hover span { filter: invert(1); }
.retro-btn.cyan  { color: #00ffff; box-shadow: 0 0 10px rgba(0,255,255,0.4); }
.retro-btn.green { color: #39ff14; box-shadow: 0 0 10px rgba(57,255,20,0.4); }
.retro-btn.pink  { color: #ff00ff; box-shadow: 0 0 10px rgba(255,0,255,0.4); }
