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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #1a1a2e;
    color: #eee;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#calibration-screen {
    text-align: center;
    padding: 20px;
    transform: rotate(90deg);
}

#calibration-screen h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #e94560;
}

#calibration-screen p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 300px;
}

#calibrate-btn {
    padding: 15px 50px;
    font-size: 1.3rem;
    background-color: #e94560;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    touch-action: manipulation;
}

#calibrate-btn:hover {
    background-color: #ff6b6b;
}

#calibrate-btn:active {
    transform: scale(0.95);
}

.error {
    color: #ff6b6b;
    margin-top: 20px;
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

#game-screen {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#maze-canvas {
    background-color: #16213e;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(233, 69, 96, 0.3);
    touch-action: none;
}

#win-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background-color: rgba(26, 26, 46, 0.95);
    padding: 30px 50px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #e94560;
    animation: pulse 0.5s ease-in-out;
}

#win-message h2 {
    color: #e94560;
    font-size: 2rem;
    margin-bottom: 10px;
}

#win-message p {
    font-size: 1rem;
    color: #aaa;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) rotate(90deg) scale(0.8); opacity: 0; }
    50% { transform: translate(-50%, -50%) rotate(90deg) scale(1.05); }
    100% { transform: translate(-50%, -50%) rotate(90deg) scale(1); opacity: 1; }
}
