/* mobile.css */
/* Additional tweaks for very small screens */

@media (max-width: 320px) {
  .foundation, .tableau-column, #stock, #waste, .card {
    width: 40px;
    height: 56px;
  }
  
  .opponent-placeholder {
    width: 150px;
    height: 120px;
  }
}

#player-name-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

/* ========================= */

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    max-width: none;
    padding: 0px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .accept-button {
    font-size: 14px;
    padding: 6px 12px;
  }

  .slider-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .slider-row input[type="number"] {
    width: 100%;
    margin-top: 8px;
  }
}

#intro-body input {
  font-size: 16px;
}

@media (max-width: 500px) {
  #top-row, #tableau {
    gap: 2vw;
    margin-bottom: 8px;
  }

  #board-container {
    width: 100%;
    padding: 0 2vw;
  }
}

@media (max-width: 500px) {
  #header-rectangle,
  footer {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  #score-container,
  #moves-container {
    font-size: 0.8em;
    min-width: auto;
  }

  #timer {
    font-size: 18px;
    width: auto;
  }
}

#game-container {
  align-items: center;
  padding: 5px;
}

#board-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 480px) {
  .card {
    width: 48px;
    height: 64px;
  }

  .foundation,
  .top-area,
  .tableau-column {
    width: 48px;
    height: 64px;
  }

  #top-row, #tableau {
    gap: 4px;
  }
}

@media (max-width: 480px) {
  #deck-styles-modal .modal-content {
    width: 90vw;
    max-width: 360px; /* Ensures it doesn’t get too wide */
    margin: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    position: fixed;
  }

  #deck-styles-grid {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); /* 3-4 per row */
  }
}


/* =============================== */
/* 🟨 RESPONSIVE STATS MODAL FIXES */
/* =============================== */

@media (max-width: 480px) {
  .stats-modal .modal-content {
    width: 90vw;
    max-width: 340px;
    margin: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    position: fixed;
    background: #fff;
    border-radius: 8px;
    padding: 0 !important; /* Ensure no internal padding */
    box-sizing: border-box;
  }
}

@media (min-width: 481px) {
  .stats-modal .modal-content {
    width: 450px;
    max-width: 100%;
    margin: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    position: fixed;
    background: #fff;
    border-radius: 8px;
    padding: 0 !important;
    box-sizing: border-box;
  }
}
