:root {
  --fpl-purple: #37003c;
  --fpl-pink: #ff2882;
  --fpl-green: #00ff87;
  --fpl-light-purple: #461d4b;
  --fpl-gradient: linear-gradient(45deg, #00ff87 0%, #05f0ff 100%);
}

@font-face {
  font-family: 'Radikal';
  src: url('fonts/Radikal.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: 'Radikal', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--fpl-purple);
  color: white;
}

/* Main container with FPL-style gradient background */
#app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: 
    linear-gradient(135deg, transparent 0%, var(--fpl-purple) 100%),
    linear-gradient(45deg, var(--fpl-green) 0%, transparent 40%);
  overflow: hidden;
}

/* Content wrapper */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

/* Header section */
h1 {
  font-size: 3.5rem;
  font-weight: bold;
  margin: 2rem 0;
  position: relative;
  display: inline-block;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--fpl-gradient);
  border-radius: 2px;
}

/* Mobile header styles */
@media (max-width: 768px) {
  .mobile-title {
    /* Your mobile-specific h1 styles will go here */
    font-size: 2rem;
  }
}

/* Gameweek display */
h2 {
  font-size: 2rem;
  color: var(--fpl-green);
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 135, 0.1);
}

/* Countdown section */
.countdown-container {
  width: 100%;
  background: rgba(70, 29, 75, 0.8);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  box-sizing: border-box;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.circle {
  width: 100px;
  height: 100px;
  background: var(--fpl-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--fpl-green);
  position: relative;
  transition: all 0.3s ease;
}

.circle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: var(--fpl-gradient);
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.circle:hover::before {
  opacity: 1;
}

.circle span {
  font-size: 2.8rem;
  font-weight: bold;
  color: white;
}

.label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--fpl-green);
  font-weight: 500;
}

/* Social link */
.twitter-link {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  background: var(--fpl-gradient);
  border-radius: 25px;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: 2rem;
}

.twitter-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.twitter-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 135, 0.3);
}

/* Footer */
.footer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 3rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-menu {
  display: flex;
  gap: 1rem;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-menu a:hover {
  color: var(--fpl-green);
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-menu {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Desktop Stats Grid - MOVE THIS TO TOP */
.stats-grid {
  width: 100%;
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* MOBILE STYLES - All breakpoints */
@media (max-width: 1024px) {
  /* Tablet - 2 columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Tablet and below */
  h1, h2, h3, .player-name, .team-name {
    text-align: center;
  }

  h1 {
    display: block;
    width: 100%;
  }

  h1::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Stats become 2 columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Sponsor circles */
  .sponsor-container {
    position: static !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    top: 4.5rem;
    right: 2rem;
    z-index: 2;
  }

  .sponsor-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fpl-purple);
    border: 2px solid var(--fpl-green);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .stat-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    padding: 1rem 0.6rem;
  }

  .team-name {
    margin: 0 auto;
    min-width: unset;
    width: 100%;
    text-align: center;
    position: static;
    display: block;
  }

  .player-name {
    flex: unset;
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }

  .stat-number {
    min-width: auto;
  }

  .twitter-link {
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    max-width: fit-content;
  }

  .footer {
    text-align: center;
  }

  /* Set correct order for all elements */
  .mobile-title {
    order: 0;
  }

  .sponsor-container {
    order: 1;
  }

  h2#gameweek-number {
    order: 2;
  }

  .countdown-container {
    order: 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    margin: 1rem 0;
    padding: 1rem;
    gap: 0.5rem;
  }

  .countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .circle {
    width: 50px;
    height: 50px;
  }

  .circle span {
    font-size: 1.4rem;
  }

  .stat-section .stat-item .team-name {
    margin: 0 auto;
    min-width: unset;
    width: 100%;
    text-align: center !important;
    position: static;
    display: block;
    left: 0;
  }

  .stat-section .stat-item .player-name {
    flex: unset;
    text-align: center !important;
    width: 100%;
    margin: 0 auto;
    display: block;
    position: static;
    padding: 0;
    float: none;
    transform: none;
  }

  /* Also ensure the parent container is properly set up */
  .stat-section .stat-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Mobile specific */
  .mobile-title {
    font-size: 2rem;
  }

  /* Keep countdown in one row but smaller */
  .countdown-container {
    padding: 1rem;
    gap: 0.5rem;
  }

  .circle {
    width: 40px;
    height: 40px;
  }

  .circle span {
    font-size: 1.2rem;
  }

  .label {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }

  .news-text {
    font-size: 0.8rem;
  }

  .news-text.fade-out {
    opacity: 0;
  }

  .news-ticker-container .news-text {
    font-size: 0.8rem !important;
  }

  .news-ticker-container .news-text.fade-out {
    opacity: 0;
  }
}

@media (max-width: 480px) {
  /* Mobile - 1 column */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    margin: 0;
  }

  .sponsor-circle {
    width: 30px;
    height: 30px;
  }

  .sponsor-container {
    max-width: 350px;
    width: 95%;
    gap: 0.5rem;
  }
}

/* News Ticker Styles */
.news-ticker-container {
  width: 100%;
  margin: 2rem auto;
  background: rgba(70, 29, 75, 0.8);
  border-radius: 8px;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

.news-ticker {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  padding: 0.5rem;
  text-align: center;
}

.news-item {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.25rem;
}

.news-content {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.club-crest {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.news-text {
  display: block;
  color: white;
  font-size: 1rem;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.news-text.fade-out {
  opacity: 0;
}

.stat-section {
  background: rgba(70, 29, 75, 0.8);
  border-radius: 12px;
  padding: 1rem;
  margin: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-section h3 {
  color: var(--fpl-green);
  margin: 0 0 0.8rem 0;
  font-size: 1.1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.stat-number {
  color: var(--fpl-green);
  font-weight: bold;
  font-size: 0.9rem;
  min-width: 70px;
}

.player-name {
  font-size: 0.9rem;
  text-align: left;
  flex: 1;
}

.team-name {
  font-size: 0.8rem;
  text-align: left;
  min-width: 80px;
  margin-left: auto;
}

/* Sponsor circles */
.sponsor-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  position: absolute;
  top: 4.5rem;
  right: 2rem;
  z-index: 2;
}

.sponsor-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fpl-purple);
  border: 2px solid var(--fpl-green);
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.sponsor-circle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: var(--fpl-gradient);
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.sponsor-circle:hover::before {
  opacity: 1;
}
