/* Suno AI Music Generator - Exact UI Styles */
/* Based on reference: suno.com */

/* ================================
   CSS VARIABLES & THEME
   ================================ */
:root {
    /* Suno Dark Theme Colors */
    --suno-bg: #0a0a0a;
    --suno-surface: #141414;
    --suno-surface-light: #1a1a1a;
    --suno-surface-hover: #1f1f1f;
    --suno-border: #2a2a2a;
    --suno-border-light: rgba(255, 255, 255, 0.1);

    /* Text Colors */
    --suno-text: #ffffff;
    --suno-text-primary: rgba(255, 255, 255, 0.9);
    --suno-text-secondary: rgba(255, 255, 255, 0.6);
    --suno-text-muted: rgba(255, 255, 255, 0.4);
    --suno-text-disabled: rgba(255, 255, 255, 0.25);

    /* Accent Colors */
    --suno-accent: #8b5cf6;
    --suno-accent-hover: #7c3aed;
    --suno-accent-light: rgba(139, 92, 246, 0.2);

    /* Font Stack */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-accent: 0 0 30px rgba(139, 92, 246, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ================================
   BASE STYLES
   ================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans), serif;
    background-color: var(--suno-bg);
    color: var(--suno-text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: var(--suno-accent);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--suno-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--suno-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--suno-text-muted);
}

/* ================================
   NAVIGATION
   ================================ */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--suno-text-secondary);
    text-decoration: none;
    border-radius: 9999px;
    transition: all var(--transition-base);
}

.nav-link:hover {
    color: var(--suno-text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--suno-text);
    background: rgba(255, 255, 255, 0.1);
}

/* ================================
   BUTTONS
   ================================ */
.btn-suno {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-suno-primary {
    background: var(--suno-text);
    color: var(--suno-bg);
}

.btn-suno-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-suno-secondary {
    background: transparent;
    color: var(--suno-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-suno-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-suno-ghost {
    background: transparent;
    color: var(--suno-text-secondary);
    padding: 8px 16px;
}

.btn-suno-ghost:hover {
    color: var(--suno-text);
    background: rgba(255, 255, 255, 0.05);
}

.btn-suno-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--suno-text-secondary);
}

.btn-suno-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--suno-text);
}

/* ================================
   SONG CARDS
   ================================ */
.song-card {
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-slow);
}

.song-card:hover {
    transform: scale(1.02);
}

.song-card-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--suno-surface);
}

.song-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.song-card:hover .song-card-image {
    transform: scale(1.05);
}

.song-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.song-card:hover .song-card-overlay {
    opacity: 1;
}

.song-card-content {
    padding: 12px 4px;
}

.song-card-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--suno-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--suno-text-secondary);
}

/* Play Button on Cards */
.play-button-large {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    transform: scale(0.9);
}

.song-card:hover .play-button-large {
    transform: scale(1);
}

.play-button-large:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* ================================
   PROMPT INPUT
   ================================ */
.prompt-container {
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    transition: all var(--transition-base);
}

.prompt-container:focus-within {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.prompt-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--suno-text);
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    padding: 16px;
    min-height: 56px;
    max-height: 200px;
}

.prompt-input::placeholder {
    color: var(--suno-text-muted);
}

.prompt-tip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--suno-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.prompt-tip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--suno-text);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ================================
   FEATURE CARDS
   ================================ */
.feature-card {
    padding: 24px;
    background: var(--suno-surface);
    border: 1px solid var(--suno-border);
    border-radius: 16px;
    transition: all var(--transition-base);
}

.feature-card:hover {
    background: var(--suno-surface-light);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-scale-in {
    animation: scale-in 0.3s ease-out;
}

/* ================================
   GLASSMORPHISM
   ================================ */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ================================
   BADGES
   ================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-ai {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    backdrop-filter: blur(8px);
}

.badge-new {
    background: rgba(139, 92, 246, 0.8);
    color: white;
}

.badge-trending {
    background: rgba(239, 68, 68, 0.8);
    color: white;
}

/* ================================
   TEXT UTILITIES
   ================================ */
.text-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ================================
   AUDIO VISUALIZER
   ================================ */
.audio-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}

.audio-bar {
    width: 3px;
    background: var(--suno-accent);
    border-radius: 2px;
    animation: audioBar 1s ease-in-out infinite;
}

.audio-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.audio-bar:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.audio-bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.audio-bar:nth-child(4) { height: 80%; animation-delay: 0.3s; }
.audio-bar:nth-child(5) { height: 50%; animation-delay: 0.4s; }

@keyframes audioBar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

/* ================================
   LOADING STATES
   ================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* ================================
   FOOTER
   ================================ */
.footer-link {
    color: var(--suno-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--suno-text);
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--suno-text-secondary);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--suno-text);
}

/* ================================
   RESPONSIVE UTILITIES
   ================================ */
@media (max-width: 640px) {
    .song-card:hover {
        transform: none;
    }

    .song-card:hover .song-card-image {
        transform: none;
    }

    .prompt-container {
        border-radius: 16px;
    }
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--suno-accent);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   CUSTOM COMPONENTS
   ================================ */

/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--suno-surface);
    border: 1px solid var(--suno-border);
    border-radius: 9999px;
    color: var(--suno-text);
    font-size: 0.875rem;
    z-index: 100;
    animation: fadeInUp 0.3s ease-out;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 12px;
    background: var(--suno-surface);
    border: 1px solid var(--suno-border);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--suno-text);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    pointer-events: none;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Range slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--suno-border);
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--suno-text);
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* ================================
   LOADER
   ================================ */
.loader {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--suno-text);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================
   WAVE ANIMATION BACKGROUND
   ================================ */
.wave-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.wave-bg::before,
.wave-bg::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(
        circle at center,
        rgba(139, 92, 246, 0.1) 0%,
        transparent 50%
    );
    animation: rotate 20s linear infinite;
}

.wave-bg::after {
    animation-direction: reverse;
    animation-duration: 25s;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ================================
   CUSTOM MODEL INPUT
   ================================ */
.custom-model-input {
    background: var(--suno-surface-light);
    border: 1px solid var(--suno-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
    color: var(--suno-text);
    width: 300px;
    margin-left: 8px;
    transition: all var(--transition-base);
}

.custom-model-input:focus {
    outline: none;
    border-color: var(--suno-accent);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.custom-model-input::placeholder {
    color: var(--suno-text-muted);
}
