/* ========================================================================
   mobile-adaptation.css
     main.css / s1.css
   ======================================================================== */

/* ----------     ---------- */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {stats-summary
  box-sizing: border-box;
}

img, canvas, video, svg {

}

/*      (   zoom/transform) */
@media (max-width: 900px) {
  html { zoom: 1 !important; }
  body { transform: none !important; transform-origin: initial !important; }
}

/*  —   */
@media (max-width: 900px) {
  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 10px 10px 70px !important;
  }
}

/* ----------  /  ---------- */
@media (max-width: 900px) {
  .site-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 10px;
  }
  .topbar-right {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 10px;
  }

  .profile-header .username {
    font-size: 1.15rem !important;
  }

  /*   .clan   padding-right:155px —     */
  .profile-header .clan,
  .clan {
    padding-right: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1.2;
  }
}

/* ----------  /  (    1200px) ---------- */
@media (max-width: 900px) {
  button,
  input[type="submit"],
  input[type="button"],
  .filter-container button {
    width: auto !important;
    min-width: 120px;
    height: 38px;
    line-height: 38px;
    font-size: 0.95rem;
    background-size: 100% 100% !important;
  }

  input[type="text"],
  textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* ----------  ( + ) ---------- */
@media (max-width: 900px) {
  .search-block-wrapper {
    margin-top: 10px;
    padding: 0 6px;
  }

  .welcome-message {
    margin-top: 18px !important;
    margin-bottom: 12px !important;
    padding: 0 8px;
  }

  .search-form {
    padding-left: 0 !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 680px !important;
    margin: 12px auto 10px !important;
    gap: 8px !important;
  }

  .search-form input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px !important;
    line-height: 38px !important;
  }

  .search-form button {
    flex: 0 0 92px;
    height: 38px !important;
  }

  .user-grid {
    max-width: 680px;
    width: 100%;
    margin: 0 auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 420px) {
  .user-grid {
    grid-template-columns: 1fr !important;
  }
  .search-form button { flex-basis: 86px; }
}

/* ----------  (  ) ---------- */
@media (max-width: 900px) {
  .tabs-wrapper {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .tabs {
    flex-direction: row !important;
    width: 100% !important;
    max-width: none !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 8px !important;
    padding-bottom: 4px;
  }

  .tabs li {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 12px;
  }

  .tab-content {
    width: 100%;
  }
}

/* ----------  SUMMARY (5-  -> ) ---------- */
@media (max-width: 900px) {
  :root{
    --track-left: 1fr !important;
    --track-mid:  1fr !important;
    --track-right:1fr !important;
    --sep: 0px !important;
  }

  .stats-summary{
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
    width: 100% !important;
    background: none !important;
    gap: 10px !important;
  }

  .stats-summary > :nth-child(1),
  .stats-summary > :nth-child(2),
  .stats-summary > :nth-child(3),
  .stats-summary > :nth-child(4){
    grid-column: 1 !important;
  }

  .stats-summary > div{
    margin-top: 0 !important;
  }
}

/* ---------- ACHIEVEMENTS ROW / GRID / LEFT SECTION / CHART ---------- */
@media (max-width: 900px) {
  .achievements-row{
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    background: none !important;
  }

  /* : summary/left -> chart -> achievements ( ) */
  .left-section{
    grid-column: 1 !important;
    justify-self: stretch !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 12px !important;
    order: 1;
  }

  .win-loss-chart{
    grid-column: 1 !important;
    justify-self: center !important;
    width: min(320px, 94vw) !important;
    height: min(320px, 94vw) !important;
    margin: 0 auto !important;
    order: 2;
  }

  .win-loss-chart canvas{
    width: 100% !important;
    height: 100% !important;
  }

  .achievements-grid{
    grid-column: 1 !important;
    justify-self: center !important;
    max-width: 100% !important;
    width: 100% !important;

    /*    ,    */
    margin: 0 !important;
    padding: 10px !important;

    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .achievement-card{
    width: auto !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    min-width: 0;
  }

  .achievement-card img{
    width: 100% !important;
    height: 100% !important;
  }

  /* stats-frame  left-section —  */
  .stats-frame{
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /*   —  */
  .favorite-hero-container{
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
  }

  .favorite-hero{
    grid-template-columns: auto 1fr auto !important;
    column-gap: 12px !important;
    width: 100% !important;
  }

  .favorite-hero .hero-img{
    width: 54px !important;
  }

  .hero-info p{
    font-size: 0.92rem !important;
  }
}

@media (max-width: 520px){
  .achievements-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 380px){
  .achievements-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ---------- CHARTS TOOLBAR ( ) ---------- */
@media (max-width: 480px){
  .wl-toolbar{
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .wl-left{
    grid-auto-flow: row !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .wl-btn{
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 10px !important;
  }
}

/* ---------- MATCHES GRID (6  -> 3/2/1) ---------- */
@media (max-width: 1200px){
  .matches-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    max-width: 100% !important;
    width: 100% !important;
    border-width: 1px;
  }
}
@media (max-width: 900px){
  .matches-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 8px !important;
  }
  .match-card{
    padding: 8px !important;
  }
  .match-card img{
    width: 68% !important;
  }
  .match-card a{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 34px !important;
    line-height: 34px !important;
    font-size: 0.9rem !important;
    background-size: 100% 100% !important;
  }
}
@media (max-width: 520px){
  .matches-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 360px){
  .matches-grid{
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 1024px) {
  .matches-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .matches-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px;
    gap: 12px;
  }

  .match-card {
    padding: 10px 8px;
  }

  .match-card img {
    width: 52px;
    height: 52px;
  }

  .match-card a {
    height: 40px;
    line-height: 40px;
    font-size: 0.9rem;
  }
}

@media (max-width: 420px) {
  .matches-grid {
    grid-template-columns: 1fr;
  }

  .match-card img {
    width: 60px;
    height: 60px;
  }
}


/* ---------- MATCH DETAILS (  -> ) ---------- */
@media (max-width: 900px){
 .match-details{
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px auto !important;
    padding: 10px !important;
  }

  .team-columns-wrapper{
    flex-direction: column;
    gap: 12px;
  }
  .team-column{
    flex: 1 1 auto;
  }

  .player-card{
    gap: 8px;
    padding: 8px 10px;
  }
  .hero-avatar{
    width: 44px;
    height: 44px;
  }
  .player-name{
    max-width: 60vw;
  }

  /* K/D/A   —  ,   */
  .stat-combat-row,
  .stat-corner-horizontal{
    gap: 8px;
    top: 6px;
    right: 8px;
  }
  .stat-icon{
    width: 18px;
    height: 18px;
  }
  .stat-icon-block{
    font-size: 0.72rem;
  }
}

/* ---------- HERO HISTORY TABLE (  ->  ) ---------- */
@media (max-width: 900px){
  .hero-history-table{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .hero-history-row{
    min-width: 720px; /*       */
  }
}

/* ---------- SERVER TOPS (  absolute  .container) ---------- */
@media (max-width: 900px){
  .server-tops-on-main{
    position: static !important;
    width: 100% !important;
    max-width: 680px !important;
    margin: 10px auto 0 !important;
    padding: 0 6px;
  }

  .server-top{
    align-items: center;
  }
  .server-top-art{
    width: min(240px, 90vw);
  }
  .server-top-caption{
    align-items: center;
    text-align: center;
  }
}
/* ========================================================================== */
/* achh mobile -                                                       */
/* ========================================================================== */
@media (max-width: 768px) {

  /* ===== CONTAINER ===== */
  .achievements {
    padding: 12px;
    border-radius: 14px;
    box-shadow:
      inset 0 0 18px rgba(0,255,255,.12),
      0 10px 28px rgba(0,0,0,.55);
  }

  /* ===== HEADER ===== */
  .achievements-header {
    margin-bottom: 8px;
  }

  .achievements-header h3 {
    font-size: 1.05rem;
    letter-spacing: .6px;
    text-shadow:
      0 0 6px rgba(0,255,255,.6);
  }

  /* ===== GRID PANEL ===== */
  .achievements-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;

    padding: 12px 10px;
    margin-left: 0;
    max-width: 100%;

    border-radius: 14px;
    background:
      linear-gradient(180deg, #0c3439, #071f23);

    box-shadow:
      inset 0 0 16px rgba(0,255,255,.14),
      inset 0 0 32px rgba(0,0,0,.5);
  }

  /* ===== CARD SIZE ===== */
  .achievement-card {
    width: 64px;
    height: 64px;
  }

  /* ===== ICON ===== */
  .achievement-card img,
  .achievement-card .ach-fallback {
    width: 56px;
    height: 56px;
  }

  /* ===== INNER FRAMES ===== */
  .achievement-card.unlocked::before {
    inset: 5px;
    border-width: 1px;
    opacity: .7;
  }

  /* ===== PROGRESS RING ===== */
  .achievement-card .ach-ring {
    inset: -3px;
    width: 70px;
    height: 70px;
  }

  .achievement-card .ring-bg,
  .achievement-card .ring-fg {
    stroke-width: 5;
  }

  /* ===== % TEXT ===== */
  .achievement-card .ach-center {
    font-size: 11px;
    letter-spacing: .2px;
  }

  /* ===== HOVER  TAP ===== */
  .achievement-card:hover {
    transform: none;
    box-shadow:
      0 0 10px var(--glow);
  }

  .achievement-card:hover img {
    transform: none;
    filter:
      brightness(1.05)
      drop-shadow(0 0 4px rgba(0,255,255,.35));
  }

  /* ===== TOOLTIP  DISABLE ===== */
  .achievement-card::after {
    display: none;
  }
}

/* ========================================================================== */
/*   ( 420px)                                                  */
/* ========================================================================== */

@media (max-width: 420px) {

  .achievements-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .achievement-card {
    width: 60px;
    height: 60px;
  }

  .achievement-card img,
  .achievement-card .ach-fallback {
    width: 52px;
    height: 52px;
  }

  .achievement-card .ach-ring {
    width: 66px;
    height: 66px;
  }
}




@media (max-width: 768px) {

  .heroes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .hero-card {
    min-height: 200px;
    padding: 12px 10px;
  }

  .hero-avatar {
    width: 60px;
    height: 60px;
  }

  .hero-name {
    font-size: 0.95rem;
  }

  .hero-stat {
    font-size: 0.78rem;
  }

  .card-details-btn {
    font-size: 0.78rem;
    padding: 7px 0;
  }
}

/* ==============================
    WEEKLY TOP
   ============================== */
@media (max-width: 768px) {

  .weekly-top {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    margin-bottom:15px
    padding: 10px;
    border-radius: 12px;

    background: linear-gradient(
      180deg,
      rgba(0, 80, 90, 0.95),
      rgba(0, 45, 50, 0.95)
    );

    border: 1px solid rgba(0,255,255,.25);
    box-shadow: inset 0 0 18px rgba(0,255,255,.12);
  }

  .weekly-top-header {
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    color: #bffcff;
    text-shadow: 0 0 6px rgba(0,255,255,.6);
  }

  .weekly-top-tabs {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 8px;
  }

  .weekly-top-tabs button {
    flex: 1;
    padding: 6px 4px;
    font-size: 0.75rem;
    font-weight: 700;

    border-radius: 6px;
    border: 1px solid rgba(0,255,255,.35);
    background: rgba(0,40,45,.85);
    color: #cceeff;
    cursor: pointer;
  }

  .weekly-top-tabs button.active {
    background: linear-gradient(180deg,#00eaff,#0099aa);
    color: #002b30;
  }

  /* ===  === */
  .weekly-top-list {
    max-height: 240px; /*   */
    overflow-y: auto;
    padding-right: 4px;
  }

  .weekly-top-list::-webkit-scrollbar {
    width: 4px;
  }

  .weekly-top-list::-webkit-scrollbar-thumb {
    background: rgba(0,255,255,.4);
    border-radius: 3px;
  }

  .weekly-top-row {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;

    padding: 6px 4px;
    margin-bottom: 4px;

    background: rgba(0,0,0,.25);
    border-radius: 6px;
    font-size: 0.75rem;
  }

  .weekly-top-row .pos {
    color: #00ffff;
    font-weight: 700;
    text-align: center;
  }

  .weekly-top-row .nick {
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 6px;
  }

  .weekly-top-row .value {
    font-weight: 700;
    color: #7ffcff;
  }
}




/* ---------- FAVORITES BLOCKS (  1   ) ---------- */
@media (max-width: 520px){
  #fav-main-list,
  #fav-tab-list{
    grid-template-columns: 1fr !important;
  }
  #fav-main-list > div,
  #fav-tab-list > div{
    grid-column: auto !important;
  }
  .favorites-on-main{
    width: 100% !important;
    max-width: 520px !important;
    margin: 10px auto !important;
  }
}

/* ----------      ---------- */
@media (max-width: 360px){
  .container{ padding-left: 8px !important; padding-right: 8px !important; }
  .tabs li{ padding: 9px 10px; }
  .match-title{ font-size: 1.05rem; }
}

/* ----------    ---------- */
@media (max-width: 768px) {
   
   .hero-btn-png img {
        width: 96%;
    }

    .hero-btn-text {
        font-size: .75rem;
    }
    .hero-card {
        max-width: 155px;
        padding: 10px 8px;
    }

    .hero-img {
        width: 62px;
    }

    .hero-name {
        font-size: 1.1rem;
    }

    .hero-rating {
        font-size: 1.1rem;
    }
}
/* =====================================================
  — NICK MODAL
   ===================================================== */
@media (max-width: 640px) {

  .nick-overlay {
    padding: 12px;
    align-items: flex-end; /* ,    */
  }

  .nick-panel {
    width: 100%;
    max-width: 420px;

    padding: 14px 14px 18px;
    border-radius: 14px 14px 10px 10px;

    animation: nickSlideUp .28s ease-out;
  }

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

  .nick-title {
    font-size: .05rem;
    margin-bottom: 12px;
  }

  .nick-input {
    height: 46px;
    font-size: 1rem;
    border-radius: 10px;
  }

  .nick-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }

  .btn-save,
  .btn-cancel {
    height: 44px;
    font-size: 1rem;
    border-radius: 10px;
  }

  /*     */
  .nick-panel {
@media (max-width: 640px) {

  .as-panel {
    flex-direction: column;
    gap: 10px;

    width: 100%;
    max-width: 420px;

    padding: 12px 14px;
  }

  .as-text {
    text-align: center;
    white-space: normal;
  }

  .as-btn {
    width: 100%;
    height: 44px;
    font-size: 1rem;
  }
}


/* =========================================================
   filter form
   ========================================================= */
@media (max-width: 640px) {
  .filters-form {
    gap: 8px;
  }

  .filter-group {
    min-width: 100%;
  }

  .filter-select {
    width: 100%;
  }
}