body { font-family: Arial, sans-serif; background: #f7f7f7; margin: 0; padding-bottom: 100px; /* Space for sticky footer */ }

/* Layout for Ads */
.page-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1250px;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.main-content {
    flex: 1;
    max-width: 850px;
    min-width: 0;
}

.sidebar-ad {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-unit {
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    border-radius: 8px;
    overflow: hidden;
}

.ad-unit.sticky-side {
    position: sticky;
    top: 20px;
}

/* Sticky Footer Ad */
.sticky-footer-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    min-height: 60px;
}

/* Modified Container */
.container { 
    max-width: 100%; /* Let parent control width */
    margin: 0; /* Remove auto margin */
    background: #fff; 
    border-radius: 10px; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.08); 
    padding: 24px; 
}

h1 { text-align: center; margin-bottom: 16px; }
#status, #game-status { text-align: center; margin: 12px 0; font-size: 1.05em; }
.info-row { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.info-card { flex: 1 1 240px; padding: 12px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fafafa; min-height: 60px; }
.players { display: flex; justify-content: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.player-slot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fdfdfd; }
.board { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; align-items: center; }
.board-grid { display: grid; grid-template-columns: repeat(6, 1fr) 1fr repeat(6, 1fr) 1fr; gap: 8px; width: 100%; max-width: 820px; align-items: stretch; }
.point { background: #f2f2f2; border-radius: 8px; padding: 8px; min-height: 90px; display: flex; flex-direction: column; align-items: center; border: 1px solid #e0e0e0; }
.point, .bar-stack, .borne-slot { cursor: pointer; }
.point-label { font-size: 0.75em; color: #666; margin-bottom: 4px; }
.checkers { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.checker { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); }
.checker-x { background: #e85d75; }
.checker-o { background: #f4a261; }
.extra-count { font-size: 0.75em; color: #444; padding: 2px 6px; background: #fff; border-radius: 6px; border: 1px solid #ddd; }
.selected-from { outline: 3px solid #f39c12; outline-offset: 2px; box-shadow: 0 0 0 2px rgba(243,156,18,0.15); }
.legal-target { outline: 3px solid #27ae60; outline-offset: 2px; }
.bar { display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; padding: 8px; border: 1px solid #d0d4da; border-radius: 8px; background: #e6e8ec; height: 100%; }
.bar-stack { width: 100%; min-height: 90px; border: 1px solid #d0d4da; border-radius: 8px; padding: 6px; display: flex; align-items: center; justify-content: center; background: #e6e8ec; }
.bar-label { display: none; }
.borne-off { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid #d0d4da; border-radius: 8px; background: #e6e8ec; height: 100%; justify-content: center; }
.borne-slot { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; }
.bar-column, .borne-column { align-self: stretch; }
.dice-row { display: flex; gap: 8px; }
.die { width: 36px; height: 36px; border-radius: 8px; background: #fff; border: 1px solid #ccc; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.dice-remaining { margin-bottom: 6px; color: #555; }
.moves { display: flex; flex-direction: column; gap: 8px; }
.move-btn { padding: 8px 12px; border-radius: 6px; border: 1px solid #1976d2; background: #e3f2fd; color: #0d47a1; cursor: pointer; text-align: left; }
.move-btn:hover { background: #bbdefb; }

@media (max-width: 1150px) {
  .page-wrapper {
      flex-direction: column;
      align-items: center;
  }
  
  .sidebar-ad {
      width: 100%;
      max-width: 728px;
      flex-direction: row;
      justify-content: center;
      flex-wrap: wrap;
  }
  
  .ad-unit.sticky-side {
      position: static;
  }
}

@media (max-width: 720px) {
  .container { margin: 20px auto; padding: 16px; }
  .points-row { grid-template-columns: repeat(6, 1fr); }
  .point { min-height: 70px; }
}

@media (max-width: 480px) {
  .container { margin: 10px; padding: 12px; }
  .points-row { grid-template-columns: repeat(4, 1fr); }
  .move-btn { font-size: 0.9em; }
}

#leaderboard-list span { color: #000 !important; }