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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    background: rgba(15, 15, 30, 0.8);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    width: 100%;
}

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

.header h1 {
    color: #4a9eff;
    font-size: 2em;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.info {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.evidence-counter,
.stage-info,
.timer-info,
.score-info {
    background: rgba(74, 158, 255, 0.1);
    padding: 8px 16px;
    border-radius: 5px;
    border: 1px solid #4a9eff;
    font-size: 1em;
    white-space: nowrap;
}

.timer-info {
    border-color: #ffeb3b;
    color: #ffeb3b;
}

.score-info {
    border-color: #4caf50;
    color: #4caf50;
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: #0f0f1e;
    border: 2px solid #4a9eff;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
}

.controls {
    margin-top: 20px;
    text-align: center;
}

.gravity-indicator {
    display: inline-block;
    background: rgba(74, 158, 255, 0.1);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #4a9eff;
    margin-bottom: 15px;
}

.gravity-indicator .label {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #4a9eff;
}

.arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.middle-row {
    display: flex;
    gap: 5px;
}

.arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #666;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.arrow.active {
    background: #4a9eff;
    border-color: #4a9eff;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.8);
    transform: scale(1.2);
}

.instructions {
    margin-top: 15px;
    color: #b0b0b0;
}

.instructions p {
    margin: 5px 0;
}

.buttons {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    background: #4a9eff;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

button:hover {
    background: #3a8eef;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.5);
}

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

.clear-message {
    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: 1000;
}

.message-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 10px;
    border: 2px solid #4a9eff;
    box-shadow: 0 0 30px rgba(74, 158, 255, 0.5);
    text-align: center;
    animation: slideIn 0.5s ease;
}

.message-content h2 {
    color: #4a9eff;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.message-content p {
    font-size: 1.2em;
    color: #e0e0e0;
    margin: 10px 0;
}

#best-time-message {
    color: #ffeb3b;
    font-weight: bold;
    font-size: 1.3em;
    margin-top: 15px;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5em;
    }

    .info {
        flex-direction: column;
        gap: 10px;
    }

    #gameCanvas {
        width: 100% !important;
        height: auto !important;
    }
}
