/*
 * ArtisticPurity.com - Premium Mobile-First Styles
 * Inspired by artisticpurity.com aesthetic
 * Base: Mobile (320px+) → Tablet (768px+) → Desktop (1024px+)
 */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:root {
    /* ArtisticPurity Color Palette */
    --cream-bg: #F8F5D7;
    --deep-brown: #1F1D1A;
    --warm-brown: #3D3A33;
    --light-accent: #E8E4C0;
    --darker-accent: #D4CFA8;
    --text-primary: #1F1D1A;
    --text-secondary: #5A5750;
    --accent-gold: #C9A86A;
    --shadow-light: rgba(31, 29, 26, 0.08);
    --shadow-medium: rgba(31, 29, 26, 0.12);
    --shadow-strong: rgba(31, 29, 26, 0.2);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --line-height: 1.7;
    --line-height-tight: 1.3;
    --line-height-loose: 1.9;
}

html {
    font-size: clamp(14px, 2vw, 16px);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: var(--line-height);
    color: var(--text-primary);
    background-color: var(--cream-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* Additional background element for depth */
body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -20%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(201, 168, 106, 0.15) 0%, transparent 70%);
    filter: blur(100px);
    animation: floatAlt 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatAlt {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40px, -40px) scale(1.15);
    }
}

/* ===== BACKGROUND BLOB ANIMATION ===== */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(212, 207, 168, 0.3) 0%, transparent 70%);
    filter: blur(80px);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-20px, -30px) scale(1.1);
    }
    66% {
        transform: translate(30px, 20px) scale(0.9);
    }
}

/* ===== MOBILE STYLES (Base / 320px+) ===== */

/* Home Page Container */
.home-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--spacing-lg) var(--spacing-sm);
    padding-top: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: var(--spacing-lg) var(--spacing-md);
    box-shadow:
        0 20px 60px rgba(31, 29, 26, 0.08),
        0 8px 20px rgba(31, 29, 26, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    width: 100%;
    max-width: 600px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.home-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.site-title {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--warm-brown) 50%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(31, 29, 26, 0.1);
    animation: titleShimmer 3s ease-in-out infinite;
    position: relative;
    line-height: 1.25;
    padding-bottom: 0.1em;
}

@keyframes titleShimmer {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.1);
    }
}

.site-tagline {
    font-size: clamp(0.9rem, 3.5vw, 1.2rem);
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
    font-family: var(--font-serif);
    font-style: italic;
    opacity: 0.85;
    padding: 0 var(--spacing-xs);
}

/* Search Section */
.search-section {
    margin-bottom: var(--spacing-lg);
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    position: relative;
}

.search-input {
    flex: 1;
    font-size: 16px; /* Prevents iOS zoom */
    padding: 16px 20px;
    border: 2px solid rgba(31, 29, 26, 0.12);
    border-radius: 16px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5));
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-weight: 500;
    box-shadow:
        0 2px 8px rgba(31, 29, 26, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
    font-weight: 400;
}

.search-input:focus {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 8px 24px rgba(201, 168, 106, 0.15),
        0 0 0 4px rgba(201, 168, 106, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 70px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 16px;
    margin-top: 8px;
    box-shadow:
        0 12px 32px rgba(31, 29, 26, 0.12),
        0 4px 12px rgba(31, 29, 26, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border: 1.5px solid rgba(31, 29, 26, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    animation: fadeInUp 0.3s ease-out;
}

.search-suggestions.hidden {
    display: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(31, 29, 26, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: linear-gradient(135deg, rgba(201, 168, 106, 0.1), rgba(61, 58, 51, 0.08));
}

.suggestion-album-art {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(201, 168, 106, 0.2), rgba(61, 58, 51, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.suggestion-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-album-art-placeholder {
    font-size: 1.5rem;
    opacity: 0.4;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--deep-brown);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-artist {
    font-size: 0.82rem;
    color: var(--text-secondary);
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-loading {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.suggestion-empty {
    padding: var(--spacing-md);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.7;
}

/* Custom scrollbar for suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: rgba(31, 29, 26, 0.03);
    border-radius: 10px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 106, 0.4);
    border-radius: 10px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 106, 0.6);
}

.search-button {
    font-size: 1.3rem;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--warm-brown) 100%);
    color: var(--cream-bg);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 60px;
    font-weight: 600;
    box-shadow:
        0 4px 12px rgba(31, 29, 26, 0.15),
        0 2px 4px rgba(31, 29, 26, 0.1);
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-button:hover::before {
    width: 300px;
    height: 300px;
}

.search-button:hover,
.search-button:active {
    background: linear-gradient(135deg, var(--warm-brown) 0%, var(--accent-gold) 100%);
    transform: translateY(-3px);
    box-shadow:
        0 8px 28px rgba(31, 29, 26, 0.25),
        0 4px 8px rgba(31, 29, 26, 0.15);
}

.search-button:active {
    transform: translateY(-1px);
}

/* Enhanced Loading State */
.loading-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    animation: fadeInUp 0.4s ease-out;
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 2;
}

/* Song title */
.loading-song-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    color: var(--deep-brown);
    animation: fadeInScale 0.5s ease-out;
}

.loading-icon {
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#loading-song-name {
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Progress bar container */
.progress-container {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(31, 29, 26, 0.08);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 2px 4px rgba(31, 29, 26, 0.1),
        0 1px 2px rgba(255, 255, 255, 0.8);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold) 0%, var(--warm-brown) 50%, var(--accent-gold) 100%);
    background-size: 200% 100%;
    border-radius: 20px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    width: 0%;
    box-shadow: 0 2px 8px rgba(201, 168, 106, 0.4);
    animation: progressGradient 3s ease-in-out infinite;
}

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

.progress-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

.progress-percentage {
    text-align: center;
    margin-top: var(--spacing-sm);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 1px 2px rgba(31, 29, 26, 0.1);
}

/* Music fact card */
.music-fact-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    border: 1.5px solid rgba(201, 168, 106, 0.15);
    box-shadow: 0 4px 12px rgba(31, 29, 26, 0.06);
    animation: fadeInScale 0.5s ease-out;
    position: relative;
}

.fact-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 500;
    min-height: 50px;
    animation: fadeIn 0.6s ease-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-style: italic;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .loading-state {
        padding: var(--spacing-lg) var(--spacing-md);
        min-height: 280px;
    }

    .loading-content {
        max-width: 100%;
    }

    .loading-song-title {
        font-size: 1rem;
    }

    .music-fact-card {
        padding: var(--spacing-md);
    }

    .fact-content {
        font-size: 0.88rem;
        min-height: 45px;
    }
}

/* Error State */
.error-state {
    text-align: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.12));
    border-radius: 20px;
    border: 1.5px solid rgba(239, 68, 68, 0.25);
    animation: fadeInUp 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

#error-message {
    color: #991b1b;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    font-weight: 500;
    font-size: 0.95rem;
}

.hidden {
    display: none !important;
}

/* Popular Songs */
.song-examples {
    margin-bottom: var(--spacing-md);
}

.examples-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    opacity: 0.65;
}

.example-songs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.song-pill {
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4));
    border: 1.5px solid rgba(31, 29, 26, 0.12);
    border-radius: 24px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 500;
    box-shadow:
        0 2px 8px rgba(31, 29, 26, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.song-pill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--deep-brown), var(--warm-brown));
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.song-pill:hover,
.song-pill:active {
    color: var(--cream-bg);
    border-color: var(--deep-brown);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 6px 20px rgba(31, 29, 26, 0.2),
        0 3px 8px rgba(31, 29, 26, 0.1);
}

.song-pill:hover::after {
    opacity: 1;
}

/* About Section */
.about-section {
    text-align: center;
    padding: var(--spacing-md) 0;
    margin-top: var(--spacing-sm);
}

.about-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: italic;
    opacity: 0.75;
    max-width: 95%;
    margin: 0 auto;
}

/* Recent Songs Section */
.recent-songs-section {
    max-width: 1400px;
    margin: var(--spacing-xl) auto;
    padding: 0 var(--spacing-sm);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (min-width: 768px) {
    .recent-songs-section {
        padding: 0 var(--spacing-lg);
    }
}

.recent-songs-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.recent-songs-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--warm-brown) 50%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recent-songs-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.75;
    margin-bottom: var(--spacing-md);
}

/* Sort Controls */
.sort-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.sort-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.4);
    border: 1.5px solid rgba(31, 29, 26, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sort-btn.active {
    background: linear-gradient(135deg, var(--deep-brown), var(--warm-brown));
    color: var(--cream-bg);
    border-color: var(--deep-brown);
    box-shadow: 0 4px 12px rgba(31, 29, 26, 0.15);
}

.sort-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 29, 26, 0.08);
}

.recent-songs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 640px) {
    .recent-songs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    .recent-songs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (min-width: 1280px) {
    .recent-songs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.loading-recent {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    border: 1.5px dashed rgba(31, 29, 26, 0.15);
}

.song-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 16px;
    padding: 0;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(31, 29, 26, 0.1);
    box-shadow:
        0 4px 12px rgba(31, 29, 26, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
    min-height: 100px;
}

.song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-gold), var(--warm-brown));
    opacity: 0;
    transition: opacity 0.4s;
}

.song-card:hover::before {
    opacity: 1;
}

.song-card-album-art {
    width: 100px;
    min-width: 100px;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 168, 106, 0.2), rgba(61, 58, 51, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.song-card-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.song-card:hover .song-card-album-art img {
    transform: scale(1.1);
}

.song-card-album-art-placeholder {
    font-size: 2.5rem;
    color: var(--accent-gold);
    opacity: 0.3;
    transition: all 0.4s;
}

.song-card:hover .song-card-album-art-placeholder {
    opacity: 0.5;
    transform: scale(1.15) rotate(5deg);
}

.song-card-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.song-card:active {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
    box-shadow:
        0 8px 24px rgba(31, 29, 26, 0.12),
        0 4px 12px rgba(31, 29, 26, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

@media (hover: hover) {
    .song-card:hover {
        transform: translateY(-4px);
        border-color: var(--accent-gold);
        box-shadow:
            0 12px 32px rgba(31, 29, 26, 0.15),
            0 6px 16px rgba(31, 29, 26, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }
}

/* Mobile: Stack vertically on very small screens */
@media (max-width: 400px) {
    .song-card {
        flex-direction: column;
    }

    .song-card-album-art {
        width: 100%;
        height: 140px;
    }
}

.song-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--deep-brown);
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.song-card-artist {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-style: italic;
    opacity: 0.85;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.song-card-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    opacity: 0.7;
    background: rgba(201, 168, 106, 0.1);
    padding: 3px 8px;
    border-radius: 8px;
}

.song-card-views-icon {
    font-size: 0.9rem;
}

.song-card-date {
    font-size: 0.7rem;
    opacity: 0.6;
    font-style: italic;
}

@media (min-width: 640px) {
    .song-card-album-art {
        width: 120px;
        min-width: 120px;
    }

    .song-card-title {
        font-size: 1.1rem;
    }

    .song-card-artist {
        font-size: 0.92rem;
    }
}

@media (min-width: 1024px) {
    .song-card-album-art {
        width: 140px;
        min-width: 140px;
    }

    .song-card-content {
        padding: var(--spacing-lg);
    }

    .song-card-title {
        font-size: 1.15rem;
    }
}

/* Footer */
.home-footer {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: var(--spacing-lg);
    font-weight: 500;
    opacity: 0.65;
    position: relative;
}

.home-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    border-radius: 1px;
}

/* ===== SONG DETAIL PAGE ===== */

/* Navigation Bar */
header nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: rgba(248, 245, 215, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(31, 29, 26, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(31, 29, 26, 0.04);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-link {
    color: var(--deep-brown);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 12px 20px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(31, 29, 26, 0.08);
    box-shadow: 0 2px 6px rgba(31, 29, 26, 0.04);
    justify-self: start;
}

.back-link:hover,
.back-link:active {
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(31, 29, 26, 0.08);
}

/* Logo in Navigation */
.logo-link {
    text-decoration: none;
    justify-self: center;
}

.nav-logo {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--warm-brown) 50%, var(--accent-gold) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: logoSubtle 4s ease-in-out infinite;
}

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

.logo-link:hover .nav-logo {
    animation: none;
    background-position: 100% 50%;
    filter: brightness(1.15);
    transform: scale(1.03);
}

.share-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4));
    border: 1px solid rgba(31, 29, 26, 0.1);
    padding: 12px 20px;
    border-radius: 16px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(31, 29, 26, 0.06);
    justify-self: end;
}

.share-btn:hover,
.share-btn:active {
    background: linear-gradient(135deg, var(--deep-brown), var(--warm-brown));
    color: var(--cream-bg);
    border-color: var(--deep-brown);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 29, 26, 0.15);
}

/* Breadcrumb Navigation */
.breadcrumb {
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    list-style: none;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.75;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--deep-brown);
    opacity: 1;
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.breadcrumb-item span {
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    opacity: 0.7;
}

.breadcrumb-item.active span {
    color: var(--deep-brown);
    font-weight: 600;
    background: rgba(201, 168, 106, 0.15);
    opacity: 1;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    opacity: 0.3;
    user-select: none;
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 100%;
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
}

.song-detail {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 32px;
    padding: var(--spacing-xl);
    box-shadow:
        0 20px 60px rgba(31, 29, 26, 0.08),
        0 8px 20px rgba(31, 29, 26, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin-bottom: var(--spacing-xl);
}

.song-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-tight);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.artist-name {
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-serif);
    font-style: italic;
    opacity: 0.85;
}

/* Spotify Section */
.spotify-section {
    margin: var(--spacing-lg) 0;
}

.spotify-embed {
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(29, 185, 84, 0.15),
        0 2px 8px rgba(29, 185, 84, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spotify-embed:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(29, 185, 84, 0.2),
        0 4px 12px rgba(29, 185, 84, 0.15);
}

.spotify-embed iframe {
    display: block;
    border-radius: 12px;
}

/* TLDR Section */
.tldr-section {
    margin: 0 0 var(--spacing-xl);
}

.tldr-heading {
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    opacity: 0.7;
}

.tldr-text {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.65;
    color: var(--text-primary);
    font-weight: 400;
    margin: 0;
    padding-left: var(--spacing-md);
    border-left: 3px solid var(--accent-gold);
    font-family: var(--font-sans);
}

/* Full Analysis Section */
.full-analysis-section {
    margin: var(--spacing-xl) 0;
}

.full-analysis-heading {
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    opacity: 0.7;
}

.divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(201, 168, 106, 0.2) 20%,
        rgba(201, 168, 106, 0.4) 50%,
        rgba(201, 168, 106, 0.2) 80%,
        transparent 100%);
    margin: var(--spacing-xl) 0;
    border-radius: 1px;
}

.meaning-content {
    font-size: clamp(1.05rem, 2.2vw, 1.15rem);
    line-height: var(--line-height-loose);
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.meaning-content br + br {
    display: block;
    content: "";
    margin-top: var(--spacing-md);
}

/* Formatted meaning paragraphs and headings */
.meaning-heading {
    font-size: clamp(1.2rem, 2.5vw, 1.45rem);
    font-weight: 700;
    color: var(--deep-brown);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    position: relative;
    padding-left: 16px;
}

.meaning-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, var(--accent-gold), var(--warm-brown));
    border-radius: 2px;
}

.meaning-heading:first-child {
    margin-top: 0;
}

.meaning-paragraph {
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-loose);
    text-align: justify;
    text-justify: inter-word;
    color: rgba(31, 29, 26, 0.9);
    font-weight: 400;
}

.meaning-paragraph:last-child {
    margin-bottom: 0;
}

/* Blockquote styling for quoted lyrics - simplified and clean */
.meaning-content blockquote,
.meaning-paragraph blockquote {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(201, 168, 106, 0.05);
    border-radius: 8px;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--warm-brown);
    line-height: 1.8;
    font-size: clamp(1rem, 2vw, 1.08rem);
}

.meaning-content blockquote p,
.meaning-paragraph blockquote p {
    margin: 0;
}

/* Lyric quotes styling (if wrapped in quotes) */
.meaning-content em,
.meaning-paragraph em {
    font-style: italic;
    color: var(--warm-brown);
    font-family: var(--font-serif);
    position: relative;
    padding: 0 4px;
}

/* Lyrics Section */
.lyrics-section {
    margin: var(--spacing-xl) 0;
}

.lyrics-details {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    border: 1.5px solid rgba(31, 29, 26, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lyrics-details[open] {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(31, 29, 26, 0.08);
}

.lyrics-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    list-style: none;
    transition: all 0.3s ease;
    user-select: none;
}

.lyrics-summary::-webkit-details-marker {
    display: none;
}

.lyrics-summary:hover {
    background: rgba(201, 168, 106, 0.08);
}

.lyrics-heading {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--deep-brown);
    margin: 0;
    letter-spacing: -0.01em;
}

.lyrics-toggle {
    font-size: 0.9rem;
    color: var(--accent-gold);
    transition: transform 0.3s ease;
    font-weight: 700;
}

.lyrics-details[open] .lyrics-toggle {
    transform: rotate(180deg);
}

.lyrics-content {
    padding: var(--spacing-lg);
    padding-top: 0;
    font-family: var(--font-serif);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.9;
    color: var(--warm-brown);
    background: linear-gradient(135deg, rgba(201, 168, 106, 0.05), rgba(255, 255, 255, 0.3));
    border-top: 1px solid rgba(31, 29, 26, 0.08);
    max-height: 500px;
    overflow-y: auto;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar for lyrics */
.lyrics-content::-webkit-scrollbar {
    width: 8px;
}

.lyrics-content::-webkit-scrollbar-track {
    background: rgba(31, 29, 26, 0.05);
    border-radius: 10px;
}

.lyrics-content::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 106, 0.4);
    border-radius: 10px;
}

.lyrics-content::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 106, 0.6);
}

/* Chat Section */
.chat-section {
    margin-top: var(--spacing-xxl);
}

.chat-section h3 {
    font-size: clamp(1.2rem, 2.8vw, 1.5rem);
    margin-bottom: var(--spacing-lg);
    color: var(--deep-brown);
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.chat-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
    border-radius: 2px;
}

#chat-messages {
    margin-bottom: var(--spacing-md);
    max-height: 500px;
    overflow-y: auto;
    padding-right: var(--spacing-xs);
}

/* Custom scrollbar */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: rgba(31, 29, 26, 0.05);
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(31, 29, 26, 0.2);
    border-radius: 10px;
}

.chat-message {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 20px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(31, 29, 26, 0.06);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-message.user {
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--warm-brown) 100%);
    color: var(--cream-bg);
    margin-left: var(--spacing-lg);
    box-shadow:
        0 4px 12px rgba(31, 29, 26, 0.15),
        0 2px 4px rgba(31, 29, 26, 0.1);
}

.chat-message.ai {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    margin-right: var(--spacing-lg);
    border: 1.5px solid rgba(31, 29, 26, 0.08);
    box-shadow:
        0 4px 12px rgba(31, 29, 26, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.chat-message-label {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chat-message-content {
    line-height: 1.7;
    font-size: 0.98rem;
}

/* Typing indicator animation */
.typing-indicator .chat-message-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.typing-indicator .chat-message-content::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-gold);
    animation: typingDot 1.4s infinite;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.chat-form {
    display: flex;
    gap: var(--spacing-xs);
    position: sticky;
    bottom: 0;
    background-color: rgba(248, 245, 215, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--spacing-sm) 0;
    border-radius: 16px;
}

#chat-input {
    flex: 1;
    font-size: 16px;
    padding: 16px 20px;
    border: 2px solid rgba(31, 29, 26, 0.12);
    border-radius: 18px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5));
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-weight: 500;
    box-shadow:
        0 2px 8px rgba(31, 29, 26, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#chat-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
    font-weight: 400;
}

#chat-input:focus {
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 6px 20px rgba(201, 168, 106, 0.12),
        0 0 0 3px rgba(201, 168, 106, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.chat-form button[type="submit"] {
    font-size: 1.4rem;
    padding: 16px 24px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--deep-brown), var(--warm-brown));
    color: var(--cream-bg);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 64px;
    box-shadow:
        0 4px 12px rgba(31, 29, 26, 0.15),
        0 2px 4px rgba(31, 29, 26, 0.1);
    font-weight: 600;
}

.chat-form button[type="submit"]:hover,
.chat-form button[type="submit"]:active {
    background: linear-gradient(135deg, var(--warm-brown), var(--accent-gold));
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(31, 29, 26, 0.2),
        0 3px 8px rgba(31, 29, 26, 0.12);
}

/* Buttons */
.btn-secondary {
    padding: 12px 24px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(31, 29, 26, 0.15);
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-secondary:hover,
.btn-secondary:active {
    background-color: var(--deep-brown);
    color: var(--cream-bg);
    border-color: var(--deep-brown);
}

/* ===== MOBILE ADJUSTMENTS (Small screens) ===== */
@media (max-width: 480px) {
    :root {
        --spacing-xs: 0.4rem;
        --spacing-sm: 0.8rem;
        --spacing-md: 1.2rem;
        --spacing-lg: 1.6rem;
        --spacing-xl: 2.4rem;
    }

    .home-container {
        padding: var(--spacing-md) var(--spacing-xs);
        padding-top: var(--spacing-lg);
    }

    .glass-card {
        border-radius: 20px;
        padding: var(--spacing-md);
    }

    .home-header {
        margin-bottom: var(--spacing-md);
    }

    .search-input-wrapper {
        gap: 6px;
    }

    .search-input,
    .search-button {
        padding: 14px 18px;
        font-size: 15px;
    }

    .song-pill {
        padding: 9px 16px;
        font-size: 0.82rem;
    }

    .song-card {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .recent-songs-section {
        margin: var(--spacing-lg) auto;
        padding: 0 var(--spacing-xs);
    }

    .recent-songs-title {
        font-size: 1.3rem;
        margin-bottom: var(--spacing-md);
    }

    header nav {
        padding: var(--spacing-sm) var(--spacing-md);
        gap: var(--spacing-xs);
    }

    .nav-logo {
        font-size: 1.4rem;
    }

    .back-link,
    .share-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

/* ===== TABLET (768px+) ===== */
@media (min-width: 768px) {
    .home-container {
        padding: var(--spacing-xl);
    }

    .glass-card {
        padding: var(--spacing-xxl);
        max-width: 700px;
    }

    .search-input-wrapper {
        margin-bottom: var(--spacing-lg);
    }

    .container {
        max-width: 800px;
        margin: 0 auto;
        padding: var(--spacing-xl);
    }

    .song-detail {
        padding: var(--spacing-xl);
    }

    .example-songs {
        justify-content: center;
    }

    .nav-logo {
        font-size: 2.1rem;
    }

    .tldr-text {
        font-size: 1.08rem;
        padding-left: var(--spacing-lg);
    }
}

/* ===== DESKTOP (1024px+) ===== */
@media (min-width: 1024px) {
    body::before {
        width: 50%;
        height: 50%;
    }

    .glass-card {
        max-width: 800px;
    }

    .container {
        max-width: 900px;
    }

    /* Enhanced hover effects on desktop */
    .song-pill:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(31, 29, 26, 0.2);
    }

    .search-button:hover {
        transform: translateY(-3px);
    }
}

/* ===== SELECTION STYLING ===== */
::selection {
    background-color: var(--accent-gold);
    color: var(--cream-bg);
    text-shadow: none;
}

::-moz-selection {
    background-color: var(--accent-gold);
    color: var(--cream-bg);
    text-shadow: none;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 3px;
    border-radius: 8px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--deep-brown), var(--warm-brown));
    color: var(--cream-bg);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(31, 29, 26, 0.2),
        0 2px 4px rgba(31, 29, 26, 0.1);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow:
        0 8px 24px rgba(31, 29, 26, 0.3),
        0 4px 8px rgba(31, 29, 26, 0.15);
    background: linear-gradient(135deg, var(--warm-brown), var(--accent-gold));
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

/* ===== ARTIST PAGE STYLES ===== */
.artist-detail {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 32px;
    padding: var(--spacing-xl);
    box-shadow:
        0 20px 60px rgba(31, 29, 26, 0.08),
        0 8px 20px rgba(31, 29, 26, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin-bottom: var(--spacing-xl);
    animation: fadeInUp 0.6s ease-out;
}

.artist-page-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    color: var(--deep-brown);
    margin-bottom: var(--spacing-xs);
    line-height: var(--line-height-tight);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    text-align: center;
}

.artist-page-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    font-family: var(--font-serif);
    font-style: italic;
    opacity: 0.75;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    text-align: center;
}

.songs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (min-width: 640px) {
    .songs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .songs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (min-width: 1280px) {
    .songs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Artist page song cards - vertical layout */
.artist-song-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 0;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(31, 29, 26, 0.1);
    box-shadow:
        0 4px 12px rgba(31, 29, 26, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.artist-song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-gold), var(--warm-brown));
    opacity: 0;
    transition: opacity 0.4s;
}

.artist-song-card:hover::before {
    opacity: 1;
}

.artist-song-card-image-wrapper {
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(201, 168, 106, 0.1), rgba(61, 58, 51, 0.08));
}

.artist-song-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.artist-song-card:hover .artist-song-card-image {
    transform: scale(1.08);
}

.artist-song-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--accent-gold);
    opacity: 0.2;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.artist-song-card:hover .artist-song-card-placeholder {
    opacity: 0.4;
    transform: scale(1.1) rotate(8deg);
}

.artist-song-card-info {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.artist-song-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--deep-brown);
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em; /* Reserve space for 2 lines */
}

.artist-song-card-views {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin: 0;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.artist-song-card-views::before {
    content: '👁';
    font-size: 0.9rem;
    opacity: 0.6;
}

.artist-song-card:active {
    transform: translateY(-2px) scale(0.98);
}

@media (hover: hover) {
    .artist-song-card:hover {
        transform: translateY(-6px);
        border-color: var(--accent-gold);
        box-shadow:
            0 12px 32px rgba(31, 29, 26, 0.15),
            0 6px 16px rgba(31, 29, 26, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }
}

@media (min-width: 640px) {
    .artist-song-card-title {
        font-size: 1.05rem;
    }

    .artist-song-card-info {
        padding: var(--spacing-lg);
    }
}

/* Print styles */
@media print {
    body::before,
    body::after {
        display: none;
    }

    .glass-card,
    .song-detail {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .scroll-to-top,
    .spotify-section,
    .chat-section,
    header nav {
        display: none;
    }
}
