/* ----------- Max-width: 1050px (Tablet & Small Desktop) ----------- */
@media screen and (max-width: 1050px) {
  /* Header and Logo */
  .logo-arena {
    font-size: 3rem;
  }
  .logo-sweats {
    font-size: 2.5rem;
  }
  header {
    padding-top: 20px;
    margin-bottom: 2px;
  }

  /* Top Controls */
  .region-selector,
  .help-selector,
  .countdown-timer,
  .season-selector {
    position: static;
    display: inline-block;
    margin: 10px 5px;
  }
  .region-selector,
  .help-selector,
  .season-selector {
    z-index: 50;
  }

  .mobile-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 0px auto;
    padding: 0 10px;
  }

  /* Adjust season subtitle styling for mobile */
  .season-subtitle {
    margin: -10px auto 0px auto;
  }
  
  .season-year,
  .season-word, 
  .season-number {
    font-size: 1.25rem;
    letter-spacing: 14px;
  }
  
  .season-word {
    letter-spacing: 8px;
  }
  .region-btn,
  .help-btn,
  .season-btn {
    width: auto;
    min-width: 0;
  }

  /* Dropdowns */
  .help-dropdown,
  .region-dropdown {
    position: absolute;
  }
  .help-dropdown {
    min-width: 90vw;
    max-width: 90vw;
  }

  /* Container */
  .container {
    overflow: visible;
    padding: 0 15px;
    min-width: auto;
    width: 100%;
    max-width: 1050px;
  }
  body {
    overflow-x: hidden;
  }

  /* Search */
  .search-container {
    margin: 10px auto;
    width: 100%;
    transform: none;
    padding: 10px;
  }
  .search-container form {
    flex-wrap: wrap;
  }
  input[type="text"] {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  .search-btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }

  /* Leaderboard */
  .leaderboard-container {
    transform: none;
    width: 100%;
  }
  .carousel-item {
    padding: 2px 12px;
    gap: 10px;
  }
  .carousel-item .rank {
    min-width: 30px;
    flex: 0 0 30px;
    font-size: 0.95rem;
  }
  .carousel-item .player-name {
    padding: 0 20px;
    font-size: 0.95rem;
  }
  .carousel-item .rating {
    min-width: 70px;
    flex: 0 0 70px;
    font-size: 0.95rem;
  }
  .carousel-item .champions {
    flex: 0 0 50px;
    justify-content: center;
  }
  .carousel-item .champions img {
    width: 25px;
    height: 25px;
  }
  .carousel-item .league img {
    width: 30px;
    height: 30px;
  }

  /* Carousel Header */
  .carousel-header {
    padding: 8px 15px;
    font-size: 0.75rem;
  }
  .carousel-header .header-rank {
    flex: 0 0 50px;
  }
  .carousel-header .header-name {
    padding-left: 100px;
  }
  .carousel-header .header-rating {
    flex: 0 0 0px;
  }
  .carousel-header .header-champs {
    flex: 0 0 120px;
  }

  .profile-btn img{
    width: 20px;
    height: 20px;
  }

  /* Live game button adjustments for tablet/small desktop */
  .live-game-btn {
    right: -35px;
    padding: 3px 15px;
    font-size: 75rem;
    min-width: 60px;
    width: 60px;
    height: 100%;
    background-size: contain;
    clip-path: none; /* Remove clip-path since we're using SVG background */
    font-size: 10px;
  }
  
  .button-group .live-indicator {
    left: 8px;
  }

  .player-badge {
    
    position: relative;
    left: 0px;
    top: 4px;
  }

 

  /* Autocomplete */
  .autocomplete-dropdown {
    width: 100%;
  }

  /* Return to Top Button */
  .return-to-top {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 650px) {

  .carousel-item .rank-change{
    display: none;
  }
}

/* ----------- Max-width: 650px (Large Mobile) ----------- */
@media screen and (max-width: 650px) {
  /* Header */
  header {
    padding-top: 15px;
  }

  /* Removed profile-champ-block width override to maintain fixed 250px width */

  /* Controls */
  .region-btn,
  .help-btn,
  .season-btn {
    padding: 5px 8px;
    gap: 6px;
    font-size: 0.75rem;
  }

  .season-selector {
    top: 88px;
    left: 42px;
    z-index: 50;
  }
  .countdown-timer {
    padding: 5px 8px;
  }
  .timer-value {
    font-size: 0.9rem;
  }
  .timer-label {
    font-size: 0.7rem;
    margin-top: 1px;
  }
  .region-label,
  .help-text {
    font-size: 0.75rem;
  }
  .region-value {
    font-size: 0.8rem;
  }
  .dropdown-arrow {
    padding: 2px;
  }

  /* Disabled region options on mobile */
  .region-option.disabled {
    opacity: 0.5;
  }

  .coming-soon {
    font-size: 0.75em;
  }

  .mobile-controls {
    gap: 6px;
    margin-bottom: 0px;
  }

  /* Search */
  .search-container {
    margin: 8px auto;
  }

  /* Side Widget */
  .side-widget {
    width: 100px;
  }
  .widget-text {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }
  .widget-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 100px;
  }
  .side-widget .support-icon {
    width: 90px;
    height: 28px;
  }

  /* Return to Top Button */
  .return-to-top {
    padding: 8px 16px;
    font-size: 0.85rem;
    bottom: 10px;
  }
.carousel-item .rank-change{
    display: none;
  }
}

/* ----------- Max-width: 600px (Small Mobile) ----------- */
@media screen and (max-width: 600px) {
  /* Header */
  header {
    padding-top: 10px;
  }
  .profile-btn {
    padding: 2px 10px;
  }
  .profile-btn img {
    width: 15px;
    height: 15px;
  }
  .profile-btn p {
    font-size: 8px;
  }

  /* Hide live game button on small mobile, show only indicator */
  .live-game-btn {
    display: none;
  }
  
  .button-group .live-indicator {
    left: auto;
    right: 0px;
    width: 6px;
    height: 6px;
  }

  /* Controls */
  .mobile-controls {
    gap: 4px;
    margin-bottom: 0px;
  }
  .search-container {
    margin: 6px auto;
  }
  .leaderboard-container {
    margin-bottom: 5px;
  }
  .logo-arena {
    font-size: 2rem;
  }

  .logo-sweats {
    font-size: 1.8rem;
  }
  
  /* Adjust season subtitle for small mobile */
  .season-subtitle {
    margin: -6px auto -2px auto;
  }
  
  .season-year,
  .season-word, 
  .season-number {
    font-size: 1rem;
    letter-spacing: 10px;
  }
  
  .season-word {
    letter-spacing: 4px;
  }
  .container {
    padding: 0 5px;
  }

  /* Carousel Header */
  .carousel-header {
    padding: 6px 8px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
  }
  .carousel-header .header-rank {
    flex: 0 0 58px;
    text-align: left;
    justify-content: flex-start;
    padding-left: 10px;
  }
  .carousel-header .header-name {
    flex: 1;
    padding-left: 25px;
    text-align: left;
  }
  .carousel-header .header-rating {
    text-align: center;
    justify-content: flex-end;
    margin-right: 0px;
  }
  .carousel-header .header-champs,
  .carousel-header .header-profile {
    text-align: center;
    justify-content: center;
  }
  .carousel-header .header-champs {
    flex: 0 0 70px;
  }
  .carousel-header .header-profile {
    flex: 0 0 50px;
  }

  /* Carousel Items */
  .carousel-item {
    padding: 3px 8px;
    margin: 6px 8px;
    overflow: hidden;
    gap: 5px;
  }
  .carousel-item .league {
    flex: 0 0 30px;
    margin-right: 4px;
    display: flex;
    align-items: center;
  }
  .carousel-item .league img {
    width: 24px;
    height: 24px;
  }
  .carousel-item .rank {
    min-width: 28px;
    flex: 0 0 28px;
    font-size: 0.8rem;
    padding-left: 0;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    margin-left: 0px;
  }
  .carousel-item .player-name {
    flex: 1;
    padding: 0 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    min-width: 80px;
  }
  .carousel-item .rank-change {
    display: none;
  }
  .carousel-item .change-arrow {
    font-size: 10px;
  }
  .carousel-item .rating {
    min-width: 0px;
    flex: 0 0 40px;
    font-size: 0.7rem;
    margin-right: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .carousel-item .champions {
    flex: 0 0 70px;
    gap: 5px;
    justify-content: flex-end;
    display: flex;
    align-items: center;
  }
  .carousel-item .champions img {
    width: 20px;
    height: 20px;
  }

  .player-badge {
    position: relative;
    left: -10px;
    top: -5px;
   
  }
  .player-badge img {
    width: 25px;
    height: 25px;
  }

  /* Dropdowns */
  .help-dropdown {
    min-width: 95vw;
    max-width: 95vw;
    left: 2.5vw;
  }
  .region-dropdown {
    min-width: auto;
    max-width: 95vw;
  }

  /* Search Inputs */
  input[type="text"] {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .search-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* Top Buttons */
  .region-btn,
  .help-btn,
  .season-btn {
    padding: 3px 6px;
    gap: 4px;
    font-size: 0.65rem;
  }

  /* .region-btn{
    width: 110px;
  }
  .season-btn{
    width: 110px;
   
  } */
  .countdown-timer {
    padding: 3px 6px;
    margin-bottom: 0;
  }
  .timer-value {
    font-size: 0.8rem;
  }
  .timer-label {
    font-size: 0.6rem;
    margin-top: 0;
  }
  .region-label,
  .help-text {
    font-size: 0.65rem;
  }
  .region-value {
    font-size: 0.75rem;
  }
  .season-value {
    font-size: 0.75rem;
    
  }
  .dropdown-arrow {
    padding: 1.5px;
    margin-left: 3px;
  }
  .mobile-controls {
    gap: 4px;
    margin-bottom: 10px;
  }

  /* Side Widget */
  .side-widget {
    width: 80px;
  }
  .widget-text {
    font-size: 0.6rem;
    margin-bottom: 6px;
  }
  .widget-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
    min-width: 80px;
  }
  .side-widget .support-icon {
    width: 80px;
    height: 26px;
  }
  .left-widget {
    bottom: 15px;
  }
  .right-widget {
    bottom: 22px;
  }

  /* Layout & Scrolling */
  body {
    overflow-y: hidden;
  }
  .container {
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .leaderboard-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 0;
  }
  .leaderboard-carousel-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
  }
  .bottom-fade {
    position: absolute;
    bottom: 0;
    height: 80px;
    pointer-events: none;
  }

  /* Return to Top Button */
  .return-to-top {
    padding: 6px 12px;
    font-size: 0.8rem;
    bottom: 5px;
  }
}
@media screen and (min-width: 390px) and (max-width: 600px) {
  .carousel-header .header-name {
    flex: 1;
    padding-left: 38px;
    text-align: left;
  }

  .carousel-header .header-champs {
    flex: 0 0 75px;
  }

  .player-badge {
    width: 15px;
    position: relative;
    right: 3px;
  }
}

@media screen and (min-width: 380px) and (max-width: 390px) {
  .carousel-header .header-name {
    flex: 1;
    padding-left: 46px;
    text-align: left;
  }

  .player-badge img{
    width: 15px;
    position: relative;
    right: 8px;
  }
}

/* ----------- Fine-tuning Carousel Header Padding for Specific Widths ----------- */
@media screen and (min-width: 340px) and (max-width: 380px) {
  .carousel-header .header-name {
    flex: 1;
    padding-left: 22px;
    text-align: left;
  }

  .carousel-item .player-name {
    padding: 0 0px;
    min-width: 72px; 
  }

  .no-badges {
    width: 15px;
  }

  .player-badge{
    width: 6px;
  }
  .player-badge img {
    width: 15px;
    position: relative;
    right: 8px;
  }
}

@media screen and (min-width: 200px) and (max-width: 350px) {
  .player-badge {
    width: 15px;
    position: relative;
    right: 8px;
  }
  .no-badges {
    width: 15px;
  }

  .player-badge{
    width: 6px;
  }
}


/* ----------- Min-width: 1700px (Large Desktop) ----------- */
@media screen and (min-width: 1700px) {
  .container {
    width: 1140px;
    max-width: 1140px;
  }
  .carousel-item.selected {
    transform: scale(1.02);
  }
}
