:root {
    --pink: #ff006e;
    --green: #00ff88;
    --purple: #8b00ff;
    --dark-bg: #0a0a0f;
    --card-bg: rgba(20, 20, 30, 0.9);
    --gradient-pink-green: linear-gradient(135deg, var(--pink), var(--green));
    --gradient-purple-pink: linear-gradient(135deg, var(--purple), var(--pink));
}

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

body {
    background: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 110, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%);
    color: white;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.main-container {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.header-section {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.main-title {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-pink-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.2rem;
    text-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
}

.subtitle {
    color: var(--green);
    font-size: 1.2rem;
    letter-spacing: 0.5rem;
    margin-top: 0.5rem;
}

.btn-fill-me {
    position: absolute;
    top: 0;
    right: 2rem;
    background: var(--gradient-pink-green);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-fill-me:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

/* Parameter Panel */
.parameter-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.param-section {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
}

.param-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--gradient-pink-green);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.selection-type {
    color: #888;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Button Grid */
.button-grid {
    display: grid;
    gap: 0.8rem;
}

.venue-grid {
    grid-template-columns: repeat(5, 1fr);
}

.feel-grid {
    grid-template-columns: repeat(4, 1fr);
}

.param-btn {
    background: rgba(40, 40, 60, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.param-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-pink-green);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.param-btn > * {
    position: relative;
    z-index: 1;
}

.param-btn i {
    font-size: 1.5rem;
}

.param-btn span {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.param-btn.active::before {
    opacity: 1;
}

.param-btn.active {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transform: scale(1.02);
}

.param-btn:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: var(--green);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

.param-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Time Wheel */
.time-wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.time-wheel {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--pink) 0deg 90deg,
        var(--purple) 90deg 180deg,
        var(--green) 180deg 270deg,
        #00d4ff 270deg 360deg
    );
    position: relative;
    padding: 5px;
}

.time-wheel::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--dark-bg);
}

.time-indicator {
    position: absolute;
    width: 4px;
    height: 80px;
    background: white;
    top: 50%;
    left: 50%;
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(180deg);
    border-radius: 2px;
    z-index: 10;
}

.time-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
}

/* Tempo Controls */
.tempo-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tempo-label {
    color: #aaa;
    font-size: 0.9rem;
    font-weight: 600;
}

.time-icons {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.morning-icon { color: #ffd700; }
.noon-icon { color: #ffaa00; }
.night-icon { color: #8888ff; }

.bpm-display {
    background: rgba(0, 255, 136, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--green);
    text-align: center;
}

.dual-slider-container,
.duration-slider-container {
    position: relative;
    padding: 1rem 0;
}

.bpm-slider,
.duration-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--pink), var(--green));
    outline: none;
    margin: 0.5rem 0;
}

.bpm-slider::-webkit-slider-thumb,
.duration-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.bpm-labels,
.duration-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
}

/* Generate Panel */
.generate-panel {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.generate-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--gradient-pink-green);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.energy-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}

.energy-btn {
    background: rgba(40, 40, 60, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.energy-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-pink-green);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.energy-btn > * {
    position: relative;
    z-index: 1;
}

.energy-btn i {
    font-size: 2.5rem;
}

.energy-btn.active::before {
    opacity: 1;
}

.energy-btn.active {
    border-color: var(--green);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    transform: scale(1.05);
}

.energy-btn:hover {
    transform: scale(1.08);
    border-color: var(--green);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

.energy-btn:active {
    transform: scale(1.02);
}

.dance-btn {
    grid-column: span 2;
}

/* Vinyl Button */
.vinyl-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.vinyl-button {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.vinyl-button:hover {
    transform: scale(1.05);
}

.vinyl-disc {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--pink) 0deg,
        var(--purple) 90deg,
        var(--green) 180deg,
        var(--pink) 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: vinyl-spin 3s linear infinite paused;
}

.vinyl-button:hover .vinyl-disc {
    animation-play-state: running;
}

@keyframes vinyl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vinyl-label {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.vinyl-label i {
    font-size: 2rem;
    color: var(--green);
}

.vinyl-grooves {
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vinyl-text {
    margin-top: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--gradient-pink-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

/* Result Section */
.result-section {
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid var(--green);
    border-radius: 15px;
    padding: 1.5rem;
}

.audio-visualizer {
    margin-bottom: 1rem;
}

#waveformCanvas {
    width: 100%;
    height: auto;
}

.custom-audio {
    width: 100%;
    border-radius: 10px;
    margin: 1rem 0;
}

.track-info {
    text-align: center;
    margin: 1rem 0;
}

.track-info h5 {
    color: var(--green);
    margin-bottom: 0.5rem;
}

.track-meta {
    color: #888;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    background: var(--gradient-pink-green);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

/* Loading */
.loading-section {
    text-align: center;
    padding: 3rem 1rem;
}

.spinner-vinyl {
    font-size: 4rem;
    color: var(--green);
    margin-bottom: 1rem;
}

.loading-text {
    color: #aaa;
    font-size: 1.1rem;
}

/* Error */
.error-section {
    background: rgba(255, 0, 110, 0.1);
    border: 2px solid var(--pink);
    border-radius: 10px;
    padding: 1.5rem;
    color: var(--pink);
    text-align: center;
}

/* Responsive */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .btn-fill-me {
        position: static;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .venue-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .feel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .energy-buttons {
        grid-template-columns: 1fr;
    }
    
    .dance-btn {
        grid-column: span 1;
    }
}
