/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #16a34a, #15803d);
}

/* Background */
.bg-gradient-1,
.bg-gradient-2,
.bg-gradient-3 {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.bg-gradient-1 {
  background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.05), transparent 50%);
}

.bg-gradient-2 {
  background: radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.03), transparent 50%);
}

.bg-gradient-3 {
  background: radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.02), transparent 70%);
}

/* Particles */
#particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #22c55e;
  border-radius: 50%;
  opacity: 0.3;
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.2);
  }
}

/* Page Styles */
.page {
  display: none;
  min-height: calc(100vh - 4rem);
}

.page.active {
  display: block;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4rem 1rem 3rem;
  position: relative;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #22c55e, #10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Orbitron", monospace;
  letter-spacing: 0.05em;
  text-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #999;
  margin-bottom: 3rem;
  font-weight: 400;
}

/* Tournament Bracket */
.tournament-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.bracket-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  overflow-x: auto; /* Ensure horizontal scroll for main bracket */
  position: relative;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.bracket-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  justify-content: center;
  min-width: 900px; /* Set a minimum width to force scroll on smaller screens */
}

.bracket-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.round-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #22c55e;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: "Orbitron", monospace;
}

.matches-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 220px;
}

.semi-finals .matches-column {
  gap: 6rem;
  margin-top: 8.5rem;
}

.finals .matches-column {
  margin-top: 15rem;
}

.match {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.match:hover {
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.1);
}

.final-match {
  border-color: rgba(234, 179, 8, 0.4);
}

.team {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.team:last-child {
  border-bottom: none;
}

.team:hover {
  background: rgba(34, 197, 94, 0.1);
}

.team.winner {
  background: rgba(34, 197, 94, 0.2);
  border-left: 4px solid #22c55e;
}

.team-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
}

.team.winner .team-name {
  color: #22c55e;
  font-weight: 700;
}

.team-payout {
  font-weight: 600;
  color: #10b981;
  font-size: 0.875rem;
  font-family: "Orbitron", monospace;
}

/* Bracket Lines */
.bracket-lines {
  width: 100px;
  height: 100%;
  display: flex;
  align-items: center;
}

.connection-svg {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.qf-to-sf {
  height: 500px;
  margin-top: 2rem;
}

.sf-to-final {
  height: 300px;
  margin-top: 9rem;
}

/* Champion Display */
.champion {
  width: 200px;
}

.champion-display {
  margin-top: 12rem;
}

.champion-trophy {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem;
  background: rgba(234, 179, 8, 0.1);
  border: 2px solid rgba(234, 179, 8, 0.3);
  border-radius: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.trophy-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(234, 179, 8, 0.1), transparent 70%);
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.trophy-icon {
  width: 4rem;
  height: 4rem;
  color: #eab308;
  margin-bottom: 1rem;
  z-index: 1;
  position: relative;
  filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.5));
}

.champion-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #eab308;
  margin-bottom: 0.5rem;
  z-index: 1;
  position: relative;
  font-family: "Orbitron", monospace;
}

/* Predictions Section */
.predictions-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 1rem;
  overflow-x: auto; /* Added for horizontal scrolling */
}

.predictions-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  width: 100%;
  backdrop-filter: blur(20px);
}

.predictions-header {
  text-align: center;
  margin-bottom: 3rem;
}

.predictions-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: #22c55e;
  margin-bottom: 1rem;
  font-family: "Orbitron", monospace;
}

.predictions-icon {
  width: 2.5rem;
  height: 2.5rem;
}

.predictions-subtitle {
  font-size: 1.125rem;
  color: #999;
  margin-bottom: 2rem;
}

.points-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.point-rule {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  border: 1px solid rgba(34, 197, 94, 0.2);
  transition: all 0.3s ease;
  min-width: 140px;
}

.point-rule:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.1);
}

.points {
  font-size: 1.75rem;
  font-weight: 700;
  color: #22c55e;
  margin-bottom: 0.5rem;
  font-family: "Orbitron", monospace;
}

.rule {
  font-size: 0.875rem;
  color: #999;
  text-align: center;
  font-weight: 500;
}

.winners-info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.winner-type {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 200px;
}

.winner-type h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #22c55e;
  font-family: "Orbitron", monospace;
}

.winner-type p {
  color: #999;
  font-size: 0.9rem;
}

.winner-display {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.5rem;
  color: #22c55e;
  font-weight: 600;
  font-family: "Orbitron", monospace;
  text-align: center;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Prediction Action */
.prediction-action {
  text-align: center;
  margin-bottom: 3rem;
}

.make-prediction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 1rem;
  color: #000;
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

.make-prediction-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(34, 197, 94, 0.4);
}

.make-prediction-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.prediction-btn-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* User Predictions */
.user-predictions {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 3rem;
}

.predictions-list-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #22c55e;
  margin-bottom: 2rem;
  text-align: center;
  font-family: "Orbitron", monospace;
}

.predictions-list-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.predictions-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.predictions-list-container::-webkit-scrollbar {
  width: 6px;
}

.predictions-list-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.predictions-list-container::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.3);
  border-radius: 3px;
}

.predictions-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.5);
}

.no-predictions {
  text-align: center;
  padding: 3rem;
  color: #666;
  font-size: 1.125rem;
}

.user-prediction {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.user-prediction:hover {
  border-color: rgba(34, 197, 94, 0.3);
}

.user-prediction:first-child {
  border-color: rgba(234, 179, 8, 0.4);
  background: rgba(234, 179, 8, 0.05);
}

.prediction-header {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.prediction-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.prediction-user {
  font-size: 1.25rem;
  font-weight: 700;
  color: #22c55e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

.prediction-score {
  font-size: 1.125rem;
  color: #fbbf24;
  font-family: "Orbitron", monospace;
}

.dropdown-arrow {
  width: 1.5rem;
  height: 1.5rem;
  color: #666;
  transition: transform 0.3s ease;
  margin-left: 1rem;
}

.user-prediction.expanded .dropdown-arrow {
  transform: rotate(180deg);
}

.prediction-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
}

.user-prediction.expanded .prediction-details {
  max-height: 500px;
  padding: 1.5rem;
}

.prediction-details-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.prediction-category {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.category-title {
  font-weight: 600;
  color: #999;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.category-picks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pick {
  font-size: 0.875rem;
  color: #22c55e;
  font-weight: 500;
}

/* Balance Prediction Section */
.balance-prediction-section {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.balance-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #a855f7;
  margin-bottom: 0.5rem;
  font-family: "Orbitron", monospace;
}

.balance-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.balance-subtitle {
  color: #999;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.balance-input-group {
  position: relative;
  max-width: 300px;
}

.balance-currency {
  position: absolute;
  left: 10px;
  top: 30%;
  transform: translateY(-50%);
  color: #a855f7;
  font-weight: 600;
  font-size: 1.125rem;
  z-index: 2;
  pointer-events: none;
}

.balance-input {
  width: 100%;
  padding: 1rem 1rem 1rem 2.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 0.75rem;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: "Orbitron", monospace;
}

.balance-input:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.balance-input::placeholder {
  color: #666;
  opacity: 0.7;
}
.balance-hint {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

/* Prediction Modal */
.prediction-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.prediction-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.t-modal-content {
  position: relative;
  background: rgba(17, 17, 17, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  width: min(90%, 1000px); /* Adjusted width to contain inner bracket */
  max-height: 95vh;
  overflow-y: auto;
  overflow-x: auto; /* Changed from hidden to auto to allow horizontal scroll */
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(34, 197, 94, 0.05);
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #22c55e;
  font-family: "Orbitron", monospace;
}

.modal-close {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #666;
  cursor: pointer;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.modal-body {
  padding: 2rem;
}

.bracket-instruction {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 1rem;
  color: #22c55e;
  font-weight: 500;
}

/* Interactive Bracket */
.interactive-bracket-wrapper {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 1rem 0;
  min-width: 700px; /* Set a minimum width to force scroll on smaller screens */
}

.interactive-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 200px;
}

.interactive-round-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #22c55e;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: "Orbitron", monospace;
}

.interactive-matches {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.semi-finals .interactive-matches {
  gap: 11rem;
  margin-top: 4rem;
}

.final .interactive-matches {
  margin-top: 13rem;
}

.interactive-match {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.interactive-match:hover {
  border-color: rgba(34, 197, 94, 0.3);
}

.interactive-team {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.interactive-team:last-child {
  border-bottom: none;
}

.interactive-team:not(.placeholder):hover {
  background: rgba(34, 197, 94, 0.2);
}

.interactive-team.selected {
  background: rgba(34, 197, 94, 0.3);
  border-left: 4px solid #22c55e;
  font-weight: 700;
}

.interactive-team.placeholder {
  opacity: 0.5;
  cursor: not-allowed;
  color: #666;
}

.interactive-team.advancing {
  animation: teamAdvance 0.5s ease-out;
}

@keyframes teamAdvance {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
    background: rgba(34, 197, 94, 0.4);
  }
  100% {
    transform: scale(1);
  }
}

.interactive-team-name {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 500;
}

.interactive-team.selected .interactive-team-name {
  color: #22c55e;
}

.interactive-team.placeholder .interactive-team-name {
  color: #666;
}

/* Champion Slot */
.champion-slot {
  margin-top: 4rem;
}

.interactive-champion {
    margin-top: 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background: rgba(234, 179, 8, 0.1);
  border: 2px solid rgba(234, 179, 8, 0.3);
  border-radius: 1rem;
  text-align: center;
  min-height: 120px;
  justify-content: center;
  transition: all 0.3s ease;
}

.interactive-champion.placeholder {
  opacity: 0.6;
}

.interactive-champion:not(.placeholder) {
  box-shadow: 0 10px 30px rgba(234, 179, 8, 0.2);
}

.champion-trophy-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #eab308;
  margin-bottom: 0.75rem;
}

.champion-name-text {
  font-size: 1rem;
  font-weight: 700;
  color: #eab308;
  font-family: "Orbitron", monospace;
}

/* Modal Actions */
.modal-actions {
  padding: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
}

.submit-modal-prediction {
  padding: 1rem 3rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 0.75rem;
  color: #000;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.125rem;
  min-width: 250px;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

.submit-modal-prediction:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(34, 197, 94, 0.4);
}

.submit-modal-prediction:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* No Tournament State */
#no-tournament {
  text-align: center;
  color: #666;
  padding: 4rem;
  border-radius: 1rem;
}

#no-tournament svg {
  margin-bottom: 2rem;
  opacity: 0.5;
}

#no-tournament h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #999;
}

#no-tournament p {
  font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .bracket-wrapper {
    gap: 2rem;
  }
  .matches-column {
    width: 160px;
  }
  .bracket-lines {
    width: 60px;
  }
  .interactive-bracket-wrapper {
    gap: 1rem;
  }
  .interactive-column {
    min-width: 160px;
  }
  .semi-finals .matches-column {
    gap: 6rem;
    margin-top: 8.5rem;
  }
  .finals .matches-column {
    margin-top: 15rem;
  }
}

@media (max-width: 992px) {
  .matches-column {
    width: 140px;
    gap: 1.5rem;
  }

  .bracket-lines {
    width: 40px;
  }

  .semi-finals .matches-column {
    gap: 6rem;
    margin-top: 8.5rem;
  }
  .finals .matches-column {
    margin-top: 15rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1rem;
  }
  .bracket-container {
    padding: 1.5rem 1rem;
  }
  .bracket-wrapper {
    gap: 1rem;
  }
  .matches-column {
    width: 120px; /* Adjusted width */
    gap: 1rem;
  }
  .bracket-lines {
    width: 30px; /* Adjusted width */
  }
  .team-name {
    font-size: 0.8rem;
  }
  .round-title {
    font-size: 1.25rem;
  }
  .points-info {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  .winners-info {
    flex-direction: column;
    gap: 1rem;
  }
  .t-modal-content {
    max-width: 98vw;
    margin: 0.5rem;
  }
  .modal-body {
    padding: 1.5rem;
  }
  .interactive-bracket-wrapper {
    min-width: 600px; /* Adjusted min-width for interactive bracket */
  }
  .interactive-column {
    min-width: 120px; /* Adjusted min-width */
  }
  .interactive-team-name {
    font-size: 0.8rem;
  }
  .predictions-title {
    flex-direction: column;
    gap: 0.5rem;
  }
  .prediction-details-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .modal-header {
    padding: 1.5rem;
  }
  .modal-actions {
    padding: 1.5rem;
  }
  .balance-prediction-section {
    padding: 1.5rem;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.center-images {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.centered-image {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
}

.ending-balance-display {
  /* Removed absolute positioning */
  /* position: absolute; */
  /* bottom: 1rem; */
  /* right: 1rem; */
  margin-top: 2rem; /* Added margin to push it below the champion */
  background: rgba(168, 85, 247, 0.15);
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  transition: all 0.3s ease;
}

.ending-balance-display:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
  border-color: rgba(168, 85, 247, 0.6);
}

.balance-label {
  font-size: 0.875rem;
  color: #e2e8f0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(226, 232, 240, 0.3);
}

.balance-amount {
  font-size: 1.125rem;
  color: #c084fc;
  font-weight: 800;
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 15px rgba(192, 132, 252, 0.1);
  filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.4));
}

.hidden {
  display: none !important;
}

/* Mobile fixes for ending balance in predictions - ADD THESE RULES TO YOUR EXISTING CSS */

@media (max-width: 880px) {
  /* Removed margin-right as it's no longer absolutely positioned */
  /* .ending-balance-display {
    margin-right: 7rem;
  } */

  /* Fix balance prediction section in modal for mobile */
  .balance-prediction-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .balance-title {
    font-size: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .balance-subtitle {
    font-size: 0.85rem;
    text-align: center;
  }

  .balance-input-group {
    max-width: 100%;
    margin: 0 auto;
  }

  .balance-input {
    font-size: 1rem;
    padding: 0.875rem 0.875rem 0.875rem 2.5rem;
  }

  .balance-currency {
    left: 0.875rem;
    font-size: 1rem;
  }

  /* Fix ending balance display in predictions list for mobile */
  .prediction-category {
    padding: 1rem;
  }

  .category-title {
    font-size: 0.8rem;
  }

  .pick {
    font-size: 0.8rem;
    word-break: break-word;
  }

  /* Ensure ending balance prediction is visible in user predictions */
  .prediction-details-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Make sure balance predictions show up in mobile predictions list */
  .user-prediction .prediction-details {
    font-size: 0.85rem;
  }

  /* Fix modal balance section for very small screens */
  .modal-body {
    padding: 1rem;
  }

  .balance-hint {
    font-size: 0.8rem;
    text-align: center;
  }
}

@media (max-width: 640px) {
  /* Extra small screens - ensure balance prediction is always visible */
  .balance-prediction-section {
    padding: 0.75rem;
  }

  .balance-title {
    font-size: 1.1rem;
    gap: 0.5rem;
  }

  .balance-icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .balance-input {
    font-size: 0.9rem;
    padding: 0.75rem 0.75rem 0.75rem 2.25rem;
  }

  .balance-currency {
    left: 0.75rem;
    font-size: 0.9rem;
  }

  /* Ensure predictions show ending balance on mobile */
  .prediction-category {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .category-picks {
    gap: 0.25rem;
  }
}
