/* ==========================================================================
   CSS DÉDIÉ : NAVAL.PHP - Bataille Navale Classique
   Fichier : css/naval.css
   École de l'Enfant-Jésus - Morlanwelz
   ========================================================================== */

.game-container {
    background: #ffffff;
    border: 3px solid #38bdf8;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0px 8px 25px rgba(56, 189, 248, 0.15);
  }

  .level-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }

  .level-btn {
    background-color: #f0f9ff;
    border: 2px solid #38bdf8;
    color: #0369a1;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Fredoka', sans-serif, Arial;
  }

  .level-btn:hover, .level-btn.active {
    background-color: #38bdf8;
    color: white;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
  }

  .game-boards-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 15px;
  }

  .board-box {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    flex: 1;
    min-width: 300px;
    max-width: 440px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  }

  .board-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .grid-table {
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 3px;
    user-select: none;
  }

  .grid-cell {
    width: 32px;
    height: 32px;
    background-color: #e0f2fe;
    border: 2px solid #bae6fd;
    border-radius: 6px;
    text-align: center;
    vertical-align: middle;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
  }

  .grid-header {
    width: 32px;
    height: 24px;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-align: center;
    vertical-align: middle;
  }

  .radar-grid .grid-cell:hover:not(.hit):not(.miss) {
    background-color: #7dd3fc;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
    z-index: 2;
  }

  /* Cell states */
  .cell-ship { background-color: #94a3b8; border-color: #64748b; color: #ffffff; }
  .cell-hit { background-color: #ef4444 !important; border-color: #dc2626 !important; color: #ffffff; animation: popHit 0.3s ease; }
  .cell-miss { background-color: #38bdf8 !important; border-color: #0284c7 !important; color: #ffffff; opacity: 0.6; }
  .cell-sunk { background-color: #991b1b !important; border-color: #7f1d1d !important; color: #ffffff; }

  @keyframes popHit {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
  }

  .ship-status-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
  }

  .ship-badge {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .ship-badge.sunk {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
    text-decoration: line-through;
  }

  .controls-bar {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .action-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    font-weight: 800;
    padding: 10px 22px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    transition: all 0.2s ease;
    font-family: 'Fredoka', sans-serif, Arial;
  }

  .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.5);
  }

  .action-btn.secondary {
    background: #f1f5f9;
    color: #334155;
    border: 2px solid #cbd5e1;
    box-shadow: none;
  }

  .action-btn.secondary:hover {
    background: #e2e8f0;
  }

  .status-banner {
    background: #f0fdf4;
    border: 2px solid #86efac;
    color: #166534;
    border-radius: 12px;
    padding: 12px 20px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 15px;
  }

  /* Confetti Overlay */
  #confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
  }

  @media screen and (max-width: 640px) {
    .grid-cell { width: 26px; height: 26px; font-size: 12px; }
    .grid-header { width: 26px; height: 20px; font-size: 10px; }
    .board-box { min-width: 100%; }
  }
