/* RESET E VARIÁVEIS GLORAIS */
:root {
  --bg-dark: #0d0f17;
  --bg-card: rgba(22, 27, 46, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --radius: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(124, 58, 237, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.12) 0%, transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-card-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .highlight {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--text-main);
}

.play-btn {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.play-btn:hover {
  background: var(--primary);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

/* HERO SECTION */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  max-width: 850px;
  margin: 0 auto;
}

.badge-tag {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  line-height: 1.15;
  margin: 1.2rem 0 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* BOTÕES E CARDS */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  text-decoration: none;
  border: 1px solid var(--bg-card-border);
}

.btn-hero {
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: #fff;
  text-decoration: none;
}

.btn-danger {
  background: var(--accent-red);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* MAIN CONTAINER & GRIDS */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section {
  margin-top: 3.5rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
}

.section-header p {
  color: var(--text-muted);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: var(--transition);
}

.achievement-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.achievement-icon {
  font-size: 2.2rem;
  background: rgba(124, 58, 237, 0.15);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.achievement-info h4 {
  font-size: 1.05rem;
}

.achievement-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.achievement-xp {
  margin-top: 4px;
  display: inline-block;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.8rem;
}

/* LEADERBOARD TABLE */
.table-card {
  overflow-x: auto;
  padding: 0;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.leaderboard-table th, 
.leaderboard-table td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.leaderboard-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.leaderboard-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* DASHBOARD DO PLAYER */
.dashboard-card {
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(124, 58, 237, 0.4);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.avatar {
  font-size: 2rem;
  background: var(--primary);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-info {
  flex: 1;
}

.stats-badge {
  text-align: right;
  margin-right: 1.5rem;
}

.stats-badge .label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stats-badge .score-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

/* MODAL & TOASTS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: #131726;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.auth-form h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
}

.auth-form .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1.2rem;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.input-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--bg-card-border);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  outline: none;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

.switch-form {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1f293d;
  border-left: 4px solid var(--primary);
  color: #fff;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.hidden { display: none !important; }
.text-center { text-align: center; }