/* ---------------- common / game styles ---------------- 
:root{ --primary:#ffcf79; --bg:#efe6d6; --card:#fffef8; }

body { margin:0; font-family: Arial, sans-serif; background:var(--bg); color:#2b2316; }

/* APP LAYOUT 
.app { display:flex; height:100vh; }
.game-area { flex:1; display:flex; justify-content:center; align-items:center; }
.board-wrap { width: min(100vmin, 800px); height: min(100vmin, 800px); }
canvas { width:100%; height:100%; display:block; border-radius:15px; }

/* SIDE PANEL 
.side-panel { width:260px; background:linear-gradient(#fffef8,#f6eee0); padding:15px; box-shadow:-4px 0 15px rgba(0,0,0,0.1); overflow-y:auto; }
.game-title{text-align:center;color:#3b2306;}
.palette { text-align:center; margin-bottom:15px; }
.piece { width:60px;height:60px;border-radius:50%; margin:10px auto; cursor:grab; box-shadow:0 2px 6px rgba(0,0,0,0.3); }
.white{ background:#fff; border:2px solid #000;}
.black{ background:#111; border:2px solid #444;}
.controls{ display:flex; flex-direction:column; gap:8px;}
.btn{ padding:10px;border:none;border-radius:8px;cursor:pointer;background:#eee;font-weight:bold;}
.primary{ background:var(--primary); }
.status-box{ margin-top:12px;padding:10px;background:#fff;border-radius:10px; box-shadow: inset 0 0 5px rgba(0,0,0,0.1); }
.small{ font-size:12px;color:#5c4a32; }

@media (max-width:800px){ .app{ flex-direction:column; } .side-panel{ width:100%; box-shadow:0 -4px 15px rgba(0,0,0,0.1);} .palette{ display:flex; justify-content:center; gap:20px; } }

/* ---------------- landing styles ---------------- 
.landing-body { display:flex; flex-direction:column; min-height:100vh; }
.topbar { display:flex; justify-content:space-between; align-items:center; padding:12px 20px; background:#fff; box-shadow:0 2px 6px rgba(0,0,0,0.06);}
.brand{ font-weight:bold; }
.nav-btn{ background:transparent; border:1px solid #ddd; padding:8px 10px; border-radius:6px; cursor:pointer;}

/* hero 
.landing { padding:30px; flex:1; display:flex; gap:30px; justify-content:center; align-items:flex-start; flex-direction:column; }
.hero h1{ font-size:40px; margin:0 0 8px 0; }
.lead{ color:#564434; margin-bottom:18px; }
.tiles{ display:flex; gap:18px; flex-wrap:wrap; }
.tile{ width:220px; height:140px; background:var(--card); border-radius:12px; padding:14px; box-shadow:0 6px 18px rgba(0,0,0,0.06); cursor:pointer; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; }
.tile h2{ margin:0 0 6px 0; }
.features { margin-top:20px; }

/* ---------------- lets play / login styles ---------------- 
.letsplay-body{ display:flex; justify-content:center; align-items:center; min-height:100vh; background:#e9e9e9; }
.play-card{ width:760px; max-width:92vw; background:#fff; border-radius:10px; padding:40px 60px; position:relative; box-shadow:0 8px 40px rgba(0,0,0,0.06); text-align:center; }
.arrow-btn{ position:absolute; left:22px; top:22px; background: #fff4b0; border-radius:20px; border: none; width:44px; height:36px; font-size:18px; cursor:pointer; }
.letsplay-heading{ font-family: "legoe script", serif; font-size:56px; margin:6px 0 6px 0; text-transform:none; }
.versus{ margin:6px 0 18px 0; }
.vs-text{ font-family: "Informal Roman", serif; opacity:0.9; margin:0 6px; color:#333 }
.login-form{ display:flex; flex-direction:column; gap:10px; align-items:center; margin-top:8px; }
.login-form input{ padding:10px 12px; border-radius:8px; border:1px solid #cfcfcf; width:190px; font-size:16px; }
.login-controls{ margin-top:12px; display:flex; gap:20px; }
*/


/* ===== GLOBAL ===== */
.modes {
    margin: 0;
    font-family: Arial, sans-serif;
    color: black;
}

.app {
    display: flex;
    height: 100vh;
}

.piece_palette{
    margin-top: 5%;
    color: #3b2306;
}

#phaseText,#turnText{
    color: #000;
}

/* ===== GAME BOARD AREA ===== */
.game-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.board-wrap {
    width: min(100vmin, 800px);
    height: min(100vmin, 800px);

    /* REQUIRED FOR CANVAS TO DISPLAY */
    background: linear-gradient(#b8864b, #6f4e2e);
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    /*padding: 10px;*/
    border-radius: 15px;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 15px;
}

/* ===== RIGHT / BOTTOM PANEL ===== */
.side-panel {
    width: 260px;
    background: linear-gradient(#fffef8, #f6eee0);
    padding: 15px;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.game-title {
    text-align: center;
    color: #3b2306;
    font-weight: bold;
}

/* ===== PALETTE ===== */
.palette {
    text-align: center;
    margin-bottom: 15px;
}

.piece {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 10px auto;
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.white {
    background: #fff;
    border: 2px solid #000;
}

.black {
    background: #111;
    border: 2px solid #444;
}

.palette-row{
    display: flex;
    align-items: center;
    justify-content: center;
    
    
}

/*numbers counting down*/
.piece-count{
    font-weight: bold;
    font-size: 18px;
    text-align: left;
}

/* ===== CONTROLS ===== */
.controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #eee;
    /*font-weight: bold;

   /* padding: 12px;*/
    margin-top: 15px;
    width: 100%;
    border-radius: 10px;
    /*border: none;*/
    /*cursor: pointer;*/
    font-weight: 600;
    transition: 0.25s;
}
/****COLOR FOR THE BUTTON (NEW GAME)******/
.primary {
    background: #ffcf79;
}

.status-box {
    margin-top: 12px;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

/* ===== SMALL TEXT ===== */
.small {
    font-size: 12px;
    color: #5c4a32;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
    .app {
        flex-direction: column;
    }

    .side-panel {
        width: 100%;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    }

    .palette {
        display: flex;
        justify-content: center;
        gap: 20px;
    }
}


/* ---------- GLOBAL RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: radial-gradient(circle at top, #1b1b1b, #0d0d0d 70%);
    
    min-height: 100vh;
}

/* ---------- CENTER CONTAINERS ---------- */
.center-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* ---------- GLASS CARD ---------- */
.glass-card {
    background: rgba(255,255,255,0.06);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 30px;
    width: 330px;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

/* ---------- INPUTS ---------- */
.input {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.4);
    color: white;
}

.input:focus {
    outline: none;
    border-color: #8a59ff;
    box-shadow: 0 0 10px #8a59ff;
}

/* ---------- BUTTONS ---------- */


.btn-primary {
    background: linear-gradient(145deg, #8a59ff, #4725ff);
    color: white;
    box-shadow: 0 0 12px #8a59ff;
}

.btn-primary:hover {
    transform: scale(1.04);
    box-shadow: 0 0 18px #a17aff;
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
}

/* ---------- TABS ---------- */
.tab-box {
    display: flex;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #ddd;
}

.tab.active {
    color: #fff;
    border-color: #8a59ff;
}

#login-box {
    display: block;
}

#sign-box {
    display: none;
}

.hidden {
    display: none !important;
}

/* ---------- TOAST ---------- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    opacity: 0;
    animation: fadeToast 2s forwards;
}

@keyframes fadeToast {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* ---------- LET'S PLAY PAGE CUSTOM FONTS ---------- */
.lego-font {
    font-family: "Lucida Handwriting", cursive;
    color: #b8864b;
}

.lego-font2 {
    font-family: "Lucida Handwriting", cursive;
    color: #8a59ff;
}

.informal {
    font-family: "Comic Sans MS", "Informal Roman", sans-serif;
    opacity: 0.6;
    color: pink;
}

/* ---------- LETS PLAY LAYOUT ---------- */
.lp-container {
    width: 350px;
    margin: auto;
    padding-top: 40px;
    text-align: center;
}

.lp-title {
    font-size: 42px;
    color: white;
    margin-bottom: 10px;
}

.vs-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.lp-btn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.back-btn {
    position: absolute;
    top: 25px;
    left: 25px;
    font-size: 30px;
    cursor: pointer;
    color: white;
}
.back-btn:hover {
    color: #8a59ff;
}
#bettingNote {
    margin-top: 12px;
    /* color: #ddd; */
    font-size: 14px;
    color: burlywood; 
    opacity: 50%;
}

/* ==========popup interface in lets play ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  width: 400px;
  max-height: 500px;
  overflow-y: auto;
  background: #111;
  color: white;
  border-radius: 15px;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  cursor: pointer;
  font-size: 25px;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1d1d1d;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.player-card:hover {
  background: #2b2b2b;
}

.player-name {
  font-size: 16px;
  font-weight: bold;
  color: #ffcf79;
}

.player-status {
  font-size: 14px;
  color: limegreen;
  margin-left: auto;
}

/* Style for the 'Choose' button 
#chooseBtn {
  background: linear-gradient(145deg, #8a59ff, #4725ff);
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 12px #8a59ff;
  transition: transform 0.2s, box-shadow 0.2s;
}

#chooseBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 18px #a17aff;
}*/