/* ----------- Max-width: 800px (Tablet & Small Desktop) ----------- */
@media screen and (max-width: 800px) {
  /* 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;
  }
  .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: 800px;
  }
  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;
  } 

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

 

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

  /* Support Comment */
  .support-comment {
    width: 95%;
    min-height: 176px;
    max-height: 176px;
  }

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

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

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

/* ----------- Max-width: 600px (Large Mobile) ----------- */
@media screen and (max-width: 600px) {
  /* Support Comment */
  .support-comment {
    width: 90%;
    min-height: 150px;
    max-height: 150px;
  }
  .support-comment-content {
    padding: 2px 15px;
  }
  .support-comment p {
    margin: 4px 0;
    font-size: 0.85rem;
    line-height: 1.3;
  }
  .donate-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    margin: 5px auto;
  }
  .support-icon {
    width: 70px;
    height: 70px;
    margin: -35px 0;
  }
  .close-comment {
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    font-size: 24px;
    line-height: 18px;
  }

  /* Header */
  header {
    padding-top: 15px;
  }

  .profile-champ-block{
    width: 145px !important;
    margin: 0; /* 3 small cards for small mobile */
  }

  /* 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: 90px;
  }

  /* Return to Top Button */
  .return-to-top {
    padding: 8px 16px;
    font-size: 0.85rem;
    bottom: 10px;
  }
  .return-to-top.comment-visible {
    bottom: 80px;
  }

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

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

  /* 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;
  }
  .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;
  }

  /* Support Comment */
  .support-comment {
    width: 95%;
    min-height: 140px;
    max-height: 140px;
  }
  .support-comment-content {
    padding: 2px 12px;
  }
  .support-comment p {
    margin: 3px 0;
    font-size: 0.8rem;
    line-height: 1.2;
  }
  .donate-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin: 3px auto;
  }
  .support-icon {
    width: 60px;
    height: 60px;
    margin: -30px 0;
  }
  .close-comment {
    width: 20px;
    height: 20px;
    font-size: 22px;
    line-height: 16px;
  }
  .support-comment .highlight {
    font-size: 0.85rem;
  }

  /* 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: 70px;
    height: 70px;
  }
  .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;
    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;
  }
  .return-to-top.comment-visible {
    bottom: 70px;
  }
}
@media screen and (min-width: 390px) and (max-width: 480px) {
  .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);
  }
}
