/* CSS Custom Properties (Matched with TuneSpotlight) */
:root {
    --bg-dark: #050505;
    --bg-darker: #000000;
    --bg-card: #121212;
    --bg-glass: rgba(18, 18, 18, 0.7);
    --primary: #b026ff;      /* Neon Purple */
    --secondary: #00f0ff;    /* Neon Cyan */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --text-dim: #666666;
    --border-light: rgba(255, 255, 255, 0.08);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --shadow-glow: 0 0 30px rgba(176, 38, 255, 0.35);
    --shadow-cyan: 0 0 30px rgba(0, 240, 255, 0.25);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Glow Effect */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 80% 20%, rgba(176, 38, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 15% 80%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, #050505 0%, #1a0524 100%);
    z-index: -1;
    pointer-events: none;
}

/* Main Container Layout */
.app-container {
    width: 100%;
    max-width: 500px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: space-between;
}

/* Header Styles */
.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--text-main);
}

.logo-accent {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 2px;
}

.tagline {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--secondary);
    margin-top: 5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Card Container */
.track-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Cover Art and Vinyl Spinner Container */
.cover-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-aura {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(176, 38, 255, 0.4) 0%, transparent 70%);
    filter: blur(15px);
    z-index: 1;
    pointer-events: none;
    transition: background 1s ease;
}

.track-card.playing .glow-aura {
    background: radial-gradient(circle, rgba(0, 240, 255, 0.3) 0%, rgba(176, 38, 255, 0.3) 50%, transparent 70%);
    animation: rotate-glow 10s linear infinite;
}

@keyframes rotate-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Vinyl styling (Mystery state) */
.vinyl-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.vinyl {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #111111;
    border: 6px solid #222222;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    animation: float-vinyl 4s ease-in-out infinite;
}

.vinyl-grooves {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    border-radius: 50%;
    border: 1px double rgba(255, 255, 255, 0.05);
    background-image: radial-gradient(circle, transparent 30%, rgba(255,255,255,0.01) 40%, transparent 50%, rgba(255,255,255,0.01) 60%, transparent 70%);
}

.vinyl-label {
    width: 35%;
    height: 35%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
    z-index: 3;
}

.vinyl-question {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

@keyframes float-vinyl {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Spinning Vinyl when playing */
.track-card.playing .vinyl {
    animation: spin-vinyl 4s linear infinite;
}

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

/* Artist Cover Image wrapper (Revealed state) */
.artist-image-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--border-light);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.artist-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.artist-image-wrapper:hover .artist-image {
    transform: scale(1.05);
}

/* Hidden elements */
.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

/* Track Metadata Styling */
.track-meta {
    width: 100%;
    margin-bottom: 2rem;
    z-index: 3;
}

.song-title {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
    color: var(--text-main);
    transition: filter 1s ease, color 0.5s ease;
}

.artist-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: filter 1s ease;
}

/* Blur Effect for Mystery state */
.blurred {
    filter: blur(7px);
    user-select: none;
    color: rgba(255, 255, 255, 0.15) !important;
}

/* Controls Section */
.player-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    z-index: 3;
}

/* Play Button */
.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.play-btn svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    transition: transform 0.2s ease;
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(176, 38, 255, 0.65), 0 0 20px rgba(0, 240, 255, 0.4);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn:disabled {
    background: #222222;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.4;
}

.play-btn:disabled svg {
    fill: #444444;
}

/* Pulse animation for active play button */
.track-card.playing .play-btn {
    animation: button-pulse 2s infinite;
}

@keyframes button-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(0, 240, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

/* Timeline/Progress Bar styling */
.timeline-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    animation: fade-in-up 0.8s ease forwards;
}

.timeline {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.timeline-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* Locked Mode Styles */
.locked-message {
    margin: 1.5rem 0 0.5rem;
    padding: 1.2rem;
    background: rgba(176, 38, 255, 0.08);
    border: 1px solid rgba(176, 38, 255, 0.2);
    border-radius: 16px;
    width: 100%;
    opacity: 0;
    animation: fade-in-up 0.8s ease forwards;
}

.lock-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 8px rgba(176, 38, 255, 0.5));
}

.locked-message p {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 700;
}

.locked-message .lock-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 4px;
}

/* Artist Bio Section styling */
.artist-bio-container {
    width: 100%;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    text-align: left;
    opacity: 0;
    animation: fade-in-up 1s ease forwards 0.3s;
}

.bio-header {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

.artist-description {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* App Footer Styling */
.app-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 2rem;
    line-height: 1.5;
}

.app-footer p {
    margin-bottom: 4px;
}

.copyright {
    color: var(--text-dim);
    opacity: 0.7;
}

/* Animation utilities */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media (max-width: 480px) {
    .app-container {
        padding: 1rem;
    }
    .track-card {
        padding: 2rem 1.5rem;
    }
    .cover-container {
        width: 170px;
        height: 170px;
    }
    .song-title {
        font-size: 1.4rem;
    }
}

/* Spotify Button Styles */
.spotify-link-container {
    margin-top: 1.5rem;
    width: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fade-in-up 0.8s ease forwards;
}

.spotify-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 1.8rem;
    background: #1DB954; /* Spotify Brand Green */
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50px;
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.spotify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.6), 0 0 15px rgba(0, 240, 255, 0.2);
    background: #1ed760;
    color: #ffffff;
}

.spotify-icon {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

