/* ============================================================
   Penca Mundial 2026 - Main Stylesheet
   FIFA World Cup 2026 Theme: Dark Blue, Red, Gold
   ============================================================ */

/* Custom Properties */
:root {
  --primary:       #003DA5;
  --primary-light: #0052CC;
  --primary-dark:  #002480;
  --secondary:     #C8102E;
  --secondary-dark:#a00d24;
  --accent:        #FFD700;
  --accent-dark:   #e6c200;
  --dark:          #0a0a1a;
  --darker:        #050510;
  --mid-dark:      #111128;
  --light:         #f8f9fa;
  --light-gray:    #e9ecef;
  --card-bg:       #ffffff;
  --card-border:   rgba(0, 61, 165, 0.12);
  --gradient-hero: linear-gradient(135deg, #050510 0%, #001a52 50%, #0a0f2e 100%);
  --gradient-primary: linear-gradient(135deg, #003DA5, #0066CC);
  --gradient-danger:  linear-gradient(135deg, #C8102E, #ff1744);
  --gradient-gold:    linear-gradient(135deg, #FFD700, #FFA000);
  --shadow-sm:     0 2px 8px rgba(0,61,165,0.12);
  --shadow-md:     0 4px 20px rgba(0,61,165,0.18);
  --shadow-lg:     0 8px 40px rgba(0,61,165,0.25);
  --border-radius: 12px;
  --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:  'Bebas Neue', Impact, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--dark);
  color: #e8e9f0;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--primary-light); transition: var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--darker); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ============================================================
   PAGE LOADER
   ============================================================ */
.page-loader {
  position: fixed; inset: 0;
  background: var(--darker);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  transition: opacity 0.3s;
}
.loader-ball {
  font-size: 3.5rem;
  animation: spin 1s linear infinite, bounce 0.5s alternate infinite;
}
@keyframes spin   { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes bounce { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-20px) rotate(360deg); } }

/* ============================================================
   NAVBAR
   ============================================================ */
.penca-navbar {
  background: linear-gradient(90deg, rgba(0,8,35,0.97) 0%, rgba(0,36,128,0.95) 100%);
  border-bottom: 1px solid rgba(255,215,0,0.15);
  backdrop-filter: blur(10px);
  padding: 0.6rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
  transition: var(--transition);
}

.navbar-brand {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.brand-icon  { font-size: 1.5rem; filter: drop-shadow(0 0 6px rgba(255,215,0,0.5)); }
.brand-text  { font-family: var(--font-display); font-size: 1.4rem; color: #ffffff; letter-spacing: 1px; }
.brand-year  { color: var(--accent); }

.penca-navbar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}
.penca-navbar .nav-link:hover,
.penca-navbar .nav-link.active {
  color: var(--accent) !important;
  background: rgba(255,215,0,0.08);
}
.nav-admin-link { color: var(--accent) !important; }
.nav-admin-link:hover { background: rgba(255,215,0,0.15) !important; }

.btn-register-nav {
  background: var(--gradient-danger) !important;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
}
.btn-register-nav:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(200,16,46,0.4); }

.user-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--gradient-gold);
  color: var(--dark);
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.75rem;
  margin-right: 6px;
}

.penca-dropdown {
  background: var(--mid-dark);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}
.penca-dropdown .dropdown-item {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  padding: 0.6rem 1rem;
  transition: var(--transition);
}
.penca-dropdown .dropdown-item:hover { background: rgba(0,61,165,0.3); color: #fff; }
.penca-dropdown .dropdown-item.text-danger:hover { background: rgba(200,16,46,0.2); }
.penca-dropdown .dropdown-divider { border-color: rgba(255,255,255,0.1); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  min-height: 85vh;
  display: flex; align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,61,165,0.4) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 50%, rgba(200,16,46,0.15) 0%, transparent 60%);
}

.hero-particles {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-particles span {
  position: absolute;
  font-size: 2rem;
  opacity: 0.06;
  animation: floatUp linear infinite;
}
.hero-particles span:nth-child(1)  { left: 5%;  animation-duration: 12s; animation-delay: 0s;   font-size: 1.5rem; }
.hero-particles span:nth-child(2)  { left: 15%; animation-duration: 18s; animation-delay: 2s;   font-size: 3rem; }
.hero-particles span:nth-child(3)  { left: 25%; animation-duration: 14s; animation-delay: 4s;   font-size: 1rem; }
.hero-particles span:nth-child(4)  { left: 40%; animation-duration: 20s; animation-delay: 1s;   font-size: 2.5rem; }
.hero-particles span:nth-child(5)  { left: 55%; animation-duration: 16s; animation-delay: 3s;   font-size: 1.8rem; }
.hero-particles span:nth-child(6)  { left: 70%; animation-duration: 13s; animation-delay: 5s;   font-size: 2rem; }
.hero-particles span:nth-child(7)  { left: 82%; animation-duration: 22s; animation-delay: 0.5s; font-size: 1.2rem; }
.hero-particles span:nth-child(8)  { left: 92%; animation-duration: 15s; animation-delay: 2.5s; font-size: 2.8rem; }

@keyframes floatUp {
  0%   { transform: translateY(110vh) rotate(0deg);   opacity: 0; }
  10%  { opacity: 0.07; }
  90%  { opacity: 0.07; }
  100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.3);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(0,61,165,0.5);
}
.hero-title .highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-hero-primary {
  background: var(--gradient-primary);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: var(--transition);
  border: none;
  box-shadow: 0 4px 20px rgba(0,61,165,0.4);
}
.btn-hero-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,61,165,0.5); color: #fff; }

.btn-hero-secondary {
  background: transparent;
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid rgba(255,255,255,0.3);
  transition: var(--transition);
}
.btn-hero-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); color: #fff; }

.hero-stats {
  display: flex; gap: 2rem; margin-top: 3rem; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.05em; }

.hero-globe {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 400px;
}
.globe-container {
  position: relative; width: 300px; height: 300px;
  display: flex; align-items: center; justify-content: center;
}
.globe-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0,61,165,0.4);
  animation: orbit linear infinite;
}
.globe-ring:nth-child(1) { width: 100%; height: 100%; animation-duration: 8s; }
.globe-ring:nth-child(2) { width: 130%; height: 130%; animation-duration: 12s; animation-direction: reverse; border-color: rgba(200,16,46,0.3); }
.globe-ring:nth-child(3) { width: 160%; height: 160%; animation-duration: 16s; border-color: rgba(255,215,0,0.15); }
@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.globe-ball {
  font-size: 8rem;
  z-index: 2; position: relative;
  filter: drop-shadow(0 0 30px rgba(0,61,165,0.6));
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* ============================================================
   SECTIONS
   ============================================================ */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.section-title .highlight { color: var(--accent); }
.section-subtitle { color: rgba(255,255,255,0.55); font-size: 0.95rem; }
.section-divider {
  width: 60px; height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
  margin: 0.75rem 0 2.5rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.penca-card {
  background: linear-gradient(145deg, #151530 0%, #0d1035 100%);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.penca-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(0,61,165,0.3);
}

/* ============================================================
   MATCH CARDS
   ============================================================ */
.match-card {
  background: linear-gradient(145deg, #0e1230 0%, #141840 100%);
  border: 1px solid rgba(0,61,165,0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.match-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
}
.match-card.has-prediction::before { background: var(--gradient-gold); }
.match-card.is-live::before { background: linear-gradient(90deg, #ff0000, #ff6600); animation: livePulse 1s infinite; }
@keyframes livePulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.match-card:hover {
  box-shadow: 0 12px 40px rgba(0,61,165,0.3);
  transform: translateY(-5px);
  border-color: rgba(0,61,165,0.4);
}

.match-card-header {
  background: rgba(0,61,165,0.15);
  padding: 0.6rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.match-stage { font-size: 0.72rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.match-venue { font-size: 0.7rem; color: rgba(255,255,255,0.45); }

.match-card-body { padding: 1.25rem; }

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}
.match-team { text-align: center; }
.match-team.home { text-align: right; }
.match-team.away { text-align: left; }

.team-flag-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.team-flag-wrap.home { justify-content: flex-end; }
.team-flag-wrap.away { justify-content: flex-start; }

.team-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  line-height: 1.2;
}
.team-code {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.team-flag { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; }
.flag-emoji { font-size: 1.8rem; line-height: 1; }

.match-vs {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: rgba(255,255,255,0.2);
}
.match-score-display {
  text-align: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
  letter-spacing: 2px;
  background: rgba(0,0,0,0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  min-width: 80px;
}

.match-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0,0,0,0.15);
}
.match-time {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  display: flex; align-items: center; gap: 0.3rem;
}
.match-countdown {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255,215,0,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}
.match-countdown.urgent { color: #ff6b6b; background: rgba(255,107,107,0.1); animation: urgentPulse 1s infinite; }
@keyframes urgentPulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

/* Prediction Section inside match card */
.match-prediction-section {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,61,165,0.08);
}

.prediction-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.prediction-score {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.pred-score-val {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  min-width: 30px; text-align: center;
}

/* Score Input Widget */
.score-input-group {
  display: flex; align-items: center; gap: 0.4rem;
}
.score-input-group .btn-score {
  width: 32px; height: 32px;
  background: rgba(0,61,165,0.3);
  border: 1px solid rgba(0,61,165,0.4);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}
.score-input-group .btn-score:hover { background: rgba(0,61,165,0.6); border-color: var(--primary); }
.score-input-group input[type="number"] {
  width: 50px; height: 38px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,61,165,0.4);
  color: #fff;
  text-align: center;
  font-size: 1.1rem; font-weight: 700;
  border-radius: 8px;
  -moz-appearance: textfield;
}
.score-input-group input[type="number"]::-webkit-inner-spin-button,
.score-input-group input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.score-input-group input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,215,0,0.2);
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; padding: 0.3rem 0.7rem; border-radius: 50px; }
.status-scheduled { background: rgba(0,61,165,0.25); color: #7eb3ff; border: 1px solid rgba(0,61,165,0.4); }
.status-live       { background: rgba(255,59,48,0.2);  color: #ff6b6b; border: 1px solid rgba(255,59,48,0.4); }
.status-finished   { background: rgba(40,167,69,0.2);  color: #66bb6a; border: 1px solid rgba(40,167,69,0.35); }
.status-postponed  { background: rgba(255,165,0,0.2);  color: #ffb347; border: 1px solid rgba(255,165,0,0.35); }
.live-dot {
  display: inline-block; width: 8px; height: 8px;
  background: #ff4444; border-radius: 50%;
  margin-right: 4px;
  animation: liveDotPulse 1s infinite;
}
@keyframes liveDotPulse { 0%,100% { transform: scale(1); opacity:1; } 50% { transform: scale(1.4); opacity:0.6; } }

/* ============================================================
   STATS CARDS
   ============================================================ */
.stats-card {
  background: linear-gradient(145deg, #0e1230, #141840);
  border: 1px solid rgba(0,61,165,0.2);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex; align-items: center; gap: 1.25rem;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}
.stats-card::after {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.06;
}
.stats-card.gold::after    { background: var(--accent); }
.stats-card.blue::after    { background: var(--primary-light); }
.stats-card.red::after     { background: var(--secondary); }
.stats-card.green::after   { background: #28a745; }

.stats-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.stats-icon {
  font-size: 2.5rem;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  flex-shrink: 0;
}
.stats-icon.gold  { background: rgba(255,215,0,0.12); }
.stats-icon.blue  { background: rgba(0,61,165,0.2); }
.stats-icon.red   { background: rgba(200,16,46,0.15); }
.stats-icon.green { background: rgba(40,167,69,0.15); }

.stats-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1;
  color: #fff;
}
.stats-value.gold  { color: var(--accent); }
.stats-value.blue  { color: #7eb3ff; }
.stats-value.red   { color: #ff6b6b; }
.stats-value.green { color: #66bb6a; }

.stats-label { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.25rem; }

/* ============================================================
   LEADERBOARD TABLE
   ============================================================ */
.leaderboard-wrap {
  background: linear-gradient(145deg, #0e1230, #141840);
  border: 1px solid rgba(0,61,165,0.2);
  border-radius: 16px;
  overflow: hidden;
}

.leaderboard-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.9rem;
}
.leaderboard-table th {
  background: rgba(0,61,165,0.25);
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(0,61,165,0.3);
  white-space: nowrap;
}
.leaderboard-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
  vertical-align: middle;
}
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tbody tr { transition: var(--transition); }
.leaderboard-table tbody tr:hover { background: rgba(0,61,165,0.12); }
.leaderboard-table tbody tr.current-user { background: rgba(255,215,0,0.06); }
.leaderboard-table tbody tr.current-user td { color: #fff; }

/* Top 3 styling */
.rank-1 .rank-num { color: #FFD700; font-weight: 800; }
.rank-2 .rank-num { color: #C0C0C0; font-weight: 800; }
.rank-3 .rank-num { color: #CD7F32; font-weight: 800; }
.rank-1 td:first-child::before { content: '🥇 '; }
.rank-2 td:first-child::before { content: '🥈 '; }
.rank-3 td:first-child::before { content: '🥉 '; }

.rank-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.08);
}

.lb-username {
  font-weight: 600;
  color: #fff;
  display: flex; align-items: center; gap: 0.5rem;
}
.lb-avatar {
  width: 32px; height: 32px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
  flex-shrink: 0;
}

.points-badge {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   FORMS
   ============================================================ */
.penca-form-group { margin-bottom: 1.25rem; }
.penca-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}
.penca-input {
  width: 100%;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(0,61,165,0.35);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: var(--transition);
}
.penca-input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 3px rgba(0,61,165,0.2);
}
.penca-input::placeholder { color: rgba(255,255,255,0.25); }
.penca-input.is-valid   { border-color: #28a745; }
.penca-input.is-invalid { border-color: #dc3545; }

.form-feedback {
  font-size: 0.78rem;
  margin-top: 0.3rem;
}
.form-feedback.valid   { color: #66bb6a; }
.form-feedback.invalid { color: #ef5350; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-penca {
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
}
.btn-penca:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-primary-penca {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,61,165,0.3);
}
.btn-primary-penca:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,61,165,0.45); color: #fff; }

.btn-danger-penca {
  background: var(--gradient-danger);
  color: #fff;
  box-shadow: 0 4px 15px rgba(200,16,46,0.3);
}
.btn-danger-penca:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,16,46,0.45); color: #fff; }

.btn-gold-penca {
  background: var(--gradient-gold);
  color: var(--dark);
  box-shadow: 0 4px 15px rgba(255,215,0,0.3);
  font-weight: 700;
}
.btn-gold-penca:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,215,0,0.45); color: var(--dark); }

.btn-outline-penca {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-outline-penca:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ============================================================
   AUTH PAGES (Login, Register)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,61,165,0.4) 0%, transparent 70%);
}

.auth-card {
  background: linear-gradient(145deg, rgba(14,18,48,0.97), rgba(20,24,64,0.95));
  border: 1px solid rgba(0,61,165,0.3);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}

.auth-card-logo {
  text-align: center; margin-bottom: 1.5rem;
}
.auth-card-logo .logo-icon { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.auth-card-logo .logo-title {
  font-family: var(--font-display);
  font-size: 1.6rem; color: #fff; letter-spacing: 1px;
}
.auth-card-logo .logo-sub { font-size: 0.8rem; color: var(--accent); }

.auth-title { font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.auth-subtitle { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 1.75rem; }

.password-strength { margin-top: 0.5rem; }
.strength-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden; margin-bottom: 0.25rem;
}
.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}
.strength-text { font-size: 0.72rem; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-page { padding: 2rem 0 3rem; }
.dashboard-welcome {
  background: linear-gradient(135deg, rgba(0,61,165,0.3) 0%, rgba(0,36,128,0.2) 100%);
  border: 1px solid rgba(0,61,165,0.25);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.welcome-text h2 { font-size: 1.6rem; font-weight: 700; color: #fff; margin: 0; }
.welcome-text p  { color: rgba(255,255,255,0.5); margin: 0.25rem 0 0; font-size: 0.9rem; }
.welcome-rank {
  text-align: center;
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
}
.rank-position { font-family: var(--font-display); font-size: 2.5rem; color: var(--accent); line-height: 1; }
.rank-label    { font-size: 0.72rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   SECTION BACKGROUNDS
   ============================================================ */
.section-dark   { background: var(--dark); padding: 3.5rem 0; }
.section-darker { background: var(--darker); padding: 3.5rem 0; }
.section-mid    { background: var(--mid-dark); padding: 3.5rem 0; }

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.feature-card {
  background: linear-gradient(145deg, #0e1230, #141840);
  border: 1px solid rgba(0,61,165,0.2);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  height: 100%;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(0,61,165,0.4); }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.feature-title { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.feature-desc  { font-size: 0.85rem; color: rgba(255,255,255,0.5); line-height: 1.6; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.penca-toast {
  background: linear-gradient(145deg, #0e1230, #141840) !important;
  border: 1px solid rgba(0,61,165,0.3) !important;
  color: #fff !important;
  border-radius: 12px !important;
  min-width: 300px;
}
.penca-toast .toast-header {
  background: rgba(0,61,165,0.2) !important;
  color: #fff !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px 12px 0 0 !important;
}
.penca-toast.success { border-color: rgba(40,167,69,0.4) !important; }
.penca-toast.success .toast-header { background: rgba(40,167,69,0.15) !important; }
.penca-toast.danger  { border-color: rgba(200,16,46,0.4) !important; }
.penca-toast.danger  .toast-header { background: rgba(200,16,46,0.15) !important; }
.penca-toast.warning { border-color: rgba(255,215,0,0.3) !important; }
.penca-toast.warning .toast-header { background: rgba(255,215,0,0.1) !important; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-content {
  background: linear-gradient(145deg, #0e1230, #141840) !important;
  border: 1px solid rgba(0,61,165,0.3) !important;
  border-radius: 16px !important;
  color: #fff;
}
.modal-header {
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  background: rgba(0,61,165,0.2) !important;
  border-radius: 16px 16px 0 0 !important;
}
.modal-title { color: #fff !important; font-weight: 700; }
.modal-footer { border-top: 1px solid rgba(255,255,255,0.08) !important; }
.btn-close { filter: invert(1) !important; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-sidebar {
  background: linear-gradient(180deg, #070b22 0%, #0d1035 100%);
  border-right: 1px solid rgba(0,61,165,0.2);
  min-height: calc(100vh - 60px);
  padding: 1.5rem 0;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.65);
  padding: 0.6rem 1.25rem;
  border-radius: 0;
  font-size: 0.88rem;
  transition: var(--transition);
  display: flex; align-items: center; gap: 0.6rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  color: #fff;
  background: rgba(0,61,165,0.25);
  border-left: 3px solid var(--accent);
  padding-left: calc(1.25rem - 3px);
}
.admin-content { padding: 2rem; }
.admin-header { margin-bottom: 2rem; }
.admin-title { font-size: 1.4rem; font-weight: 700; color: #fff; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  border: none !important;
  border-radius: 10px !important;
  font-size: 0.9rem;
}
.alert-success { background: rgba(40,167,69,0.15) !important; color: #66bb6a !important; border-left: 3px solid #28a745 !important; }
.alert-danger  { background: rgba(200,16,46,0.15) !important; color: #ef5350 !important; border-left: 3px solid #C8102E !important; }
.alert-warning { background: rgba(255,193,7,0.12) !important; color: #ffca28 !important; border-left: 3px solid #ffc107 !important; }
.alert-info    { background: rgba(0,61,165,0.15) !important; color: #7eb3ff !important; border-left: 3px solid var(--primary) !important; }
.btn-close     { filter: brightness(200%); }

/* ============================================================
   FOOTER
   ============================================================ */
.penca-footer {
  background: linear-gradient(180deg, #070b22 0%, #050510 100%);
  border-top: 1px solid rgba(0,61,165,0.2);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-brand { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.footer-logo  { font-size: 1.5rem; }
.footer-title { font-family: var(--font-display); font-size: 1.1rem; color: #fff; letter-spacing: 1px; }
.footer-desc  { font-size: 0.82rem; color: rgba(255,255,255,0.4); line-height: 1.6; }
.footer-heading { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; margin-bottom: 0.75rem; }
.footer-links   { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a  { color: rgba(255,255,255,0.5); font-size: 0.85rem; text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-links i { font-size: 0.65rem; color: var(--accent); }

.footer-points   { display: flex; flex-direction: column; gap: 0.4rem; }
.fp-item { display: flex; align-items: center; gap: 0.6rem; }
.fp-pts  { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; flex-shrink: 0; }
.fp-pts.gold   { background: rgba(255,215,0,0.15); color: var(--accent); }
.fp-pts.blue   { background: rgba(0,61,165,0.25);  color: #7eb3ff; }
.fp-pts.yellow { background: rgba(255,193,7,0.15); color: #ffca28; }
.fp-pts.gray   { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); }
.fp-label { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

.footer-divider { border-color: rgba(255,255,255,0.06); margin: 2rem 0 1rem; }
.footer-bottom  { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.footer-bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.3); margin: 0; }
.footer-note     { font-size: 0.75rem !important; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-header {
  background: linear-gradient(135deg, rgba(0,61,165,0.25), rgba(0,36,128,0.15));
  border: 1px solid rgba(0,61,165,0.2);
  border-radius: 16px;
  padding: 2rem;
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 2rem;
}
.profile-avatar-large {
  width: 80px; height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
  border: 3px solid rgba(255,215,0,0.3);
}
.profile-username { font-size: 1.5rem; font-weight: 700; color: #fff; }
.profile-meta     { font-size: 0.82rem; color: rgba(255,255,255,0.45); }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-wrap {
  position: relative;
}
.search-wrap .search-icon {
  position: absolute; left: 1rem; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
  pointer-events: none;
}
.search-input {
  padding-left: 2.75rem !important;
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-tab {
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(0,61,165,0.3);
  background: rgba(0,61,165,0.1);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}
.filter-tab:hover,
.filter-tab.active {
  background: rgba(0,61,165,0.35);
  border-color: rgba(0,61,165,0.6);
  color: #fff;
}
.filter-tab.active { background: var(--gradient-primary); border-color: transparent; color: #fff; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: rgba(255,255,255,0.35);
}
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 1rem; display: block; opacity: 0.5; }
.empty-state h5 { color: rgba(255,255,255,0.6); }

/* ============================================================
   TABLE
   ============================================================ */
.penca-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.penca-table thead th {
  background: rgba(0,61,165,0.2);
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.8rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,61,165,0.25);
}
.penca-table tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8);
  vertical-align: middle;
}
.penca-table tbody tr:hover td { background: rgba(0,61,165,0.1); }

/* ============================================================
   BADGES
   ============================================================ */
.badge { font-size: 0.72rem !important; font-weight: 600 !important; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-accent  { color: var(--accent) !important; }
.text-primary-penca { color: var(--primary-light) !important; }
.bg-dark-card  { background: linear-gradient(145deg, #0e1230, #141840) !important; }
.border-dark-card { border-color: rgba(0,61,165,0.2) !important; }
.rounded-penca { border-radius: var(--border-radius) !important; }

.loading-spinner {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}
.spinner-ball { font-size: 1.2rem; animation: spin 1s linear infinite; display: inline-block; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination .page-link {
  background: rgba(0,61,165,0.15) !important;
  border: 1px solid rgba(0,61,165,0.3) !important;
  color: rgba(255,255,255,0.7) !important;
  border-radius: 8px !important;
  margin: 0 2px;
  transition: var(--transition);
}
.pagination .page-link:hover { background: rgba(0,61,165,0.35) !important; color: #fff !important; }
.pagination .page-item.active .page-link { background: var(--gradient-primary) !important; border-color: transparent !important; color: #fff !important; }
.pagination .page-item.disabled .page-link { opacity: 0.4 !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero-section { padding: 60px 0 50px; min-height: auto; }
  .hero-title { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .hero-globe { display: none; }
  .hero-stats { gap: 1.25rem; }
  .hero-stat-value { font-size: 1.5rem; }
  .dashboard-welcome { flex-direction: column; text-align: center; }
  .auth-card { margin: 1rem; padding: 1.75rem; }
  .stats-card { padding: 1.1rem; }
  .match-teams { gap: 0.4rem; }
  .team-name { font-size: 0.8rem; }
  .admin-sidebar { min-height: auto; }
  .profile-header { flex-direction: column; text-align: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-cta-group { flex-direction: column; }
  .btn-hero-primary, .btn-hero-secondary { justify-content: center; }
  .filter-tabs { gap: 0.35rem; }
  .filter-tab { font-size: 0.78rem; padding: 0.4rem 0.75rem; }
  .leaderboard-table { font-size: 0.78rem; }
  .leaderboard-table th, .leaderboard-table td { padding: 0.6rem 0.5rem; }
}

/* ============================================================
   CUENTA REGRESIVA MUNDIAL 2026
   ============================================================ */
.wc-countdown-wrap {
  margin: 1.75rem 0 1.25rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}
.wc-countdown-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wc-countdown-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}
.wc-countdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wc-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}
.wc-countdown-num {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(255,215,0,0.4);
}
.wc-countdown-txt {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-top: 0.2rem;
}
.wc-countdown-sep {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
  animation: blink-sep 1s step-start infinite;
}
@keyframes blink-sep {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.2; }
}
.wc-countdown-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.75rem;
  letter-spacing: 0.03em;
}
.wc-started {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.04em;
}
@media (max-width: 480px) {
  .wc-countdown-unit { min-width: 52px; }
  .wc-countdown-num  { font-size: 1.8rem; }
  .wc-countdown-sep  { font-size: 1.5rem; }
  .wc-countdown-wrap { padding: 1rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .penca-navbar, .penca-footer, .toast-container, #page-loader { display: none !important; }
  body { background: #fff; color: #000; }
}
