/* Soundboard Styles - Enhanced with Glassmorphism & Modern UI */

/* CSS Variables */
:root {
    --sb-primary: #d4af37;
    --sb-primary-hover: #e6c349;
    --sb-success: #4ade80;
    --sb-error: #ef4444;
    --sb-info: #3b82f6;
    --sb-purple: #a855f7;
    --sb-pink: #ec4899;
    --sb-cyan: #22d3ee;
    --sb-glass-bg: rgba(20, 20, 30, 0.7);
    --sb-glass-border: rgba(212, 175, 55, 0.2);
    --sb-glass-strong: rgba(30, 30, 45, 0.85);
}

/* Floating Particles Background */
.soundboard-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.soundboard-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--sb-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 20s infinite ease-in-out;
}

.soundboard-particles .particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.soundboard-particles .particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 20s; }
.soundboard-particles .particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 28s; }
.soundboard-particles .particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 22s; }
.soundboard-particles .particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 24s; }
.soundboard-particles .particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 26s; }
.soundboard-particles .particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 21s; }
.soundboard-particles .particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 23s; }

@keyframes float-particle {
    0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.4; }
    50% { opacity: 0.2; transform: translateY(50vh) scale(1); }
    90% { opacity: 0.4; }
    100% { transform: translateY(-10vh) scale(0); opacity: 0; }
}

/* Hero Section Enhancement */
.soundboard-hero {
    text-align: center;
    padding: 100px 20px 30px;
    position: relative;
    z-index: 1;
}

.soundboard-hero .hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 30px;
    color: var(--sb-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    animation: badge-glow 3s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.1); }
    50% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.3); }
}

.soundboard-hero h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--sb-primary) 0%, #fff 50%, #ff6b35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.soundboard-hero p {
    color: #9ca3af;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stats Bar */
.soundboard-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--sb-glass-bg);
    border: 1px solid var(--sb-glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--sb-primary);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--sb-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Control Panel */
.soundboard-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--sb-glass-bg);
    border: 1px solid var(--sb-glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e8e8e8;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.control-btn.stop-btn {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.control-btn.stop-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.3);
}

.control-btn.random-btn {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
    color: #a855f7;
}

.control-btn.random-btn:hover {
    background: rgba(168, 85, 247, 0.3);
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.3);
}

.control-btn.loop-btn {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.control-btn.loop-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.3);
}

.control-btn.loop-btn.active {
    background: rgba(59, 130, 246, 0.4);
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.control-btn svg {
    width: 18px;
    height: 18px;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.volume-icon {
    font-size: 1.2rem;
    color: var(--sb-primary);
}

.volume-slider {
    -webkit-appearance: none;
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--sb-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--sb-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.volume-value {
    font-size: 0.85rem;
    color: #9ca3af;
    min-width: 35px;
    text-align: center;
}

/* Search and Filters */
.soundboard-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.search-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    stroke: #9ca3af;
    transition: stroke 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    background: var(--sb-glass-bg);
    border: 1px solid var(--sb-glass-border);
    border-radius: 12px;
    color: #e8e8e8;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--sb-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.search-input:focus + .search-icon,
.search-container:focus-within .search-icon {
    stroke: var(--sb-primary);
}

.search-input::placeholder {
    color: #6b7280;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--sb-glass-bg);
    border: 1px solid var(--sb-glass-border);
    border-radius: 25px;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    border-color: var(--sb-primary);
    color: var(--sb-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    border-color: var(--sb-primary);
    color: var(--sb-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.filter-btn .count-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #9ca3af;
}

.filter-btn.active .count-badge {
    background: rgba(212, 175, 55, 0.3);
    color: var(--sb-primary);
}

.filter-btn svg {
    width: 16px;
    height: 16px;
}

.favorite-filter {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.favorite-filter:hover,
.favorite-filter.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

/* Recently Played Section */
.recently-played {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--sb-glass-bg);
    border: 1px solid var(--sb-glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.recently-played-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #e8e8e8;
    font-weight: 600;
}

.recently-played-header svg {
    width: 20px;
    height: 20px;
    color: var(--sb-purple);
}

.recently-played-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--sb-primary) transparent;
}

.recently-played-list::-webkit-scrollbar {
    height: 6px;
}

.recently-played-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.recently-played-list::-webkit-scrollbar-thumb {
    background: var(--sb-primary);
    border-radius: 3px;
}

.recent-sound {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recent-sound:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--sb-primary);
    transform: translateY(-2px);
}

.recent-sound .sound-emoji {
    font-size: 1.3rem;
}

.recent-sound .sound-name {
    color: #e8e8e8;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.recently-played-empty {
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
}

/* Sound Grid */
.soundboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* Sound Button - Enhanced */
.sound-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px 20px;
    background: linear-gradient(145deg, var(--sb-glass-strong), var(--sb-glass-bg));
    border: 1px solid var(--sb-glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 120px;
    overflow: hidden;
}

.sound-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sound-btn:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--sb-primary);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(212, 175, 55, 0.2);
}

.sound-btn:hover::before {
    opacity: 1;
}

.sound-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Playing State */
.sound-btn.playing {
    background: linear-gradient(145deg, rgba(74, 222, 128, 0.25), rgba(74, 222, 128, 0.1));
    border-color: var(--sb-success);
    box-shadow:
        0 0 30px rgba(74, 222, 128, 0.3),
        inset 0 0 30px rgba(74, 222, 128, 0.1);
}

.sound-btn.playing .sound-icon {
    animation: bounce-icon 0.6s ease infinite;
}

@keyframes bounce-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Waveform Animation */
.sound-btn.playing::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 20px;
    background:
        linear-gradient(90deg,
            transparent 0%,
            var(--sb-success) 10%,
            transparent 20%,
            var(--sb-success) 30%,
            transparent 40%,
            var(--sb-success) 50%,
            transparent 60%,
            var(--sb-success) 70%,
            transparent 80%,
            var(--sb-success) 90%,
            transparent 100%
        );
    background-size: 200% 100%;
    animation: waveform 1s linear infinite;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Crect x='0' y='5' width='8' height='10' rx='2'/%3E%3Crect x='12' y='2' width='8' height='16' rx='2'/%3E%3Crect x='24' y='7' width='8' height='6' rx='2'/%3E%3Crect x='36' y='0' width='8' height='20' rx='2'/%3E%3Crect x='48' y='4' width='8' height='12' rx='2'/%3E%3Crect x='60' y='6' width='8' height='8' rx='2'/%3E%3Crect x='72' y='2' width='8' height='16' rx='2'/%3E%3Crect x='84' y='5' width='8' height='10' rx='2'/%3E%3C/svg%3E");
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Crect x='0' y='5' width='8' height='10' rx='2'/%3E%3Crect x='12' y='2' width='8' height='16' rx='2'/%3E%3Crect x='24' y='7' width='8' height='6' rx='2'/%3E%3Crect x='36' y='0' width='8' height='20' rx='2'/%3E%3Crect x='48' y='4' width='8' height='12' rx='2'/%3E%3Crect x='60' y='6' width='8' height='8' rx='2'/%3E%3Crect x='72' y='2' width='8' height='16' rx='2'/%3E%3Crect x='84' y='5' width='8' height='10' rx='2'/%3E%3C/svg%3E");
    opacity: 0.8;
}

@keyframes waveform {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Sound Icon */
.sound-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.sound-btn:hover .sound-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.4));
}

/* Sound Name */
.sound-name {
    font-size: 0.85rem;
    color: #e8e8e8;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Favorite Icon */
.favorite-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.favorite-icon:hover {
    color: #ef4444;
    transform: scale(1.3);
}

.sound-btn.is-favorite .favorite-icon {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Play Count Badge */
.play-count {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.7rem;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    color: #9ca3af;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sound-btn:hover .play-count {
    opacity: 1;
}

/* Category Color Coding */
.sound-btn[data-category="classic"] { border-left: 3px solid var(--sb-primary); }
.sound-btn[data-category="tiktok"] { border-left: 3px solid var(--sb-pink); }
.sound-btn[data-category="gaming"] { border-left: 3px solid var(--sb-purple); }
.sound-btn[data-category="spongebob"] { border-left: 3px solid #fbbf24; }
.sound-btn[data-category="anime"] { border-left: 3px solid var(--sb-cyan); }
.sound-btn[data-category="reaction"] { border-left: 3px solid var(--sb-success); }

/* Now Playing Indicator */
.now-playing {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(74, 222, 128, 0.05));
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.now-playing.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.now-playing-icon {
    font-size: 1.5rem;
    animation: bounce-icon 0.6s ease infinite;
}

.now-playing-text {
    color: var(--sb-success);
    font-weight: 600;
}

.now-playing-name {
    color: #e8e8e8;
    font-weight: 700;
}

/* Info Section */
.soundboard-info {
    text-align: center;
    padding: 30px 20px;
    background: var(--sb-glass-bg);
    border: 1px solid var(--sb-glass-border);
    border-radius: 16px;
    margin-top: 20px;
}

.soundboard-info p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.keyboard-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    color: #9ca3af;
    font-size: 0.85rem;
}

.keyboard-hint kbd {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    color: var(--sb-primary);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #9ca3af;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .soundboard-hero {
        padding: 80px 15px 20px;
    }

    .soundboard-hero h1 {
        font-size: 1.8rem;
    }

    .soundboard-stats {
        gap: 10px;
    }

    .stat-card {
        padding: 10px 15px;
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .soundboard-controls {
        padding: 15px;
        gap: 10px;
    }

    .control-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .volume-control {
        width: 100%;
        justify-content: center;
    }

    .volume-slider {
        flex: 1;
        max-width: 150px;
    }

    .soundboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .sound-btn {
        padding: 20px 10px 15px;
        min-height: 100px;
        border-radius: 12px;
    }

    .sound-icon {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .sound-name {
        font-size: 0.75rem;
    }

    .favorite-icon {
        font-size: 0.9rem;
        top: 8px;
        right: 8px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .recently-played-list {
        gap: 8px;
    }

    .recent-sound {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .soundboard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .sound-btn {
        padding: 15px 8px 12px;
        min-height: 90px;
    }

    .sound-icon {
        font-size: 1.5rem;
    }

    .sound-name {
        font-size: 0.7rem;
    }

    .stat-card {
        flex-direction: column;
        gap: 5px;
        padding: 10px;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

/* Animations */
.sound-btn {
    animation: cardEntrance 0.4s ease forwards;
    opacity: 0;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered animation delays */
.sound-btn:nth-child(1) { animation-delay: 0.02s; }
.sound-btn:nth-child(2) { animation-delay: 0.04s; }
.sound-btn:nth-child(3) { animation-delay: 0.06s; }
.sound-btn:nth-child(4) { animation-delay: 0.08s; }
.sound-btn:nth-child(5) { animation-delay: 0.10s; }
.sound-btn:nth-child(6) { animation-delay: 0.12s; }
.sound-btn:nth-child(7) { animation-delay: 0.14s; }
.sound-btn:nth-child(8) { animation-delay: 0.16s; }
.sound-btn:nth-child(9) { animation-delay: 0.18s; }
.sound-btn:nth-child(10) { animation-delay: 0.20s; }
.sound-btn:nth-child(11) { animation-delay: 0.22s; }
.sound-btn:nth-child(12) { animation-delay: 0.24s; }

/* Hidden utility */
.hidden {
    display: none !important;
}

/* ========================================
   NEW FEATURES - Enhanced Soundboard v2
   ======================================== */

/* Audio Visualizer Bars */
.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 30px;
    padding: 0 15px;
}

.audio-visualizer .bar {
    width: 4px;
    background: linear-gradient(to top, var(--sb-success), var(--sb-cyan));
    border-radius: 2px;
    animation: visualizer-bar 0.5s ease-in-out infinite;
}

.audio-visualizer .bar:nth-child(1) { height: 60%; animation-delay: 0.0s; }
.audio-visualizer .bar:nth-child(2) { height: 80%; animation-delay: 0.1s; }
.audio-visualizer .bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.audio-visualizer .bar:nth-child(4) { height: 100%; animation-delay: 0.15s; }
.audio-visualizer .bar:nth-child(5) { height: 70%; animation-delay: 0.25s; }
.audio-visualizer .bar:nth-child(6) { height: 50%; animation-delay: 0.05s; }
.audio-visualizer .bar:nth-child(7) { height: 90%; animation-delay: 0.2s; }

@keyframes visualizer-bar {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* Enhanced Now Playing with Visualizer */
.now-playing.active {
    display: flex;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(34, 211, 238, 0.1));
    border-color: rgba(74, 222, 128, 0.4);
}

.now-playing-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Speed Control */
.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    flex-wrap: wrap;
}

.speed-label {
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
}

.speed-buttons {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.speed-btn {
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 38px;
    text-align: center;
}

.speed-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--sb-primary);
    color: var(--sb-primary);
}

.speed-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    border-color: var(--sb-primary);
    color: var(--sb-primary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Sort Dropdown */
.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.sort-label {
    font-size: 0.85rem;
    color: #9ca3af;
}

.sort-select {
    padding: 8px 30px 8px 12px;
    background: var(--sb-glass-bg);
    border: 1px solid var(--sb-glass-border);
    border-radius: 8px;
    color: #e8e8e8;
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.3s ease;
}

.sort-select:hover,
.sort-select:focus {
    border-color: var(--sb-primary);
    outline: none;
}

.sort-select option {
    background: #1a1a2e;
    color: #e8e8e8;
}

/* Most Played Section */
.most-played {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(255, 107, 53, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.most-played-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--sb-primary);
    font-weight: 600;
}

.most-played-header svg {
    width: 20px;
    height: 20px;
}

.most-played-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--sb-primary) transparent;
}

.most-played-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.most-played-item:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--sb-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.most-played-rank {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--sb-primary);
    min-width: 30px;
    text-align: center;
}

.most-played-rank.gold { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.most-played-rank.silver { color: #c0c0c0; text-shadow: 0 0 10px rgba(192, 192, 192, 0.5); }
.most-played-rank.bronze { color: #cd7f32; text-shadow: 0 0 10px rgba(205, 127, 50, 0.5); }

.most-played-info {
    flex: 1;
}

.most-played-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 2px;
}

.most-played-count {
    font-size: 0.75rem;
    color: #9ca3af;
}

.most-played-emoji {
    font-size: 1.5rem;
}

/* Share Button on Sound Cards */
.share-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 2;
}

.sound-btn:hover .share-btn {
    opacity: 1;
}

.share-btn:hover {
    color: var(--sb-cyan);
    transform: scale(1.2);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--sb-glass-strong);
    border: 1px solid var(--sb-glass-border);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: toast-slide-in 0.3s ease;
    max-width: 350px;
}

.toast.success {
    border-color: rgba(74, 222, 128, 0.4);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), var(--sb-glass-strong));
}

.toast.info {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), var(--sb-glass-strong));
}

.toast-icon {
    font-size: 1.3rem;
}

.toast-message {
    color: #e8e8e8;
    font-size: 0.9rem;
}

.toast.fade-out {
    animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Keyboard Shortcuts Panel */
.shortcuts-panel {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: none;
}

.shortcuts-panel.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.shortcuts-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.shortcuts-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sb-primary);
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.shortcut-item kbd {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    color: var(--sb-primary);
    min-width: 50px;
    text-align: center;
}

.shortcut-item span {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Ripple Effect */
.sound-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.4);
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced Playing State */
.sound-btn.playing {
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 222, 128, 0.3),
                    inset 0 0 20px rgba(74, 222, 128, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(74, 222, 128, 0.5),
                    inset 0 0 30px rgba(74, 222, 128, 0.2);
    }
}

/* Mobile Responsive for New Features */
@media (max-width: 768px) {
    .speed-control {
        width: 100%;
        justify-content: center;
    }

    .speed-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .sort-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .sort-select {
        width: 100%;
    }

    .most-played-item {
        min-width: 150px;
        padding: 10px 12px;
    }

    .most-played-rank {
        font-size: 1rem;
    }

    .toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .toast {
        max-width: 100%;
    }

    .shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .audio-visualizer {
        height: 25px;
    }

    .audio-visualizer .bar {
        width: 3px;
    }
}
