/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Orbitron:wght@400;700;900&display=swap');

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

body {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a0033 50%, #330066 100%);
    color: #e6e6fa;
    font-family: 'Orbitron', monospace;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Main Container */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    gap: 30px;
    position: relative;
}

/* Sound Instruction */
main > p {
    font-size: 1.2rem;
    font-weight: 400;
    text-shadow: 0 0 10px #00ffff;
    animation: glow 2s ease-in-out infinite alternate;
    margin-bottom: 10px;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #00ffff; }
    to { text-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff; }
}

/* Play Button */
#play-btn {
    width: 280px;
    height: 140px;
    font-size: 4rem;
    font-family: 'Creepster', cursive;
    font-weight: 700;
    color: #ff0040;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 3px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 10px 30px rgba(255, 0, 64, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#play-btn:hover::before {
    left: 100%;
}

#play-btn:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(255, 0, 64, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: #ff0040;
}

#play-btn:active {
    transform: translateY(-2px);
}

/* Canvas */
#canvas {
    border: 3px solid #00ffff;
    border-radius: 15px;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    background: #000;
}

/* Controls Container */
#controls-container {
    display: flex;
    flex-direction: column;
    width: 18%;
    min-width: 220px;
    background: linear-gradient(145deg, #2a2a4a, #1a1a2e);
    border: 2px solid #00ffff;
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 20px;
    margin-top: 0;
    backdrop-filter: blur(10px);
}

#controls-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
}

/* Controls Title */
#controls-title {
    align-self: center;
    margin: 0 0 20px 0;
    font-family: 'Creepster', cursive;
    font-size: 1.8rem;
    color: #ff0040;
    text-shadow: 
        0 0 10px #ff0040,
        2px 2px 0 #000;
    letter-spacing: 2px;
}

/* Controls List */
#controls-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#controls-list > li {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #e6e6fa;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#controls-list > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, #ff0040, #00ffff);
}

#controls-list > li:hover {
    background: rgba(255, 0, 64, 0.1);
    border-color: #ff0040;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 0, 64, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 10px;
        gap: 20px;
    }
    
    #play-btn {
        width: 240px;
        height: 120px;
        font-size: 3rem;
    }
    
    #controls-container {
        width: 90%;
        min-width: auto;
    }
    
    main > p {
        font-size: 1rem;
    }
}

/* Pulse Animation for Active State */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 64, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(255, 0, 64, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 64, 0); }
}

#play-btn.pulse {
    animation: pulse 2s infinite;
}