/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-secondary: rgba(240, 240, 245, 0.55);
    --accent: #c8875e;
    --accent-glow: rgba(200, 135, 94, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ===== PARTICLES CANVAS ===== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== BACKGROUND GRADIENT ===== */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    letter-spacing: 0.02em;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(200, 135, 94, 0.15);
}

.lang-switcher:active {
    transform: translateY(0) scale(0.97);
}

.lang-flag {
    width: 20px;
    height: 15px;
    border-radius: 3px;
    object-fit: cover;
    display: block;
}

.lang-label {
    letter-spacing: 0.05em;
}

/* ===== CONTAINER ===== */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    min-height: 100vh;
    padding: 60px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===== MAIN CARD ===== */
.main-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    padding: 40px 28px 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 8px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

/* ===== PROFILE ===== */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
}

.avatar-glow {
    position: absolute;
    inset: -6px;
    border-radius: var(--radius-full);
    background: conic-gradient(var(--accent),
            #e8a87c,
            var(--accent),
            #d4956b,
            var(--accent));
    opacity: 0.7;
    animation: rotateGlow 4s linear infinite;
    filter: blur(3px);
}

@keyframes rotateGlow {
    to {
        transform: rotate(360deg);
    }
}

.avatar {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--bg-primary);
    z-index: 1;
}

.username {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bio {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 320px;
    font-weight: 400;
}

.bio strong {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
    font-weight: 600;
}

/* ===== SONGS SECTION ===== */
.songs-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    padding-left: 4px;
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* ===== SONG CARD ===== */
.song-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-md);
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
}

.song-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(200, 135, 94, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(200, 135, 94, 0.1);
}

.song-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.song-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.song-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: var(--transition);
}

.song-card:hover .song-card-overlay {
    opacity: 1;
}

.song-card-overlay svg {
    width: 32px;
    height: 32px;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.song-card-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-tag {
    font-size: 0.6875rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* Coming Soon placeholder */
.soon-placeholder {
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.08);
}

.soon-icon {
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.1);
}

.song-card-soon {
    opacity: 0.5;
    cursor: default;
}

.song-card-soon:hover {
    transform: none;
    background: var(--bg-card);
    border-color: var(--border-subtle);
    box-shadow: none;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(16, 16, 24, 0.95);
    border: 1px solid rgba(200, 135, 94, 0.15);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(200, 135, 94, 0.06);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-album-art {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.modal-artist {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.modal-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(200, 135, 94, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    width: fit-content;
    letter-spacing: 0.03em;
    margin-top: 2px;
}

.modal-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.modal-link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(200, 135, 94, 0.06), transparent);
    opacity: 0;
    transition: var(--transition);
}

.modal-link-card:hover::before {
    opacity: 1;
}

.modal-link-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(200, 135, 94, 0.3);
    transform: translateX(4px);
}

.modal-link-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

.modal-link-label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.modal-link-arrow {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.modal-link-card:hover .modal-link-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* ===== FOOTER ===== */
.footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px 0 8px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 8px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(12px);
}

.social-icon svg {
    width: 16px;
    height: 16px;
}

.social-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(200, 135, 94, 0.15);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
    font-weight: 300;
    white-space: nowrap;
}

.footer-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
    font-weight: 400;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* ===== ANIMATIONS ===== */
.main-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lang-switcher {
    opacity: 0;
    animation: fadeIn 0.5s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.animate-in {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* i18n text swap animation */
[data-i18n] {
    transition: opacity 0.2s ease;
}

.i18n-fade {
    opacity: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .container {
        padding: 32px 12px 32px;
    }

    .main-card {
        padding: 28px 18px 20px;
        border-radius: 22px;
        gap: 28px;
    }

    .avatar-wrapper {
        width: 96px;
        height: 96px;
    }

    .avatar {
        width: 96px;
        height: 96px;
    }

    .username {
        font-size: 1.3rem;
    }

    .bio {
        font-size: 0.8125rem;
    }

    .songs-grid {
        gap: 10px;
    }

    .song-card {
        padding: 8px;
        gap: 8px;
    }

    .song-card-name {
        font-size: 0.75rem;
    }

    .song-card-tag {
        font-size: 0.625rem;
    }

    .lang-switcher {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .modal-content {
        padding: 24px 18px;
    }

    .modal-album-art {
        width: 60px;
        height: 60px;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== CONTENT PROTECTION ===== */
body.protected {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Protection toast notification */
.protection-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 32px 44px;
    border-radius: var(--radius-lg);
    background: rgba(10, 10, 15, 0.92);
    border: 1px solid rgba(200, 135, 94, 0.25);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(200, 135, 94, 0.08);
    opacity: 0;
    pointer-events: none;
    animation: toastIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.protection-toast.hide {
    animation: toastOut 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.protection-toast .shield-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    animation: shieldPulse 0.6s ease-out;
    filter: drop-shadow(0 0 12px rgba(200, 135, 94, 0.4));
}

.protection-toast .toast-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.protection-toast .toast-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-align: center;
    line-height: 1.5;
}

.protection-toast .toast-bar {
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    margin-top: 4px;
    overflow: hidden;
}

.protection-toast .toast-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), #e8a87c);
    animation: barShrink 2.5s linear forwards;
}

/* Fullscreen overlay behind toast */
.protection-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    animation: overlayIn 0.3s ease forwards;
}

.protection-overlay.hide {
    animation: overlayOut 0.3s ease forwards;
}

@keyframes toastIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.03);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

@keyframes overlayIn {
    to {
        opacity: 1;
    }
}

@keyframes overlayOut {
    to {
        opacity: 0;
    }
}

@keyframes shieldPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes barShrink {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}