/* ═══════════════════════════════════════
   LUCKSY — Full Desktop Adaptation
   ═══════════════════════════════════════ */

@media (min-width: 769px) {

  /* ─── Global Layout ─── */
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* ─── Header ─── */
  .header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px 0;
  }
  .header__inner {
    height: 70px;
    border-radius: 20px;
    padding: 0 32px;
  }
  .logo__icon { height: 30px; }
  .logo__text { font-size: 20px; letter-spacing: -0.03em; }

  .btn-login {
    height: 42px;
    padding: 0 28px;
    border-radius: 14px;
    font-size: 14px;
    transition: opacity 0.2s;
  }
  .btn-login:hover { opacity: 0.8; }
  .btn-avatar { width: 42px; height: 42px; }

  /* ─── Search ─── */
  .search-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 40px;
  }
  .search-field {
    height: 56px;
    border-radius: 20px;
    font-size: 15px;
    padding: 0 52px 0 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .search-field:focus {
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
  }
  [data-theme="dark"] .search-field:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
  }

  /* ─── Game Cards Grid ─── */
  .cards-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 40px;
    padding-bottom: 100px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }
  .game-card {
    flex: 1 1 calc(33.333% - 14px);
    min-width: 300px;
    max-width: calc(33.333% - 14px);
    height: 260px;
    border-radius: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
  }
  .game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.12);
  }
  [data-theme="dark"] .game-card:hover {
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
  }
  .game-card__preview { height: 180px; border-radius: 20px; }
  .game-card__bottom { height: calc(260px - 180px - 15px); }
  .game-card__name { font-size: 18px; }

  .game-card__btn {
    height: 42px;
    padding: 0 28px;
    font-size: 14px;
    border-radius: 14px;
    transition: all 0.2s ease;
  }
  .game-card__btn:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
  }

  /* ─── Preview Animations ─── */
  .dice-img { width: 90px; height: 90px; }
  .coin-flipper { width: 90px; height: 90px; }
  .mines-scene { width: 300px; height: 140px; }
  .deco-near-1 { width: 55px; height: 55px; }
  .deco-near-2 { width: 50px; height: 50px; }
  .deco-mid-1 { width: 38px; height: 38px; }
  .deco-mid-2 { width: 35px; height: 35px; }
  .deco-far-1 { width: 24px; height: 24px; }
  .deco-far-2 { width: 22px; height: 22px; }
  .dice-badge, .coinflip-badge {
    width: 100px; height: 42px; font-size: 15px;
  }

  /* ─── Bottom Nav → Desktop Bar ─── */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 66px;
    border-radius: 20px 20px 0 0;
    padding: 0 20px;
    left: 37px;
    right: 37px;
    transform: none;
  }
  .bottom-nav__item {
    flex-direction: row;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 14px;
    transition: background 0.2s;
  }
  .bottom-nav__item:hover { background: rgba(0,0,0,0.06); }
  [data-theme="dark"] .bottom-nav__item:hover { background: rgba(255,255,255,0.08); }
  .bottom-nav__item img { width: 20px; height: 20px; }
  .bottom-nav__item span { font-size: 13px; }

  /* ─── SPA Content Container ─── */
  #mainContent {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
  }

  /* ─── Game Pages (Dice, Coinflip, Mines) ─── */
  .game-page {
    max-width: 620px;
    margin: 0 auto;
    padding-bottom: 100px;
  }
  .game-header { margin-bottom: 24px; }
  .game-header h2 { font-size: 1.4rem; }
  .game-header__back {
    font-size: 28px;
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 14px;
    transition: background 0.2s;
  }
  .game-header__back:hover { background: rgba(0,0,0,0.05); }
  [data-theme="dark"] .game-header__back:hover { background: rgba(255,255,255,0.08); }

  /* ─── Form Elements ─── */
  .game-sections { gap: 16px; }
  .flex-row { gap: 16px; }
  .input-group label { font-size: 13px; }
  .input-field {
    height: 52px;
    border-radius: 14px;
    font-size: 16px;
    padding: 0 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .input-field:focus {
    border-color: #56ab2f;
    box-shadow: 0 0 0 3px rgba(86,171,47,0.1);
  }
  .quick-btns { gap: 6px; }
  .quick-btn {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 10px;
    transition: all 0.15s ease;
  }
  .quick-btn:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
  }

  /* ─── Game Action Buttons ─── */
  .dice-action-btns { gap: 12px; }
  .dice-action-btn {
    height: 54px; border-radius: 16px; font-size: 16px;
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .dice-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  }
  .play-btn {
    height: 54px; border-radius: 16px; font-size: 16px;
    transition: transform 0.15s, box-shadow 0.15s;
  }
  .play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  }

  /* ─── Coin Game ─── */
  .coin-container { margin: 24px 0; }
  .coin { width: 140px; height: 140px; }
  .coin__face svg { width: 140px; height: 140px; }
  .coin-choices { gap: 12px; }
  .coin-choice {
    height: 54px; border-radius: 16px; font-size: 15px;
    transition: all 0.2s ease;
  }
  .coin-choice:hover { transform: translateY(-2px); }

  /* ─── Mines Game ─── */
  .mines-grid {
    max-width: 460px;
    margin: 0 auto;
    gap: 8px;
  }
  .mine-cell {
    border-radius: 14px;
    transition: transform 0.15s;
  }
  .mine-cell:hover { transform: scale(1.06); }

  /* ─── Game Info ─── */
  .potential-win { border-radius: 16px; padding: 16px; }
  .potential-win__amount { font-size: 22px; }
  .dice-ranges { border-radius: 14px; height: 14px; }
  .dice-result { font-size: 16px; padding: 14px; border-radius: 14px; }
  .history-section { border-radius: 16px; }
  .history-header { padding: 14px 16px; font-size: 14px; }

  /* ─── Router Games Grid ─── */
  .games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .card--game { border-radius: 20px; transition: transform 0.25s, box-shadow 0.25s; }
  .card--game:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(0,0,0,0.12); }
  .card__preview { height: 160px; border-radius: 16px; }
  .card__info { padding: 14px 16px; }

  .card__name { font-size: 17px; }
  .card__play-btn { font-size: 13px; padding: 8px 20px; border-radius: 12px; }
  .search-bar {
    height: 52px; border-radius: 16px; font-size: 15px;
    padding: 0 20px; margin-bottom: 20px;
  }

  /* ─── Auth Modal ─── */
  .modal {
    width: 440px; max-width: 440px; border-radius: 24px;
    margin: 0;
  }
  .modal__logo { margin-top: 36px; margin-bottom: 24px; }
  .modal__logo img { width: 32px; height: 32px; }
  .modal__brand { font-size: 16px; }
  .oauth-buttons { padding: 0 40px; gap: 14px; }
  .oauth-btn--vk { height: 86px; }
  .oauth-btn--tg { height: 112px; }
  .oauth-btn span { font-size: 15px; }
  .btn-close-modal {
    width: calc(100% - 80px);
    height: 42px; border-radius: 12px; font-size: 15px;
  }
  .auth-tabs { padding: 0 40px; }
  .auth-form-wrap { padding: 0 40px; }
  .auth-input { height: 46px; border-radius: 12px; font-size: 14px; }
  .auth-submit { height: 42px; border-radius: 12px; font-size: 14px; }
  .auth-tab { height: 36px; font-size: 14px; }

  /* ─── Side Menu ─── */
  .side-menu {
    width: 340px;
    border-radius: 24px 0 0 24px;
    padding-left: 28px; padding-right: 28px;
  }
  .side-menu__item {
    padding: 16px 0; font-size: 15px;
    transition: color 0.15s;
  }
  .side-menu__item:hover { color: #56ab2f; }

  /* ─── Avatar Dropdown ─── */
  .avatar-dropdown {
    left: auto;
    right: calc(50% - 568px);
    width: 280px;
    border-radius: 16px;
    top: calc(20px + 70px + 8px);
  }

  /* ─── Age Gate ─── */
  .age-gate__card {
    width: 440px; padding: 44px; border-radius: 24px;
  }
  .age-gate__title { font-size: 22px; }
  .age-gate__btns { gap: 16px; }
  .age-gate__btns .btn {
    height: 48px; border-radius: 14px; font-size: 15px;
    transition: transform 0.15s;
  }
  .age-gate__btns .btn:hover { transform: translateY(-2px); }

  /* ─── Inner Pages ─── */
  .wallet-page, .account-page { max-width: 520px; margin: 0 auto; padding-bottom: 100px; }
  .menu-page { max-width: 520px; margin: 0 auto; padding-bottom: 100px; }
  .faq-page { max-width: 700px; margin: 0 auto; padding-bottom: 100px; }
  .faq-question { padding: 18px 20px; font-size: 15px; }
  .faq-answer { padding: 0 20px 18px; font-size: 14px; line-height: 1.7; }

  /* ─── Admin Page (in-app) ─── */
  .admin-page { padding-bottom: 100px; }
  .admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .stat-card { border-radius: 16px; padding: 20px; }
  .admin-table { border-radius: 16px; overflow: auto; }
  .admin-table table { font-size: 13px; }
  .admin-table th, .admin-table td { padding: 12px 16px; }

  /* ─── Menu Items ─── */
  .menu-item {
    border-radius: 14px; padding: 14px 16px; font-size: 14px;
    transition: background 0.15s;
  }
  .menu-item:hover { background: rgba(0,0,0,0.04); }
  [data-theme="dark"] .menu-item:hover { background: rgba(255,255,255,0.06); }

  /* ─── Cards (generic) ─── */
  .card { border-radius: 20px; padding: 20px; }
  .card.mb-16 { margin-bottom: 20px; }

  /* ─── Balance & Auth ─── */
  .header__balance { font-size: 15px; }
  .header__balance span:first-child { font-size: 16px; font-weight: 700; }
  .header__user { width: 42px; height: 42px; font-size: 18px; border-radius: 14px; }

  /* ─── Toast ─── */
  .toast { min-width: 300px; border-radius: 14px; padding: 14px 24px; font-size: 14px; }

  /* ─── Scrollbar ─── */
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }
  [data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }
  [data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

  /* ─── General Transitions ─── */
  a, button { transition: all 0.2s ease; }
  .fade-in { animation: fadeIn 0.3s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

} /* end @media 769px */

/* ═══ Ultra-wide (1440px+) ═══ */
@media (min-width: 1440px) {
  .header, .search-wrap, .cards-wrap, .bottom-nav, #mainContent {
    max-width: 1400px;
  }
  .game-card { height: 300px; }
  .game-card__preview { height: 220px; }
  .game-card__bottom { height: calc(300px - 220px - 15px); }
  .dice-img { width: 110px; height: 110px; }
  .coin-flipper { width: 110px; height: 110px; }
  .mines-scene { width: 360px; height: 170px; }
  .game-page { max-width: 680px; }
  .games-grid { gap: 24px; }
  .avatar-dropdown { right: calc(50% - 668px); }
  .bottom-nav { max-width: 1400px; }
}

/* ═══ Tablet (769px — 1024px) ═══ */
@media (min-width: 769px) and (max-width: 1024px) {
  .game-card {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .avatar-dropdown { right: 40px; }
}
