* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#game-canvas {
    display: block;
    background: #1a1a1a;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    pointer-events: none;
    z-index: 10;
}

.hud-item {
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    pointer-events: auto;
}

.label {
    color: #888;
    margin-right: 5px;
}

#speed {
    color: #0f0;
    font-size: 24px;
}

#sonic-boom {
    color: #ff0;
    font-size: 20px;
    animation: pulse 0.5s infinite;
    margin-left: 10px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

#upgrade-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.upgrade-panel {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 10px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.upgrade-panel h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #2196F3;
}

.upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.upgrade-item {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.upgrade-item:hover {
    transform: translateX(5px);
}

.upgrade-item.special {
    border: 2px solid #ff9800;
}

.upgrade-info h3 {
    margin-bottom: 5px;
    color: #fff;
}

.upgrade-info p {
    color: #888;
    font-size: 14px;
    margin: 5px 0;
}

.upgrade-level {
    color: #2196F3;
    font-weight: bold;
}

.warning {
    color: #ff5722 !important;
    font-weight: bold;
}

.upgrade-item .buy-btn {
    min-width: 100px;
}

.upgrade-item .buy-btn:disabled {
    background: #555;
    cursor: not-allowed;
}

#close-upgrade {
    width: 100%;
    padding: 15px;
}

/* --- Admin Panel Styling --- */
#admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101; /* Higher than upgrade menu */
}

.admin-panel-content {
    background: #440000; /* Distinct color for admin mode */
    border: 3px solid #ff0000;
    padding: 40px;
    border-radius: 10px;
    max-width: 400px;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
}

.admin-panel-content h2 {
    color: #ff9800;
    margin-bottom: 20px;
}

#admin-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-size: 16px;
    flex-grow: 1;
}

.control-group input[type="number"] {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #666;
    background: #2a2a2a;
    color: white;
    width: 80px;
    text-align: right;
}

.control-group button {
    background: #ff5722;
    padding: 8px 15px;
}

.control-group button:hover {
    background: #e64a19;
}

.cable-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    background: #000;
    padding: 10px;
    border: 3px solid #333;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.tv-screen {
    width: 200px;
    height: 150px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.tv-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
}

#bb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}