:root {
    --excel-green: #217346;
    --excel-header-bg: #f3f3f3;
    --excel-border: #d4d4d4;
    --excel-select-bg: #e6f2ea;
    --game-bg: #2c3e50;
    --snake-color: #2ecc71;
    --food-color: #e74c3c;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
    background-color: var(--game-bg);
}

/* ================= GAME STYLES ================= */
#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
}

.game-header {
    margin-bottom: 20px;
    text-align: center;
}

.score-board {
    font-size: 1.5rem;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
}

#game-canvas {
    background-color: rgba(0, 0, 0, 0.8);
    border: 4px solid #34495e;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.controls-hint {
    margin-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

.key {
    background: #34495e;
    padding: 2px 6px;
    border-radius: 4px;
    border-bottom: 2px solid #2c3e50;
    font-weight: bold;
    font-family: monospace;
}

.key.red {
    background: #c0392b;
    border-bottom-color: #96281b;
}

.boss-key-hint {
    margin-top: 15px;
    color: #f1c40f;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

#game-over-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--snake-color);
    z-index: 100;
}

#game-over-overlay h2 {
    color: #e74c3c;
    margin-top: 0;
}

#restart-btn {
    background: var(--snake-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

#restart-btn:hover {
    background: #27ae60;
}

/* ================= BOSS MODE (FAKE EXCEL) STYLES ================= */
#work-container {
    background: white;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    color: #333;
}

.excel-toolbar {
    background: var(--excel-green);
    color: white;
    display: flex;
    padding: 0;
    height: 40px; /* Reduced for simplicity */
    align-items: flex-end;
}

.toolbar-item {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
}

.toolbar-item.active {
    background: white;
    color: var(--excel-green);
    border-radius: 4px 4px 0 0;
    margin-left: 10px;
}

.excel-formula-bar {
    display: flex;
    align-items: center;
    padding: 5px;
    border-bottom: 1px solid var(--excel-border);
    background: #fcfcfc;
}

.fx {
    font-style: italic;
    color: #999;
    padding: 0 10px;
    font-weight: bold;
    font-family: serif;
}

.excel-formula-bar input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 4px;
    margin-left: 10px;
    font-family: 'Consolas', monospace;
}

.excel-sheet {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}

.excel-sheet th, .excel-sheet td {
    border: 1px solid var(--excel-border);
    padding: 4px 8px;
    text-align: left;
    height: 25px;
}

.excel-sheet th {
    background: var(--excel-header-bg);
    text-align: center;
    font-weight: normal;
    color: #666;
}

.excel-sheet .row-header {
    background: var(--excel-header-bg);
    text-align: center;
    width: 40px;
    color: #666;
}

.header-cell {
    font-weight: bold;
    background: #fafafa;
}

.excel-status-bar {
    margin-top: auto;
    background: #f3f3f3;
    border-top: 1px solid #ddd;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: #666;
}

/* Utility */
.hidden {
    display: none !important;
}
