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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background: #000;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.container {
    max-width: 580px;
    margin: 0 auto;
    padding: 0 20px;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: paint;
}

/* Background */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    height: 110%;
    background-image: url('cover.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: backgroundMove 60s ease-in-out infinite;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px) saturate(140%);
    -webkit-backdrop-filter: blur(15px) saturate(140%);
}

/* Background Animation */
@keyframes backgroundMove {
    0%, 100% {
        transform: scale(1.1) translate(0, 0);
    }
    25% {
        transform: scale(1.12) translate(-1%, -1%);
    }
    50% {
        transform: scale(1.11) translate(1%, 0.5%);
    }
    75% {
        transform: scale(1.13) translate(-0.5%, 1%);
    }
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: float linear infinite;
}

.particle.small {
    width: 6px;
    height: 6px;
}

.particle.medium {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.particle.large {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(2px);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) translateX(15px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-60px) translateX(-8px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-45px) translateX(-20px) rotate(270deg);
        opacity: 0.9;
    }
}

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

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 5px;
    right: 5px;
    z-index: 50;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 70px;
    height: 32px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.95);
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: paint;
}

/* Header */
.header {
    flex-shrink: 0;
    text-align: center;
    padding: 48px 0 32px;
}

/* Album Cover */
.album-cover-container {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
}

.album-cover {
    position: relative;
    display: inline-block;
}

.album-cover img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Song Info */
.song-title {
    color: white;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
}

.song-title .subtitle {
    font-size: 20px;
    opacity: 0.9;
}

.artist-name {
    color: rgba(255, 255, 255, 0.95);
    font-size: 20px;
    margin-bottom: 24px;
}

.availability-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
}

/* Platforms Section */
.platforms-section {
    flex: 1;
    display: flex;
    align-items: flex-start;
    padding: 16px 0 48px;
}

.platforms-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.platform-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backface-visibility: hidden;
    will-change: transform, opacity;
    contain: paint;
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    animation: fadeIn 0.6s ease forwards;
}

/* Disable animation when toggling languages */
.platform-item.no-animation {
    animation: none;
    opacity: 1;
    transform: none;
}

.platform-item:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

.platform-item:hover::before {
    left: 100%;
}

.platform-logo {
    flex: 1;
    display: flex;
    align-items: center;
    margin-right: 24px;
}

.platform-logo img {
    width: 150px;
    height: 50px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.platform-item:hover .platform-logo img {
    transform: scale(1.02);
}

.platform-btn {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 100px;
    height: 40px;
    text-align: center;
}

.platform-btn:hover {
    background: #f3f4f6;
    color: #111827;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Credits */
.credits {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 32px 0 20px;
    margin-top: 32px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    will-change: transform, opacity;
    transform: translateZ(0);
    contain: paint;
}

.credits-content {
    text-align: center;
}

.credits p {
    font-size: 16px;
    margin-bottom: 4px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Copyright */
.copyright {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 16px 0;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .header {
        padding: 40px 0 28px;
    }

    .album-cover-container {
        margin-bottom: 28px;
    }

    .platforms-section {
        padding: 20px 0 40px;
    }

    .platforms-list {
        gap: 10px;
    }

    .song-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .song-title .subtitle {
        font-size: 18px;
    }

    .artist-name {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .album-cover img {
        width: 260px;
        height: 260px;
    }

    .platform-logo img {
        width: 120px;
        height: 40px;
    }

    .platform-item {
        padding: 18px 24px;
    }

    .platform-logo {
        margin-right: 18px;
    }

    .platform-btn {
        width: 100px;
        height: 40px;
    }

    .credits {
        padding: 28px 0 18px;
    }

    .credits p {
        font-size: 14px;
    }

    .language-toggle {
        top: 5px;
        right: 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .header {
        padding: 36px 0 24px;
    }

    .album-cover-container {
        margin-bottom: 24px;
    }

    .platforms-section {
        padding: 16px 0 36px;
    }

    .platforms-list {
        gap: 8px;
    }

    .album-cover img {
        width: 240px;
        height: 240px;
    }

    .song-title {
        font-size: 22px;
        margin-bottom: 18px;
    }

    .artist-name {
        margin-bottom: 18px;
    }

    .platform-logo img {
        width: 110px;
        height: 36px;
    }

    .platform-item {
        padding: 16px 22px;
    }

    .platform-logo {
        margin-right: 16px;
    }

    .platform-btn {
        width: 100px;
        height: 40px;
    }

    .credits {
        padding: 24px 0 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .background-image,
    .particle {
        animation: none;
    }

    .platform-item:hover,
    .lang-btn:hover {
        transform: none;
    }

    .platform-item {
        animation: none;
        transform: none;
        opacity: 1;
    }
}

/* Focus Styles */
button:focus-visible,
.platform-item:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
