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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #87CEEB;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    pointer-events: none;
}

#top-bar {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.ui-element {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
}

.label {
    color: #FFD700;
}

.mute-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 20px;
}

.mute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.mute-btn.muted {
    opacity: 0.5;
}

.shop-btn {
    background: rgba(243, 156, 18, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 10px;
}

.shop-btn:hover {
    background: rgba(243, 156, 18, 1);
    transform: scale(1.1);
}

#info-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 8px;
    pointer-events: none;
}

#info-panel h3 {
    margin-bottom: 10px;
    color: #FFD700;
}

#info-panel p {
    margin: 5px 0;
    font-size: 14px;
}

/* Energie-Anzeige */
#energy-bar-container {
    position: fixed;
    top: 80px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    width: 250px;
    pointer-events: none;
}

.energy-label {
    display: flex;
    justify-content: space-between;
    color: white;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

#energy-bar-outer {
    width: 100%;
    height: 25px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#energy-bar-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
    transition: width 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

#energy-bar-inner.low {
    background: linear-gradient(90deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

#energy-bar-inner.critical {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    animation: blink 0.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#charging-status {
    margin-top: 8px;
    color: #3498db;
    font-weight: bold;
    text-align: center;
    font-size: 14px;
    animation: pulse-charging 1s infinite;
}

@keyframes pulse-charging {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

#warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    animation: pulse 0.5s;
}

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

.hidden {
    display: none !important;
}

#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.start-panel {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
}

.start-panel h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.start-panel p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #666;
}

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

button {
    padding: 15px 30px;
    font-size: 18px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s;
    pointer-events: all;
}

button:hover {
    background: #2980b9;
    transform: scale(1.05);
}

#start-btn {
    background: #27ae60;
}

#start-btn:hover {
    background: #229954;
}

#open-shop-btn {
    background: #f39c12;
}

#open-shop-btn:hover {
    background: #e67e22;
}

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

#shop-panel {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

#shop-panel h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    padding: 10px 15px;
    font-size: 20px;
}

.close-btn:hover {
    background: #c0392b;
}

#car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.car-card {
    border: 3px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.car-card:hover {
    border-color: #3498db;
    transform: translateY(-5px);
}

.car-card.owned {
    border-color: #27ae60;
    background: #d5f4e6;
}

.car-card.active {
    border-color: #f39c12;
    background: #fef5e7;
}

.car-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.car-stats {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.car-price {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    margin: 10px 0;
}

.car-card button {
    margin-top: 10px;
}

.car-card button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.car-card button:disabled:hover {
    transform: none;
}

canvas {
    display: block;
}

