:root {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(15, 15, 15, 0.75);
  --bg-card-hover: rgba(25, 25, 25, 0.90);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-focus: #FF6600;
  
  --accent-orange: #FF6600;
  --accent-orange-glow: rgba(255, 102, 0, 0.25);
  --accent-orange-dark: #e65c00;
  
  --accent-gold: #ffd700;
  --accent-gold-glow: rgba(255, 215, 0, 0.15);
  --accent-silver: #c0c0c0;
  --accent-bronze: #cd7f32;
  
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  --success: #22c55e;
  --warning: #f59e0b;
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.7);
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-lg: 24px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 102, 0, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 40%);
  background-attachment: fixed;
}

button, input, select, textarea {
  font-family: inherit;
}

a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100vw - 48px);
}

.toast {
  padding: 16px 20px;
  border-radius: var(--border-radius);
  background: var(--bg-card);
  border-left: 4px solid var(--accent-orange);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.success {
  border-left-color: var(--success);
}

.toast.info {
  border-left-color: var(--accent-gold);
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  margin-left: 16px;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text-primary);
}

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

/* Typography and Utilities */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 4px;
  background-color: var(--accent-orange);
  border-radius: 2px;
}

.phase-header {
  font-size: 1.4rem;
  color: var(--accent-orange);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  margin-top: 32px;
  margin-bottom: 16px;
  grid-column: 1 / -1;
}

.country-flag {
  width: 24px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  vertical-align: middle;
}

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

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

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.flex-1 { flex: 1; }
.btn-block { width: 100%; display: block; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--accent-orange);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: var(--text-primary);
  box-shadow: 0 0 16px var(--accent-orange-glow);
}

.btn-success {
  background-color: var(--success);
  color: var(--bg-primary);
}

.btn-success:hover {
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.3);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
}

.btn-outline-danger {
  background: transparent;
  border-color: rgba(255, 74, 74, 0.4);
  color: var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger);
  color: var(--text-primary);
  box-shadow: 0 0 12px var(--danger-glow);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--border-radius-sm);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--accent-orange);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--text-primary);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group-row {
  display: flex;
  gap: 8px;
}

.form-group-row input {
  flex: 1;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
select {
  width: 100%;
  padding: 14px 18px;
  font-size: 0.95rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  transition: all 0.25s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--border-color-focus);
  box-shadow: 0 0 0 3px var(--accent-orange-glow);
}

.form-text {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.card:hover {
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ----------------------------------------------------
   AUTH VIEW
   ---------------------------------------------------- */
.auth-view {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.auth-view.active {
  display: flex;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.cs-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.cs-text {
  font-size: 0.55em;
  color: var(--accent-orange);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 40%, var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-card {
  display: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-orange), #ffffff);
}

.auth-card.active {
  display: block;
}

.auth-card h2 {
  font-size: 1.5rem;
  margin-bottom: 28px;
  text-align: center;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ----------------------------------------------------
   APP VIEW (LOGGED IN)
   ---------------------------------------------------- */
.app-view {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}

.app-view.active {
  display: flex;
}

.app-header {
  height: 70px;
  padding: 0 40px;
  background-color: rgba(8, 8, 10, 0.8);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.cs-logo-small {
  height: 35px;
  width: auto;
  object-fit: contain;
}

.app-header .logo-text {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.3rem;
  background: linear-gradient(135deg, #fff 50%, var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.badge-admin {
  background-color: var(--accent-gold-glow);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge-locked {
  background-color: rgba(255, 74, 74, 0.1);
  color: var(--danger);
  border: 1px solid rgba(255, 74, 74, 0.2);
}

.badge-editable {
  background-color: rgba(0, 230, 118, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-content {
  flex: 1;
  padding: 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Mobile Nav (hidden on desktop) */
.mobile-nav {
  display: none;
}

/* ----------------------------------------------------
   DASHBOARD VIEW
   ---------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
}

.card-profile {
  text-align: center;
}

.avatar-large {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  background-color: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 2px solid var(--border-color);
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.bolao-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 180px;
}

.bolao-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-orange);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.05);
}

.bolao-card-header h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.bolao-card-invite {
  background-color: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-gold);
  border: 1px solid rgba(255, 215, 0, 0.2);
  display: inline-block;
  margin-bottom: 16px;
}

.bolao-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: 16px;
}

/* ----------------------------------------------------
   SWEEPSTAKE DETAILS VIEW
   ---------------------------------------------------- */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.bolao-title-container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bolao-code-badge {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 6px 12px;
  font-size: 0.9rem;
  color: var(--accent-gold);
}

.tabs-navigation {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
  gap: 8px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

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

.tab-btn.active {
  color: var(--accent-orange);
  border-bottom-color: var(--accent-orange);
}

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

.detail-tab-content.active {
  display: block;
}

.matches-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}

.btn-receipt {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  height: fit-content;
  padding: 12px 20px;
}

.info-card {
  background-color: rgba(0, 255, 136, 0.03);
  border: 1px solid rgba(0, 255, 136, 0.1);
  padding: 16px 20px;
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 0.9rem;
}

.info-icon {
  font-size: 1.25rem;
}

/* Matches Grid & Cards */
.matches-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.match-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: all 0.2s ease;
}

.match-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: var(--bg-card-hover);
}

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

.match-team.team-a {
  justify-content: flex-end;
  text-align: right;
}

.match-team.team-b {
  justify-content: flex-start;
  text-align: left;
}

.team-name {
  font-size: 1.15rem;
  font-weight: 600;
}

.large-flag {
  font-size: 2.2rem;
  line-height: 1;
}

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 280px;
}

.match-score-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.score-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.score-divider {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
}

.match-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Results indicators */
.official-badge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  gap: 4px;
}

.official-score {
  background-color: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.points-result-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.points-10 {
  background-color: rgba(0, 230, 118, 0.1);
  color: var(--success);
  border-color: rgba(0, 230, 118, 0.3);
}

.points-7 {
  background-color: rgba(0, 255, 136, 0.05);
  color: var(--accent-orange);
  border-color: rgba(0, 255, 136, 0.2);
}

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

.points-0 {
  background-color: rgba(255, 74, 74, 0.1);
  color: var(--danger);
  border-color: rgba(255, 74, 74, 0.3);
}

/* General Predictions Tab */
.general-predictions-card {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 32px;
}

.general-prediction-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.champion-preview, .scorer-preview {
  width: 64px;
  height: 64px;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.large-avatar {
  font-size: 2rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Ranking Tab & Podium */
.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  height: 240px;
  margin-bottom: 40px;
  margin-top: 20px;
}

.podium-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 140px;
}

.podium-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-user-points {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.podium-block {
  width: 100%;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

.podium-column.first .podium-block {
  height: 130px;
  background: linear-gradient(180deg, var(--accent-gold) 0%, rgba(255, 215, 0, 0.4) 100%);
  color: var(--bg-primary);
  border: 2px solid var(--accent-gold);
}

.podium-column.first .podium-user-points {
  color: var(--accent-gold);
}

.podium-column.second .podium-block {
  height: 95px;
  background: linear-gradient(180deg, var(--accent-silver) 0%, rgba(192, 192, 192, 0.4) 100%);
  color: var(--bg-primary);
  border: 2px solid var(--accent-silver);
}

.podium-column.second .podium-user-points {
  color: var(--accent-silver);
}

.podium-column.third .podium-block {
  height: 70px;
  background: linear-gradient(180deg, var(--accent-bronze) 0%, rgba(205, 127, 50, 0.4) 100%);
  color: var(--bg-primary);
  border: 2px solid var(--accent-bronze);
}

.podium-column.third .podium-user-points {
  color: var(--accent-bronze);
}

.podium-medal {
  position: absolute;
  top: -16px;
  font-size: 1.5rem;
}

/* Ranking Table styling */
.card-ranking {
  padding: 0;
  overflow: hidden;
}

.card-ranking h3 {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.ranking-table th, .ranking-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.ranking-table th {
  background-color: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.ranking-table tbody tr {
  transition: background-color 0.2s ease;
}

.ranking-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.ranking-table tr.current-user {
  background-color: rgba(0, 255, 136, 0.03);
}

.ranking-table tr.current-user td {
  border-bottom-color: rgba(0, 255, 136, 0.2);
}

.rank-position {
  font-weight: 700;
  text-align: center;
}

.rank-pts {
  font-weight: 800;
  color: var(--accent-orange);
  text-align: center;
}

/* ----------------------------------------------------
   ADMIN PANEL VIEW
   ---------------------------------------------------- */
.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.admin-matches-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-match-row {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-match-teams {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.admin-match-scores {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-match-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vs-text {
  font-weight: 800;
  color: var(--text-muted);
  margin-top: 20px;
}

/* ----------------------------------------------------
   RESPONSIVE MEDIA QUERIES (MOBILE / TABLET)
   ---------------------------------------------------- */
@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    order: 2;
  }
  
  .dashboard-main {
    order: 1;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 80px; /* Space for bottom sticky bar */
  }

  .hide-on-mobile {
    display: none !important;
  }

  .app-header {
    padding: 0 12px;
    height: 60px;
    justify-content: space-between;
  }
  
  .app-content {
    padding: 12px;
  }

  /* Match Card Redesign for Mobile */
  .match-card {
    flex-direction: row;
    gap: 8px;
    padding: 12px;
    align-items: flex-start;
  }

  .match-team {
    flex-direction: column !important;
    gap: 4px !important;
    justify-content: flex-start !important;
    text-align: center !important;
    flex: 1;
    min-width: 0; /* allows text truncation if needed */
  }

  .match-team .large-flag {
    width: 32px;
    height: 32px;
  }

  .team-name {
    font-size: 0.8rem;
    line-height: 1.1;
    word-break: break-word;
  }

  .match-center {
    width: auto;
    min-width: unset;
    flex: 1.2;
    padding: 0;
  }

  .score-input {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    padding: 0;
    text-align: center;
  }

  .score-divider {
    font-size: 0.9rem;
    margin: 0 4px;
  }

  .btn-sm {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  /* Nav Tabs touch area */
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  
  .nav-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .nav-tab {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    padding: 12px 8px;
    font-size: 0.9rem;
  }

  .general-prediction-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .champion-preview, .scorer-preview {
    margin-bottom: 0;
    margin-top: 5px;
  }

  /* Matches Header Actions (Rules + Receipt button) */
  .matches-header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .btn-receipt {
    width: 100%;
    justify-content: center;
  }

  /* Sweepstake Tabs Navigation */
  .tabs-navigation {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 4px;
  }

  .tabs-navigation::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .tab-btn {
    white-space: nowrap;
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  /* Table responsiveness columns hide */
  #tab-ranking .ranking-table th:nth-child(3),
  #tab-ranking .ranking-table td:nth-child(3),
  #tab-ranking .ranking-table th:nth-child(4),
  #tab-ranking .ranking-table td:nth-child(4),
  #tab-ranking .ranking-table th:nth-child(5),
  #tab-ranking .ranking-table td:nth-child(5),
  #tab-ranking .ranking-table th:nth-child(6),
  #tab-ranking .ranking-table td:nth-child(6),
  #tab-ranking .ranking-table th:nth-child(7),
  #tab-ranking .ranking-table td:nth-child(7) {
    display: none;
  }

  .ranking-table th, .ranking-table td {
    padding: 8px 4px;
    font-size: 0.85rem;
  }

  .admin-match-row {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .admin-match-teams {
    justify-content: center;
  }
  
  .admin-match-scores {
    justify-content: center;
  }

  /* Sticky Bottom Navigation */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: rgba(12, 12, 16, 0.95);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
  }

  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    gap: 4px;
    height: 100%;
    transition: all 0.2s ease;
  }

  .mobile-nav-btn .nav-icon {
    font-size: 1.25rem;
  }

  .mobile-nav-btn:hover,
  .mobile-nav-btn.active {
    color: var(--accent-orange);
  }
  
  .admin-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-grid .card:last-child {
    grid-column: span 1 !important;
  }
}

.loading-state {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 1rem;
}
.loading-state::after {
  content: " ⚽";
  animation: rotate 1s linear infinite;
  display: inline-block;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-danger {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4);
}

/* ----------------------------------------------------
   MODAL
   ---------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-lg);
  padding: 36px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-content h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.ml-2 { margin-left: 0.5rem; }

/* ----------------------------------------------------
   COUNTDOWN & FLAG OVERRIDES & PALPITE HISTORY STYLE
   ---------------------------------------------------- */
.match-countdown {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.countdown-active {
  background: rgba(255, 102, 0, 0.1);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 102, 0, 0.2);
  padding: 3px 8px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  font-feature-settings: "tnum";
}

.countdown-active.starting-soon {
  background: rgba(239, 68, 68, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulse-danger 1.5s infinite ease-in-out;
}

@keyframes pulse-danger {
  0%, 100% {
    box-shadow: 0 0 0 0px rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.8);
  }
}

.countdown-locked {
  background: rgba(115, 115, 115, 0.1);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
}

.countdown-finished {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 3px 8px;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
}

/* Flag Icon Styling */
.large-flag, .fi.large-flag {
  font-size: 2.2rem;
  width: 44px;
  height: 33px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.fi {
  border-radius: var(--border-radius-sm);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  vertical-align: middle;
}

/* Guess History Button */
.btn-guess-history {
  margin-top: 8px;
  font-size: 0.8rem !important;
  padding: 6px 12px !important;
  border-radius: var(--border-radius-sm) !important;
  color: var(--text-secondary);
  border-color: var(--border-color);
  background: transparent;
  gap: 8px;
}

.btn-guess-history:hover {
  border-color: var(--accent-orange);
  color: var(--text-primary);
  background: rgba(255, 102, 0, 0.05) !important;
}

/* Clean UI layout for the modal match header */
.guess-history-match-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  gap: 16px;
}

.guess-history-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.1rem;
}
.guess-history-team.team-a {
  justify-content: flex-end;
  text-align: right;
}
.guess-history-team.team-b {
  justify-content: flex-start;
  text-align: left;
}

.guess-history-vs {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}


@media (max-width: 768px) {
  .tabs-navigation {
    flex-wrap: wrap !important;
  }
  .tabs-navigation .tab-btn {
    flex: 1 1 45% !important;
    white-space: normal !important;
    text-align: center;
    padding: 8px 4px;
    font-size: 0.85rem;
    height: auto;
  }
}

/* Premium Date Filter Styles */
.premium-date-filter {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.premium-date-filter:hover {
  border-color: rgba(255, 102, 0, 0.3);
  box-shadow: 0 4px 20px rgba(255, 102, 0, 0.08);
}

.premium-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Custom Switch Toggle */
.premium-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.premium-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.premium-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: .3s;
  border-radius: 24px;
}

.premium-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  border-radius: 50%;
}

.premium-switch input:checked + .premium-slider {
  background-color: rgba(255, 102, 0, 0.15);
  border-color: var(--accent-orange);
}

.premium-switch input:checked + .premium-slider:before {
  transform: translateX(20px);
  background-color: var(--accent-orange);
  box-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
}

.premium-toggle-label {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.premium-date-wrapper {
  position: relative;
  width: 100%;
  max-width: 300px;
  opacity: 1;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.premium-date-wrapper.disabled {
  opacity: 0.4;
  filter: grayscale(100%);
  pointer-events: none;
}

.premium-date-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-orange);
  font-size: 1.1rem;
  pointer-events: none;
}

.premium-date-input {
  width: 100%;
  padding: 12px 12px 12px 42px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  color-scheme: dark;
}

.premium-date-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
  background: var(--bg-card);
}

.premium-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.premium-date-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

@media (min-width: 600px) {
  .premium-date-filter {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .premium-date-wrapper {
    margin-left: auto;
  }
}
