:root {
    --bg-deep: #0B1026;
    --bg-star: #1B2735;
    --color-neon-blue: #00F0FF;
    --color-neon-pink: #E91E63;
    --color-neon-green: #00E676;
    --color-fuel-dock: rgba(255, 255, 255, 0.1);
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: radial-gradient(ellipse at bottom, var(--bg-star) 0%, var(--bg-deep) 100%);
    font-family: 'Orbitron', 'M PLUS Rounded 1c', sans-serif;
    color: white;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#star-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.2);
}

main {
    flex: 1;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
}

/* Rocket Area */
#rocket-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.target-display {
    margin-bottom: 20px;
    text-align: center;
}

.target-display .label {
    display: block;
    font-size: 1rem;
    color: #81D4FA;
    margin-bottom: 5px;
}

#target-number {
    font-size: 3rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--color-neon-green);
    text-shadow: 0 0 10px var(--color-neon-green);
}

#rocket-wrapper {
    position: relative;
    width: 200px;
    height: 400px;
    transition: transform 0.1s; /* For shake */
}

#current-fuel-display {
    position: absolute;
    top: 200px; /* Aligned with fuel tank center approx */
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

#current-fuel-display.hidden {
    display: none;
}

.hidden {
    display: none;
}

/* Fuel Dock (Bottom) */
#fuel-dock {
    width: 100%;
    background: var(--color-fuel-dock);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 150px;
}

.dock-title {
    font-size: 1rem;
    color: #B0BEC5;
    margin-bottom: 15px;
}

#blocks-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Energy Blocks */
.energy-block {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-family: 'Orbitron', sans-serif;
    color: #0B1026;
    font-weight: bold;
    cursor: grab;
    box-shadow: 0 0 15px currentColor;
    transition: transform 0.2s, box-shadow 0.2s;
    touch-action: none;
    background: white; /* Fallback */
}

.energy-block[data-value="1"] { background: #FFEB3B; color: #F57F17; box-shadow: 0 0 10px #FFEB3B; }
.energy-block[data-value="2"] { background: #00E676; color: #1B5E20; box-shadow: 0 0 10px #00E676; }
.energy-block[data-value="3"] { background: #00F0FF; color: #01579B; box-shadow: 0 0 10px #00F0FF; }
.energy-block[data-value="4"] { background: #E040FB; color: #4A148C; box-shadow: 0 0 10px #E040FB; }

.energy-block:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.dragging-clone {
    position: fixed;
    z-index: 999;
    pointer-events: none;
    opacity: 0.9;
    transform: scale(1.1);
}

/* Animations */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-5deg); }
    50% { transform: translateX(10px) rotate(5deg); }
    75% { transform: translateX(-10px) rotate(-5deg); }
    100% { transform: translateX(0); }
}

.shake-animation {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

#rocket-wrapper.launching {
    transition: transform 2s cubic-bezier(0.45, 0, 0.55, 1);
    transform: translateY(-150vh);
}

/* Message Overlay */
#message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 200;
}

#message-text {
    font-size: 3rem;
    color: var(--color-neon-green);
    text-shadow: 0 0 20px var(--color-neon-green);
    transform: scale(0.5);
    transition: transform 0.5s;
}

#message-overlay.show {
    opacity: 1;
}

#message-overlay.show #message-text {
    transform: scale(1);
}
