/* ==========================================================================
   TYPE & PLAY - MASTER DESIGN SYSTEM & GLOBAL STYLES
   Practice. Play. Improve. Compete.
   ========================================================================== */

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

:root {
  /* Core Backgrounds */
  --bg-dark: #07090e;
  --bg-primary: #0a0e17;
  --bg-secondary: #0f172a;
  --bg-card: rgba(19, 30, 49, 0.7);
  --bg-card-hover: rgba(28, 43, 71, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.82);
  --border-glass: rgba(0, 240, 255, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.08);

  /* Neon Brand Accents */
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.4);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.4);
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.4);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.4);
  --crimson: #ef4444;
  --crimson-glow: rgba(239, 68, 68, 0.45);
  --blue: #3b82f6;

  /* Typography Colors */
  --text-pure: #ffffff;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Elevations */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
  --shadow-neon: 0 0 20px var(--cyan-glow);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-primary);
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 50% 0%, #131c31 0%, var(--bg-dark) 70%);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle Animated Cyber Grid Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--cyan-glow);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Container */
.tp-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.tp-navbar {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
  padding: 0.75rem 0;
  transition: background var(--transition-normal);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: var(--text-pure);
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-radius: var(--radius-sm);
  color: #000;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 0 15px var(--cyan-glow);
}

.brand-name-glow {
  background: linear-gradient(90deg, #fff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--cyan);
  border-bottom: 2px solid var(--cyan);
}

/* User & Controls Header Widget */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-user-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.header-player-avatar {
  font-size: 1.1rem;
}

.header-player-level {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.25);
}

.header-xp-bar-container {
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.header-xp-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--emerald));
  transition: width 0.4s ease;
}

.btn-icon-sound {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon-sound:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.btn-nav-play {
  background: linear-gradient(135deg, var(--crimson), #dc2626);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 0 16px var(--crimson-glow);
  transition: all var(--transition-bounce);
}

.btn-nav-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.7);
  color: #fff;
}

.hamburger-btn {
  display: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 0.25rem;
  cursor: pointer;
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER
   ========================================================================== */
.tp-mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: #090e18;
  border-left: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
  z-index: 9999;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
}

.tp-mobile-nav-drawer.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1.6rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--crimson);
  color: var(--crimson);
}

.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  flex: 1;
}

.drawer-link {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.drawer-link:hover, .drawer-link.active {
  color: #fff;
  background: rgba(0, 240, 255, 0.1);
  color: var(--cyan);
}

.drawer-cta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

/* ==========================================================================
   BUTTONS & UI CONTROLS
   ========================================================================== */
.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-bounce);
  text-align: center;
  text-decoration: none;
}

.tp-btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #0284c7 100%);
  color: #04101e;
  box-shadow: 0 0 20px var(--cyan-glow);
}

.tp-btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
  color: #04101e;
}

.tp-btn-danger {
  background: linear-gradient(135deg, var(--crimson) 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 0 20px var(--crimson-glow);
}

.tp-btn-danger:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
  color: #fff;
}

.tp-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.tp-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-2px);
}

.tp-btn-emerald {
  background: linear-gradient(135deg, var(--emerald) 0%, #059669 100%);
  color: #032014;
  box-shadow: 0 0 20px var(--emerald-glow);
}

.tp-btn-emerald:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
  color: #032014;
}

/* ==========================================================================
   CARDS & SECTIONS
   ========================================================================== */
.tp-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.tp-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tp-card-glow-cyan:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.2);
}

.tp-card-glow-crimson:hover {
  border-color: var(--crimson);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.2);
}

.tp-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.tp-section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 240, 255, 0.25);
  margin-bottom: 0.75rem;
}

.tp-section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-pure);
  letter-spacing: -0.5px;
}

.tp-section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0.5rem auto 0 auto;
}

/* ==========================================================================
   TOAST NOTIFICATION POPUPS
   ========================================================================== */
.tp-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.tp-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 240, 255, 0.25);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  min-width: 280px;
  max-width: 380px;
  transform: translateX(120%);
  opacity: 0;
  transition: all var(--transition-bounce);
  pointer-events: auto;
}

.tp-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.tp-toast-success {
  border-color: var(--emerald);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.tp-toast-level-up {
  border-color: var(--amber);
  box-shadow: 0 0 25px var(--amber-glow);
  background: linear-gradient(135deg, rgba(20, 25, 45, 0.95), rgba(40, 25, 10, 0.95));
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.toast-msg {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.tp-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.tp-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.tp-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-lg), 0 0 35px rgba(0, 240, 255, 0.2);
  position: relative;
  transform: scale(0.92);
  transition: all var(--transition-bounce);
}

.tp-modal-backdrop.active .tp-modal-card {
  transform: scale(1);
}

.tp-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  transition: color var(--transition-fast);
}

.tp-modal-close:hover {
  color: #fff;
}

/* ==========================================================================
   SHARE CARD STYLING
   ========================================================================== */
.tp-share-card {
  background: linear-gradient(145deg, #0f1c33 0%, #090f1d 100%);
  border: 2px solid var(--cyan);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.25);
  margin-bottom: 1.5rem;
}

.share-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.share-brand .brand-glow {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--cyan);
  display: block;
}

.share-brand .brand-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.share-badge {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--cyan);
}

.share-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

.share-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 1rem;
}

.share-stat-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.stat-val {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
}

.stat-cyan { color: var(--cyan); }
.stat-emerald { color: var(--emerald); }
.stat-amber { color: var(--amber); }
.stat-purple { color: var(--purple); }

.share-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.share-buttons-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 1rem;
}

.btn-whatsapp { background: #25D366; color: #000; }
.btn-whatsapp:hover { background: #20ba5a; }
.btn-twitter { background: #1da1f2; color: #fff; }
.btn-twitter:hover { background: #0c85d0; }
.btn-facebook { background: #1877f2; color: #fff; }
.btn-facebook:hover { background: #0c63d4; }

.share-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.tp-footer {
  background: #06090f;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem 0;
  margin-top: 5rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h4 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.5;
}

.footer-col h5 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
