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

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: 
        radial-gradient(circle at 20% 80%, #120458 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #421472 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, #8B008B 0%, transparent 50%),
        linear-gradient(135deg, #0a0a23 0%, #1a1a3a 50%, #2d1b69 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
    pointer-events: none;
    opacity: 0.1;
}

@keyframes sparkle {
    from { transform: translateY(0); }
    to { transform: translateY(-100px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
    position: relative;
    z-index: 2;
}

header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff, #06ffa5);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite alternate;
    text-shadow: 0 0 30px rgba(255, 0, 110, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

header p {
    font-size: 1.4rem;
    font-weight: 300;
    opacity: 0.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

/* Main soundboard area */
.soundboard {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
    perspective: 1000px;
}

/* Sound button styles */
.sound-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    transform-style: preserve-3d;
}

/* Glowing border effect */
.sound-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff, #06ffa5);
    background-size: 400% 400%;
    animation: borderGlow 3s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.sound-btn:hover::before {
    opacity: 1;
}

.sound-btn:hover {
    transform: translateY(-8px) rotateX(5deg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(255, 0, 110, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
}

.sound-btn:active {
    transform: translateY(-4px) rotateX(2deg);
    transition: all 0.1s ease;
}

.sound-btn.playing {
    background: linear-gradient(145deg, rgba(6, 255, 165, 0.3), rgba(6, 255, 165, 0.1));
    border-color: #06ffa5;
    box-shadow: 
        0 0 50px rgba(6, 255, 165, 0.6),
        0 0 100px rgba(6, 255, 165, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        box-shadow: 
            0 0 30px rgba(6, 255, 165, 0.6),
            0 0 60px rgba(6, 255, 165, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    to {
        box-shadow: 
            0 0 50px rgba(6, 255, 165, 0.8),
            0 0 100px rgba(6, 255, 165, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.sound-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: block;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Particle effect for buttons */
.sound-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
    opacity: 0;
}

.sound-btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0.3;
    transition: all 0.1s ease;
}



/* Enhanced responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .sound-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.5rem;
    }
    
    .sound-btn {
        padding: 2rem 1rem;
    }
    
    .sound-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .sound-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    .sound-btn {
        padding: 1.5rem 0.75rem;
    }
    
    .sound-title {
        font-size: 1rem;
        letter-spacing: 1px;
    }
}

/* Cool scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff006e, #8338ec);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #8338ec, #3a86ff);
}

/* Selection styling */
::selection {
    background: rgba(255, 0, 110, 0.3);
    color: white;
}