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

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --accent-1: #00d4ff;
  --accent-2: #7b2ff7;
  --accent-gold: #ffd700;
  --accent-green: #00e676;
  --accent-red: #ff1744;
  --accent-orange: #ff9100;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 47, 247, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: floatGlow 8s ease-in-out infinite;
}

.bg-glow-2 {
  position: fixed;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: floatGlow 10s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.4s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.5s ease forwards; }
.animate-slideInRight { animation: slideInRight 0.5s ease forwards; }

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
}

.glass-card.interactive {
  cursor: pointer;
}

.glass-card.interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ===== HEADER ===== */
.header {
  padding: 20px 0;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  user-select: none;
}

.logo-sub {
  font-size: 0.7rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  -webkit-text-fill-color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--glass-border-hover);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-green), #00c853);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 30px rgba(0, 230, 118, 0.5);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-red), #d50000);
  color: white;
}

.btn-danger:hover {
  box-shadow: 0 6px 30px rgba(255, 23, 68, 0.4);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #ffaa00);
  color: #1a1a2e;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.btn-gold:hover {
  box-shadow: 0 6px 30px rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
}

/* ===== HOME VIEW ===== */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-top: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title span {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title .count {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  background: var(--bg-card);
  -webkit-text-fill-color: var(--text-secondary);
  padding: 2px 12px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

/* ===== TOURNAMENT LIST ===== */
.tournament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}

.tournament-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.tournament-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  opacity: 0;
  transition: var(--transition);
}

.tournament-card:hover::before {
  opacity: 1;
}

.tournament-card.completed::before {
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
  opacity: 1;
}

.tournament-card .trophy {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.5;
}

.tournament-card .trophy.active {
  animation: pulse 2s ease-in-out infinite;
  opacity: 1;
}

.tournament-name {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
  padding-right: 40px;
}

.tournament-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.tournament-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tournament-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.player-badge {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent-1);
}

.player-badge.gold {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--accent-gold);
}

.tournament-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.tournament-status {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.tournament-status.active {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.tournament-status.completed {
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* ===== FORMS ===== */
.form-section {
  max-width: 720px;
  margin: 40px auto;
  padding: 32px;
}

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

.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.participant-list {
  margin-top: 16px;
}

.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease forwards;
}

.participant-item .info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.participant-item .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

.participant-item .name {
  font-weight: 500;
}

.participant-item .team {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.participant-item .remove-btn {
  background: none;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
  opacity: 0.5;
}

.participant-item .remove-btn:hover {
  opacity: 1;
  background: rgba(255, 23, 68, 0.1);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: flex-end;
}

/* ===== TOURNAMENT DETAIL ===== */
.detail-header {
  padding: 32px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
}

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

.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab {
  padding: 10px 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  white-space: nowrap;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent-1);
}

.tab-content {
  animation: fadeIn 0.4s ease forwards;
}

.tab-content.hidden {
  display: none;
}

/* ===== STANDINGS TABLE ===== */
.standings-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.standings-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}

.standings-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}

.standings-table tr:last-child td {
  border-bottom: none;
}

.standings-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.standings-table .pos {
  font-weight: 700;
  font-size: 1rem;
  width: 40px;
  text-align: center;
}

.standings-table .pos-1 { color: var(--accent-gold); }
.standings-table .pos-2 { color: var(--text-secondary); }
.standings-table .pos-3 { color: var(--accent-orange); }

.standings-table .player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.standings-table .player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  flex-shrink: 0;
}

.standings-table .player-name {
  font-weight: 500;
}

.standings-table .player-team {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.standings-table .points-cell {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-1);
}

.standings-table .gd-positive { color: var(--accent-green); }
.standings-table .gd-negative { color: var(--accent-red); }

/* ===== MATCHES ===== */
.round-section {
  margin-bottom: 24px;
}

.round-header {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.match-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.4s ease forwards;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.match-team.away {
  flex-direction: row-reverse;
  text-align: right;
}

.match-team .team-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

.match-team .team-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.match-team .team-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.match-vs {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.match-score-input {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.match-score-input input {
  width: 50px;
  padding: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  outline: none;
  transition: var(--transition);
}

.match-score-input input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.match-score-input .score-x {
  color: var(--text-muted);
  font-weight: 700;
}

.match-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-weight: 700;
  font-size: 1.2rem;
}

.match-result .score-home { color: var(--accent-1); }
.match-result .score-away { color: var(--accent-2); }
.match-result .score-x { color: var(--text-muted); }

.match-result .winner-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
  margin-left: 8px;
}

.match-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 24px;
}

.stat-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.chart-container {
  position: relative;
  height: 300px;
}

.chart-container-sm {
  height: 250px;
}

/* ===== CHAMPION SECTION ===== */
.champion-section {
  text-align: center;
  padding: 40px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 170, 0, 0.02));
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: var(--radius);
  animation: scaleIn 0.6s ease forwards;
}

.champion-section .crown {
  font-size: 4rem;
  display: block;
  margin-bottom: 8px;
  animation: pulse 2s ease-in-out infinite;
}

.champion-section h2 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--accent-gold), #ffaa00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.champion-section .sub {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 8px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .icon {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ===== CONFETTI ===== */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall 3s ease-in forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .tournament-grid {
    grid-template-columns: 1fr;
  }

  .matches-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .match-score-input input {
    width: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .header-content {
    flex-wrap: wrap;
    gap: 12px;
  }

  .form-section {
    padding: 20px;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: slideInRight 0.3s ease forwards, fadeIn 0.3s ease forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success {
  border-color: rgba(0, 230, 118, 0.3);
}

.toast.error {
  border-color: rgba(255, 23, 68, 0.3);
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px dashed var(--glass-border);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: rgba(255,255,255,0.03);
}
.photo-upload:hover {
  border-color: var(--accent-1);
  background: rgba(0,212,255,0.05);
}
.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  inset: 0;
}
.photo-upload-placeholder {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  transition: var(--transition);
}
.photo-upload:hover .photo-upload-placeholder {
  background: rgba(0,212,255,0.08);
}
.photo-form-row {
  grid-template-columns: 52px 1fr 1fr auto !important;
}

/* ===== AVATAR FALLBACK ===== */
.avatar-fallback {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ===== SORTEIO PENDENTE ===== */
.draw-pending {
  text-align: center;
  padding: 60px 20px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 107, 107, 0.03));
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: var(--radius);
  animation: scaleIn 0.5s ease forwards;
}
.draw-pending .icon {
  font-size: 4rem;
  margin-bottom: 16px;
  display: block;
  animation: pulse 2s ease-in-out infinite;
}
.draw-pending h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.draw-pending p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== DRAW OVERLAY ===== */
.draw-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 14, 23, 0.94);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease forwards;
}
.draw-content {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 24px;
  text-align: center;
}
.draw-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  animation: scaleIn 0.5s ease forwards;
}
.shuffle-area {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 32px;
  min-height: 52px;
}
.shuffle-chip {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
  animation: fadeIn 0.3s ease forwards;
  user-select: none;
}
.shuffle-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.draw-rounds {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.draw-round-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-1);
  margin-bottom: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  animation: slideInLeft 0.4s ease forwards;
}
.draw-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.draw-match-card {
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scaleIn 0.4s ease forwards;
}
.draw-match-card .d-teams {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  justify-content: center;
}
.draw-match-card .d-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  font-size: 0.85rem;
}
.draw-match-card .d-team img,
.draw-match-card .d-team .avatar-fallback {
  width: 44px;
  height: 44px;
  border: 2px solid var(--glass-border);
}
.draw-match-card .d-vs {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--accent-gold);
}
.draw-complete {
  margin-top: 32px;
  padding: 24px;
  animation: scaleIn 0.5s ease forwards;
}
.draw-complete h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent-green);
  margin-bottom: 8px;
}
.draw-complete p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ===== RANKING / HALL DA FAMA ===== */
.ranking-hero {
  text-align: center;
  padding: 48px 0 32px;
}
.ranking-hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange), var(--accent-1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ranking-hero p {
  color: var(--text-muted);
  margin-top: 8px;
}
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding-bottom: 60px;
}
.ranking-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.5s ease forwards;
  position: relative;
}
.ranking-card.pos-1 {
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,170,0,0.03));
  border-color: rgba(255,215,0,0.25);
}
.ranking-card.pos-2 {
  background: linear-gradient(135deg, rgba(192,192,192,0.06), rgba(128,128,128,0.03));
  border-color: rgba(192,192,192,0.2);
}
.ranking-card.pos-3 {
  background: linear-gradient(135deg, rgba(205,127,50,0.06), rgba(205,127,50,0.03));
  border-color: rgba(205,127,50,0.2);
}
.ranking-pos {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  min-width: 44px;
  text-align: center;
}
.ranking-pos.p1 { color: var(--accent-gold); }
.ranking-pos.p2 { color: #c0c0c0; }
.ranking-pos.p3 { color: #cd7f32; }
.ranking-pos.other { color: var(--text-muted); }
.ranking-info {
  flex: 1;
  min-width: 0;
}
.ranking-name {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ranking-trophies {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
}
.ranking-stats {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.ranking-bar-wrap {
  margin-top: 8px;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
}
.ranking-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
  transition: width 0.8s ease;
}
.ranking-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.ranking-empty .icon {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 12px;
  display: block;
}
.ranking-empty h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ===== LOADING SHIMMER ===== */
.shimmer-loading {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
