/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(90deg, #ff0080, #00ffcc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.game-area {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.game-controls {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.game-display {
    flex: 2;
    min-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Control Sections */
.control-section {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.control-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #00ffcc;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Upload Area */
.upload-area {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.upload-area:hover {
    border-color: #00ffcc;
    background: rgba(0, 255, 204, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: #ff0080;
    margin-bottom: 15px;
}

.upload-area p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.file-info {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* Song Info */
.song-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.song-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #ff0080;
}

#songName {
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.audio-player {
    margin: 15px 0;
}

.audio-player audio {
    width: 100%;
    border-radius: 5px;
}

/* Settings */
.settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.setting-item label {
    font-weight: 500;
    min-width: 120px;
}

.setting-item select, .setting-item input[type="range"] {
    flex: 1;
    max-width: 200px;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-family: 'Exo 2', sans-serif;
}

.setting-item input[type="range"] {
    padding: 0;
}

.setting-item span {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(90deg, #ff0080, #ff4da6);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 128, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #ff4da6, #ff0080);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 128, 0.4);
}

.btn-secondary {
    background: linear-gradient(90deg, #00b3ff, #00ffcc);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(90deg, #00ffcc, #00b3ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 204, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Game Canvas */
.game-canvas-container {
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 600px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #16213e 70%, #0f3460 100%);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay-content {
    text-align: center;
    padding: 40px;
    max-width: 600px;
}

.overlay-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #ff0080, #00ffcc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.overlay-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.instructions {
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.instructions h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #00ffcc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.instructions li:before {
    content: "•";
    color: #ff0080;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -3px;
}

.key {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    margin-right: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    color: #00ffcc;
}

/* Chart Info */
.chart-info {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.chart-info h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #ff0080;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #00ffcc;
}

.info-item span:first-child {
    font-weight: 500;
}

.info-item span:last-child {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    color: #00ffcc;
}

/* Note Preview */
.note-preview h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #00ffcc;
}

.note-examples {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.note-example {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.note-visual {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tap-note .note-visual {
    background: linear-gradient(135deg, #ff0080, #ff4da6);
    border: 3px solid white;
}

.hold-note .note-visual {
    background: linear-gradient(135deg, #00b3ff, #00ffcc);
    border: 3px solid white;
}

.slide-note .note-visual {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    border: 3px solid white;
}

.note-example span {
    font-weight: 500;
}

/* Loading Spinner */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00ffcc;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    margin-bottom: 10px;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-area {
        flex-direction: column;
    }
    
    .game-controls, .game-display {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .game-stats {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 10px);
    }
    
    .info-content {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .note-examples {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .control-section, .chart-info {
        padding: 15px;
    }
    
    .stat-item {
        flex: 0 0 100%;
    }
}
