/* Mobile First – Basiswerte bereits in variables.css */

/* ── Mobile < 480px ─────────────────────────────────────────── */
.desktop-only { display: none !important; }
.mobile-only  { display: flex !important; }

.arena-wrapper {
  width: 100vw;
  max-width: 100vw;
  height: 60vh;
  min-height: 320px;
}

.hand-bar {
  padding: 6px 4px;
  gap: 4px;
}

.hand-card {
  width: var(--card-size);
  height: calc(var(--card-size) * 1.3);
  font-size: 0.7rem;
}

.game-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--clash-darker);
  gap: 8px;
  flex-shrink: 0;
}

.game-footer {
  background: var(--clash-darker);
  padding: 6px 8px;
  flex-shrink: 0;
}

/* ── Tablet Portrait 481–768px ──────────────────────────────── */
@media (min-width: 481px) {
  :root {
    --card-size: 84px;
    --hand-height: 110px;
  }

  .arena-wrapper {
    height: 65vh;
  }

  .hand-bar {
    gap: 8px;
    padding: 8px;
  }
}

/* ── Tablet Landscape 769–1024px ────────────────────────────── */
@media (min-width: 769px) {
  :root {
    --card-size: 96px;
    --hand-height: 120px;
    --arena-max-w: 480px;
  }

  .desktop-only { display: flex !important; }
  .mobile-only  { display: none !important; }

  .arena-wrapper {
    width: var(--arena-max-w);
    height: 100%;
    max-height: calc(100vh - var(--header-h));
  }

  .game-layout {
    flex-direction: row;
    align-items: stretch;
  }

  .game-sidebar {
    width: 200px;
    background: var(--clash-darker);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
  }

  .game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
  }

  .game-header {
    padding: 10px 20px;
  }
}

/* ── Desktop > 1024px ────────────────────────────────────────── */
@media (min-width: 1025px) {
  :root {
    --card-size: 104px;
    --arena-max-w: 540px;
  }

  .arena-wrapper {
    width: var(--arena-max-w);
  }

  .game-sidebar {
    width: 240px;
  }

  /* Hover-Tooltips nur auf Desktop */
  .hand-card:hover .card-tooltip { display: block; }
}

/* ── Profile / Cards / Admin pages ──────────────────────────── */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

@media (min-width: 769px) {
  .page-content { padding: 24px 32px; }
}

/* ── Card Grid ───────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

@media (min-width: 481px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (min-width: 769px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ── Admin Table ─────────────────────────────────────────────── */
.admin-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 769px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Auth Page ───────────────────────────────────────────────── */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

@media (min-width: 769px) {
  .auth-container {
    flex-direction: row;
    gap: 60px;
    justify-content: center;
    align-items: center;
  }
}
