:root {
    --color-0: #ffadad; --color-1: #ffd6a5; --color-2: #fdffb6;
    --color-3: #caffbf; --color-4: #9bf6ff; --color-5: #a0c4ff;
    --color-6: #bdb2ff; --color-7: #ffc6ff;
    --bg: #ffffff; --border: #1a1a1b;
    --error: #ff4d4d;
}

.controls { margin-bottom: 20px; background: var(--surface-color, #161B22); color: var(--text-primary, #F8FAFC); padding: 15px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
/* input[type="date"] { padding: 8px; border-radius: 4px; border: 1px solid #ccc; font-size: 16px; } */

/* #grid { 
    display: grid; 
    grid-template-columns: repeat(6, 75px); 
    grid-template-rows: repeat(6, 75px); 
    border: 3px solid var(--border); 
    background: var(--border); 
    gap: 1px;
    width: fit-content;
    margin: 0 auto;
    box-sizing: border-box;
} */

/* Conflict Styles */
.conflict { border: 2px solid var(--error) !important; animation: shake 0.2s; background-blend-mode: multiply; }

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

/* Area Colors */
/* 8-Color High-Contrast Palette for Yin Yang */
.area-0 { background-color: #e41a1c; } /* Red */
.area-1 { background-color: #377eb8; } /* Blue */
.area-2 { background-color: #4daf4a; } /* Green */
.area-3 { background-color: #984ea3; } /* Purple */
.area-4 { background-color: #ff7f00; } /* Orange */
.area-5 { background-color: #ffff33; } /* Yellow */
.area-6 { background-color: #a65628; } /* Brown */
.area-7 { background-color: #f781bf; } /* Pink */


.cell {
    width: 75px; 
    height: 75px; 
    /* Remove individual cell borders as 'gap' handles it now */
    border: none; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.cell:hover {
    opacity: 1;
    filter: brightness(1.1);
}

/* Yin and Yang Icons */
.yin::after {
    content: "●";
    color: #000;
    font-size: 34px;
    text-shadow: 0 0 2px white; /* Help it stand out on dark areas */
}

.yang::after {
    content: "○";
    color: #fff;
    font-size: 34px;
    font-weight: 900;
    text-shadow: 0 0 3px black; /* Outline for visibility on light areas */
}

/* Conflict Alert */
.conflict {
    animation: flash-red 0.5s infinite alternate;
    z-index: 10;
}

@keyframes flash-red {
    from { box-shadow: inset 0 0 0 4px #ff0000; }
    to { box-shadow: inset 0 0 0 8px #990000; }
}

.star::after { 
    content: "⚑"; /* Unicode Black Flag */
    color: #1a1a1b; /* Solid black/dark grey */
    font-size: 24px;
    /* font-weight: bold; */
    display: block;
}
.mark::after { content: "•"; color: rgba(0,0,0,0.4); font-weight: bold; }

.message { margin-top: 20px; font-weight: bold; font-size: 1.2rem; color: #2e7d32; height: 30px; }

.hintBtn {
    background-color: #ffae00;
    color: #000;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}
.hintBtn:hover {
    background-color: #000;
    color: #ffae00;
}

.timer-container {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Courier New', Courier, monospace; /* Monospace keeps numbers from jumping */
    color: var(--text-primary, #F8FAFC);
    /* display: flex; */
    align-items: center;
    gap: 8px;
}
/* Update your style.css for the Conflict Zone theme */
.conflict {
    box-shadow: inset 0 0 0 4px #ff4d4d !important;
    animation: pulse-red 1.5s infinite, shake 0.2s;
    background-color: #ffe6e6 !important; /* Light red tint */
}

@keyframes pulse-red {
    0% { box-shadow: inset 0 0 0 4px #ff4d4d; }
    50% { box-shadow: inset 0 0 0 8px #b31000; }
    100% { box-shadow: inset 0 0 0 4px #ff4d4d; }
}


@media (max-width: 480px) {
    /* #grid {
        grid-template-columns: repeat(6, 50px);
        grid-template-rows: repeat(6, 50px);
    } */
    /* .cell {
        width: 50px;
        height: 50px;
    } */
    .timer-container {
        font-size: 1.2rem;
    }
    .levels {
        display: grid;
        margin-bottom: 10px;
    }
    .ui-panel {
        display: block !important;
    }
}



/* Yin (Black Force) */
.yin::after {
    content: "●";
    color: #1a1a1b;
    font-size: 32px;
}

/* Yang (White Force) */
.yang::after {
    content: "○";
    color: #1a1a1b;
    font-size: 32px;
    font-weight: bold;
}

/* Tactical Mark */
.mark::after {
    content: "•";
    color: rgba(0,0,0,0.25);
    font-size: 24px;
}

/* Conflict Alert */
.conflict {
    background-color: #ffcccc !important;
    box-shadow: inset 0 0 0 3px #d32f2f;
}
















:root {
--red: #ff4d4d; --blue: #00a8ff; --green: #44bd32; --yellow: #fbc531; 
--orange: #e67e22; --purple: #9c88ff; --pink: #f8a5c2;
}
canvas { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 5; }
.ui-panel {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 20px;
    z-index: 10;
    position: relative;
    display: flex;
    justify-content: center;
    gap: 50px;
}
#status { font-weight: bold; margin: 10px 0; color: #2f3640; }

.game-container {
    display: flex; gap: 15px; justify-content: center;
    padding: 20px; flex-wrap: wrap; max-width: 950px; z-index: 10;
}

.tube {
    width: 60px; height: 190px;
    border: 3px solid #718093; border-top: none;
    border-bottom-left-radius: 30px; border-bottom-right-radius: 30px;
    background-color: #ffffff;
    display: flex; flex-direction: column-reverse;
    align-items: center; padding-bottom: 10px;
    transition: background-color 0.2s;
}
/* Highlight when dragging over */
.tube.hovered { background-color: #d1ccc0; border-color: #2f3640; }

.ball {
    width: 46px; height: 46px; border-radius: 50%;
    margin: 2px 0; box-shadow: inset -3px -3px 6px rgba(0,0,0,0.2);
}

#drag-icon {
    position: fixed; width: 46px; height: 46px;
    border-radius: 50%; pointer-events: none;
    display: none; z-index: 1000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.red { background-color: var(--red); } .blue { background-color: var(--blue); }
.green { background-color: var(--green); } .yellow { background-color: var(--yellow); }
.orange { background-color: var(--orange); } .purple { background-color: var(--purple); }
.pink { background-color: var(--pink); }

.config-row { display: flex; gap: 10px; margin-bottom: 10px; font-size: 0.9rem; }

.select_level {
    padding: 10px;
    min-width: 200px;
    border: 3px solid #ffae00;
    border-radius: 15px;
    cursor: pointer;
}