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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Page Transition Effects */
body.page-loaded {
    opacity: 1;
}

body.page-exit {
    opacity: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease-out;
}

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

/* Top Controls */
.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 480px;
    min-width: 200px;
}

.about-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 24px;
    color: #e0e0e0;
    text-decoration: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.about-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.search-input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    opacity: 0.7;
}

/* Header */
header {
    margin-bottom: 30px;
}

h1 {
    font-size: 60px;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.subtitle {
    font-size: 18px;
    color: #b8b8b8;
    font-style: italic;
    letter-spacing: 1px;
    margin-bottom: 50px;
    display: block;
}

/* Intro Section */
.intro-section {
    margin-bottom: 60px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.intro-text {
    font-size: 18px;
    color: #e0e0e0;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.feature-item h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-item p {
    font-size: 14px;
    color: #b8b8b8;
    line-height: 1.6;
}

/* Song Cards */
.song-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    position: relative;
    overflow: visible;
}

.song-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: visible;
}

/* Spark particles that fling off on hover */
.song-card:hover .song-button::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    animation: sparkFly1 0.8s ease-out forwards;
}

.song-card:hover .song-button::after {
    content: '⭐';
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    animation: sparkFly2 0.9s ease-out forwards;
    animation-delay: 0.1s;
}

@keyframes sparkFly1 {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-70px, -50px) scale(0.2) rotate(360deg);
    }
}

@keyframes sparkFly2 {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(70px, -50px) scale(0.2) rotate(-360deg);
    }
}

/* Multiple spark particles using additional pseudo-elements on the card */
.song-card:hover::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    animation: sparkFly3 1s ease-out forwards;
    animation-delay: 0.05s;
}

.song-card:hover::after {
    content: '⭐';
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    animation: sparkFly4 1.1s ease-out forwards;
    animation-delay: 0.15s;
}

@keyframes sparkFly3 {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50px, 60px) scale(0.2) rotate(180deg);
    }
}

@keyframes sparkFly4 {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(50px, 60px) scale(0.2) rotate(-180deg);
    }
}

.recent-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    display: none;
}

.song-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.song-button {
    display: flex;
    align-items: center;
    gap: 30px;
    cursor: pointer;
    position: relative;
}

.song-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

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

.song-info {
    flex: 1;
    text-align: left;
}

.song-info h2 {
    font-size: 32px;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 700;
}

.song-info p {
    font-size: 16px;
    color: #b8b8b8;
    line-height: 1.6;
}

/* Footer */
.footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-text {
    font-size: 16px;
    color: #b8b8b8;
    margin-bottom: 10px;
}

.footer-year {
    font-size: 14px;
    color: #999;
}

/* Light Mode */
@media (prefers-color-scheme: light) {
    body:not(.force-dark) {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
        color: #1e293b;
    }
    
    .search-input {
        background: rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.1);
        color: #1e293b;
    }
    
    .about-button {
        background: rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.1);
        color: #1e293b;
    }
    
    .about-button:hover {
        background: rgba(0, 0, 0, 0.1);
        border-color: rgba(0, 0, 0, 0.2);
    }
    
    h1 {
        color: #1e293b;
        text-shadow: none;
    }
    
    .subtitle {
        color: #64748b;
    }
    
    .song-card {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .song-info h2 {
        color: #1e293b;
    }
    
    .song-info p {
        color: #64748b;
    }
    
    .intro-section {
        background: rgba(0, 0, 0, 0.03);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .intro-text {
        color: #1e293b;
    }
    
    .feature-item {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .feature-item h3 {
        color: #1e293b;
    }
    
    .feature-item p {
        color: #64748b;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    
    .top-controls {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .about-button {
        width: 100%;
        justify-content: center;
    }
    
    h1 {
        font-size: 40px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .song-card {
        padding: 20px;
    }
    
    .song-button {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .song-info {
        text-align: center;
    }
    
    .song-image {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .song-info h2 {
        font-size: 24px;
    }
    
    .song-info p {
        font-size: 14px;
    }
    
    .intro-section {
        padding: 30px 20px;
    }
    
    .intro-text {
        font-size: 16px;
    }
    
    .features-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-item {
        padding: 25px;
    }
}
