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

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.8s ease-out;
}

.title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: #fff;
    text-shadow: 3px 3px 0px #ff6b6b, 6px 6px 0px #4ecdc4;
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

.subtitle {
    font-size: 1.2rem;
    color: #fff;
    opacity: 0.9;
    font-weight: 400;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.generator-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: slideUp 0.8s ease-out 0.2s both;
}

.input-container {
    margin-bottom: 20px;
}

.label {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.prompt-input {
    width: 100%;
    padding: 15px;
    border: 3px solid #ddd;
    border-radius: 15px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: #fff;
}

.prompt-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.generate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.generate-btn:active {
    transform: translateY(-1px);
}

.generate-btn.loading {
    pointer-events: none;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
}

.track-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: slideUp 0.8s ease-out;
}

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

.track-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px #ff6b6b;
}

.track-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.difficulty, .length {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.track-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.track-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.track-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.track-image:hover {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    text-align: center;
}

.overlay-text {
    font-weight: 700;
    font-size: 1.1rem;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.track-bio h3, .track-features h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 5px;
}

.track-bio p {
    line-height: 1.6;
    color: #666;
}

.track-features-list {
    list-style: none;
}

.track-features-list li {
    background: #f8f9fa;
    margin: 8px 0;
    padding: 10px 15px;
    border-radius: 10px;
    border-left: 4px solid #4ecdc4;
    transition: transform 0.2s ease;
}

.track-features-list li:hover {
    transform: translateX(5px);
}

.track-map-section {
    margin-top: 30px;
    text-align: center;
}

.track-map-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.map-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.track-map {
    border: 3px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background: #f0f8f0;
}

.track-map-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #333;
}

.legend-color.start { background: #ff6b6b; }
.legend-color.track { background: #666; }
.legend-color.boost { background: #4ecdc4; }
.legend-color.obstacle { background: #ffa726; }

.secondary-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 3px solid #667eea;
    border-radius: 15px;
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.secondary-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.hidden {
    display: none;
}

/* Music Control Styles */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.music-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #667eea;
    border-radius: 25px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.music-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.music-btn.playing {
    background: #4ecdc4;
    border-color: #4ecdc4;
    color: white;
}

.music-btn.playing:hover {
    background: #45b7aa;
    border-color: #45b7aa;
}

.music-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.music-text {
    white-space: nowrap;
}

/* Responsive adjustments for music control */
@media (max-width: 768px) {
    .music-control {
        top: 10px;
        right: 10px;
    }
    
    .music-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .music-text {
        display: none;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        text-shadow: 3px 3px 0px #ff6b6b, 6px 6px 0px #4ecdc4, 9px 9px 20px rgba(255, 107, 107, 0.3);
    }
    to {
        text-shadow: 3px 3px 0px #ff6b6b, 6px 6px 0px #4ecdc4, 9px 9px 30px rgba(255, 107, 107, 0.6);
    }
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .track-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .track-name {
        font-size: 1.5rem;
    }
    
    .track-stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .map-legend {
        gap: 15px;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
}