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

body {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid #4a5568;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.title-section h1 {
    font-size: 2.5em;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.level-info {
    display: flex;
    gap: 20px;
    font-size: 1.2em;
}

.level-info span {
    color: #a0aec0;
}

.header-controls {
    display: flex;
    gap: 10px;
}

.main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.canvas-wrapper {
    flex: 1;
    background: rgba(20, 20, 40, 0.6);
    border: 2px solid #4a5568;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 5px;
    cursor: crosshair;
}

.side-panel {
    width: 280px;
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid #4a5568;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-section {
    background: rgba(30, 30, 50, 0.5);
    border: 1px solid #2d3748;
    border-radius: 8px;
    padding: 15px;
}

.panel-section h3 {
    color: #00ffff;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.panel-section p {
    color: #a0aec0;
    font-size: 0.9em;
    margin: 5px 0;
}

.rotation-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rotate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    transition: all 0.3s ease;
}

.rotate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.rotate-btn:active {
    transform: translateY(0);
}

#angleDisplay {
    background: #1a202c;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 1.5em;
    color: #00ffff;
    border: 2px solid #4a5568;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn.small {
    padding: 8px 15px;
    font-size: 0.9em;
}

.action-btn {
    width: 100%;
    margin-top: 5px;
}

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

.stat-item {
    display: flex;
    justify-content: space-between;
    color: #a0aec0;
    font-size: 1.1em;
}

.stat-item span:last-child {
    color: #00ffff;
    font-weight: bold;
}

.modal {
    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;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3e 0%, #2d2d5f 100%);
    border: 3px solid #00ffff;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    max-width: 500px;
    animation: modalAppear 0.5s ease;
}

@keyframes modalAppear {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #00ffff;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.stars {
    font-size: 3em;
    margin: 20px 0;
}

.stats-display {
    margin: 20px 0;
    font-size: 1.2em;
}

.stats-display p {
    margin: 10px 0;
    color: #a0aec0;
}

.stats-display span {
    color: #00ffff;
    font-weight: bold;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

footer {
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid #4a5568;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.level-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    transition: all 0.3s ease;
}

.level-btn:hover:not(:disabled) {
    transform: scale(1.1);
    border-color: #00ffff;
}

.level-btn.active {
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.level-btn.locked {
    background: #2d3748;
    cursor: not-allowed;
    opacity: 0.5;
}

.footer-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-links a {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }

    .side-panel {
        width: 100%;
    }

    .rotation-controls {
        flex-direction: row;
        align-items: center;
    }

    #angleDisplay {
        flex: 0 0 100px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .title-section h1 {
        font-size: 1.8em;
    }

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

    footer {
        flex-direction: column;
        gap: 15px;
    }

    .level-selector {
        justify-content: center;
    }
}