:root {
    --bg-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-shine: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --btn-bg: rgba(255, 255, 255, 0.05);
    --btn-hover: rgba(255, 255, 255, 0.1);

    /* Dynamic Orb Colors */
    --orb-1: #4f46e5;
    --orb-2: #ec4899;
    --orb-3: #06b6d4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    /* Fixed height */
    width: 100vw;
    overflow: hidden;
    /* Prevent page scrolling */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* Prevent iOS rubber banding */
    overscroll-behavior: none;
}

/* --- Language Toggle --- */
#lang-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#lang-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#lang-toggle:active {
    transform: scale(0.95);
}

/* --- Share Button --- */
#share-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}

#share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#share-btn:active {
    transform: scale(0.95);
}

/* --- Toast Notification --- */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Ambient Background --- */
#ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* Blurred Avatar Background Layer */
#ambient-bg::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: url('./使用者頭像.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(50px);
    /* Strong blur */
    opacity: 0.8;
}

/* Dark Overlay for Text Readability */
#ambient-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    /* Dark tint */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.8));
}

.orb {
    /* Optional: Keep orbs as subtle highlights over the image, or remove them.
       Let's keep them very subtle for that "Premium tint" feeling */
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: drift 20s infinite alternate ease-in-out;
    z-index: 0;
}

/* --- Profile & Integrated Player --- */
.profile-header {
    text-align: center;
    margin-bottom: 1.5rem;
    /* Reduced margin */
    transform: translateZ(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-wrapper {
    position: relative;
    width: 180px;
    /* Increased size integration */
    height: 180px;
    margin: 0 auto 1rem;
    cursor: pointer;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.avatar-wrapper:active {
    transform: scale(0.95);
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Play Overlay styling */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    /* Rounded for play button feel */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    z-index: 3;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 4px;
    /* Optical center for play icon */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* --- Info Layer (Home Screen / Background Info) --- */
.info-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
    /* Increased to ensure social buttons are clickable */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15vh;
    padding-bottom: 20vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Desktop: Show info layer on left side, always visible */
@media (min-width: 769px) {
    .info-layer {
        width: 40%;
        max-width: 500px;
        opacity: 1;
        pointer-events: auto;
        padding: 80px 60px;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, transparent 100%);
        align-items: flex-start;
        /* Changed from flex-end to flex-start */
        justify-content: center;
        text-align: left;
        /* Changed from right to left */
    }

    .bio-content {
        text-align: left !important;
        align-items: flex-start;
        width: 100%;
        position: relative;
        padding-left: 20px;
    }

    /* Decorative accent line */
    .bio-content::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
        border-radius: 2px;
    }

    .bio-name {
        font-size: 3rem !important;
        margin-bottom: 16px !important;
        letter-spacing: 0.02em !important;
        font-weight: 800 !important;
    }

    .bio-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 30px !important;
        opacity: 0.8;
    }

    .bio-divider {
        width: 80px !important;
        height: 3px !important;
        margin: 30px 0 !important;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2)) !important;
    }

    .bio-desc {
        text-align: left !important;
        font-size: 1.05rem !important;
        line-height: 2 !important;
        opacity: 0.9;
        margin-bottom: 40px !important;
    }

    .social-link {
        margin-left: 0;
        margin-right: auto;
        margin-bottom: 16px;
        max-width: 280px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .social-link:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(10px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }
}

/* Reveal State applied to BODY */
body.reveal-info .info-layer {
    opacity: 1;
    pointer-events: auto;
}

body.reveal-info .glass-card {
    transform: translateY(70vh) scale(0.98);
    /* Adjusted for two social buttons */
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    /* Shadow showing it's at bottom */
}

/* Allow clicking the minimized card to bring it back */
body.reveal-info .glass-card:hover {
    filter: brightness(1.1);
}

/* Handle Container */
.handle-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0 10px;
    cursor: pointer;
    cursor: grab;
    margin-bottom: 5px;
    position: relative;
    z-index: 250;
    touch-action: none;
}

.handle-container:active {
    cursor: grabbing;
}

.handle-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
    transition: opacity 0.3s;
    text-transform: uppercase;
    animation: fadeInHint 2s infinite alternate;
}

.handle-bar {
    width: 50px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.handle-container:hover .handle-bar {
    background: rgba(255, 255, 255, 0.8);
    width: 60px;
}

/* Drag Area (Minimal) */
.drag-area {
    width: 100%;
    padding: 20px 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: grab;
    touch-action: none;
}

.drag-area:active {
    cursor: grabbing;
}

.drag-area .handle-bar {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.drag-area:hover .handle-bar {
    background: rgba(255, 255, 255, 0.5);
    width: 50px;
}

.drag-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.drag-area:hover .drag-hint {
    opacity: 1;
}

/* Hide drag hint when revealed */
body.reveal-info .drag-hint {
    opacity: 0;
}

/* Desktop: Hide drag area */
@media (min-width: 769px) {
    .drag-area {
        display: none;
    }
}

/* Top Return Button Container */
.return-button-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.return-button-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.return-button-top:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.return-button-top:active {
    transform: scale(0.95);
}

.return-button-top i {
    font-size: 1rem;
}

/* Bio Decorative Elements */
.bio-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.bio-icon i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.bio-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    margin: 20px auto;
    border-radius: 2px;
}

/* Mobile: Show return button when revealed */
@media (max-width: 768px) {
    body.reveal-info .return-button-container {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Desktop specific */
@media (min-width: 769px) {
    .return-button-container {
        display: none;
    }

    .handle-container {
        display: none;
    }

    .bio-icon {
        width: 70px;
        height: 70px;
    }

    .bio-icon i {
        font-size: 1.8rem;
    }
}

/* Return Button (Inside info-layer) */
.return-button {
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
}

.return-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.return-button:active {
    transform: scale(0.95);
}

.return-button i {
    font-size: 1rem;
}

/* Mobile: Show return button when revealed */
@media (max-width: 768px) {
    body.reveal-info .return-button {
        display: flex;
    }
}

/* Desktop: Hide return button and pull-down mechanism */
@media (min-width: 769px) {
    .return-button {
        display: none !important;
    }

    .handle-container {
        display: none;
    }
}

/* Hide hint when revealed? Optional */

/* Bio Content Styles */
.bio-content {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
    width: 85%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    /* text-shadow: 0 4px 20px rgba(0,0,0,0.3); Removed heavy shadow for cleaner look */
}

.bio-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    color: #fff;
    background: linear-gradient(to right, #fff, #e2e8f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bio-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
    letter-spacing: 0.08em;
    font-weight: 400;
    text-align: center;
}

.bio-roles {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
    color: #fff;
}

.bio-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-weight: 400;
    font-family: 'Outfit', sans-serif;
    /* Keep consistent font */
    text-align: center;
    /* Center aligns poetry */
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 24px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    gap: 14px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
    width: 100%;
    max-width: 300px;
    position: relative;
    z-index: 200;
    cursor: pointer;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.social-link:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.3);
}

.social-link i {
    font-size: 1.4rem;
    min-width: 24px;
    text-align: center;
}

.social-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
}

.social-platform {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.social-desc {
    font-size: 0.8rem;
    opacity: 0.85;
    font-weight: 400;
}

/* Icon colors for brand recognition */
.facebook-link i {
    color: #1877F2;
}

.instagram-link i {
    color: #E4405F;
}

.youtube-link i {
    color: #FF0000;
}

/* Pause state adjustment */
.avatar-wrapper.playing .play-overlay {
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    /* Hide when playing for clean look, show on hover? Or just keep minimal */
    padding-left: 0;
}

.avatar-wrapper:hover .play-overlay,
.avatar-wrapper.playing:hover .play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--orb-1), var(--orb-2));
    filter: blur(25px);
    z-index: 0;
    border-radius: 24px;
    opacity: 0.5;
    transition: opacity 0.5s;
}

.avatar-wrapper.playing .avatar-glow {
    opacity: 0.8;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.9;
    }
}

.artist-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
    background: linear-gradient(to right, #fff, #cbd5e1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.album-title {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 10px;
}

/* Minimal Progress Bar */
.mini-progress-container {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, var(--orb-1), var(--orb-2));
    transition: width 0.1s linear;
}

/* --- 3D Card Container --- */
.card-container {
    perspective: 1000px;
    padding: 20px;
    width: 100%;
    max-width: 480px;
    z-index: 10;
    height: 100vh;
    /* Take full height for vertical centering/layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(30px);
    /* Increased blur */
    -webkit-backdrop-filter: blur(30px);
    border-radius: 32px;
    padding: 30px;
    box-shadow:
        0 40px 80px -12px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px inset var(--card-shine);
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    /* Smoother slide */
    position: relative;
    overflow: hidden;

    /* Layout constraints */
    max-height: 90vh;
    /* Ensure card doesn't exceed screen */
    display: flex;
    flex-direction: column;
}

/* --- Audio Player --- */
/* Removed old .audio-player-container styles */
/* Removed old .player-controls styles */
/* Removed old .play-btn styles */
/* Removed old .progress-container styles */
/* Removed old #progress-bar styles */
/* Removed old #progress-bar::-webkit-slider-thumb styles */
/* Removed old .now-playing-text styles */

/* --- Links List --- */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateZ(10px);
    /* Internal Scrolling */
    overflow-y: auto;
    padding-right: 5px;
    /* Space for scrollbar */
    flex-grow: 1;
    /* Allow list to take remaining space */
    min-height: 0;
    /* Important for flex child scrolling */

    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* --- Advanced Visual Animations (Phase 2) --- */

/* 1. Staggered Entrance Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    opacity: 0;
    /* Hidden initially */
    animation: slideInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger Delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

.delay-7 {
    animation-delay: 0.7s;
}

.delay-8 {
    animation-delay: 0.8s;
}

/* 2. Premium Shimmer Effect */
@keyframes shimmer {
    0% {
        transform: skewX(-20deg) translateX(-150%);
    }

    100% {
        transform: skewX(-20deg) translateX(150%);
    }
}

.shimmer {
    position: relative;
    overflow: hidden;
    /* Contain the shimmer */
}

/* Add the shimmer layer via pseudo-element */
.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    /* Wide enough to sweep */
    height: 100%;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            transparent 100%);
    transform: skewX(-20deg) translateX(-150%);
    pointer-events: none;
    /* Let clicks pass through */
    /* Run animation occasionally */
    animation: shimmer 6s infinite;
}

/* Hover triggers faster shimmer */
.shimmer:hover::after {
    animation: shimmer 1.5s infinite;
}

/* 3. Enhanced Music Pulse */
@keyframes pulse-strong {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
        /* orb-1 color */
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.9;
        box-shadow: 0 0 30px 10px rgba(236, 72, 153, 0.3);
        /* orb-2 color */
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.avatar-wrapper.playing .avatar-glow {
    opacity: 0.8;
    animation: pulse-strong 1.8s infinite ease-in-out;
    background: linear-gradient(45deg, var(--orb-1), var(--orb-2), var(--orb-3));
    background-size: 200% 200%;
    /* For gradient movement if we want */
}

/* Enhance styling for links to accommodate shimmer */
.link-item {
    /* Ensure relative positioning for shimmer absolute child */
    position: relative;
    /* Existing border radius should clip shimmer */
    overflow: hidden;
}

.links-list::-webkit-scrollbar {
    width: 4px;
}

.links-list::-webkit-scrollbar-track {
    background: transparent;
}

.links-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes clickPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.link-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--btn-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* Faster transition for touch */
    position: relative;
    overflow: hidden;
    /* For ripple effect */

    /* Animation Init */
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Add click animation class */
.link-item.clicking,
.social-link.clicking {
    animation: clickPulse 0.3s ease-out;
}

/* Staggered Delays */
.link-item:nth-child(1) {
    animation-delay: 0.1s;
}

.link-item:nth-child(2) {
    animation-delay: 0.2s;
}

.link-item:nth-child(3) {
    animation-delay: 0.3s;
}

.link-item:nth-child(4) {
    animation-delay: 0.4s;
}

.link-item:nth-child(5) {
    animation-delay: 0.5s;
}

.link-item:nth-child(6) {
    animation-delay: 0.6s;
}

.link-item:nth-child(7) {
    animation-delay: 0.7s;
}

.link-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.15);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.link-item:hover {
    background: var(--btn-hover);
    transform: translateY(-2px);
    /* Keep slight hover for desktop, overridden by active on touch */
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Mobile touch override - don't stick to hover state on tap */
@media (hover: none) {
    .link-item:hover {
        transform: none;
    }
}

.link-item[data-platform=\"spotify\"]:hover .link-icon {
    color: #1DB954;
}

.link-item[data-platform="apple"]:hover .link-icon {
    color: #FA243C;
}

.link-item[data-platform="kkbox"]:hover .link-icon {
    color: #00AADC;
}

.link-item[data-platform="youtube"]:hover .link-icon {
    color: #FF0000;
}

.link-text {
    flex-grow: 1;
    font-weight: 600;
    font-size: 1.05rem;
}

.link-action {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.link-item:hover .link-action {
    opacity: 1;
}

/* --- Footer --- */
.footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    transform: translateZ(5px);
    /* Improve footer spacing on mobile */
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.footer p {
    margin-bottom: 0.5rem;
}

.powered-by {
    opacity: 0.5;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* --- Mobile Adaptations --- */
@media (max-width: 768px) {
    body {
        /* Use dynamic viewport height for mobile browsers */
        height: 100dvh;
        align-items: flex-end;
        /* Align card to bottom for sheet effect */
    }

    .card-container {
        height: 100dvh;
        padding: 0;
        max-width: 100%;
        justify-content: flex-end;
        /* Push content to bottom */
    }

    .glass-card {
        border-radius: 24px 24px 0 0;
        /* Rounded top only */
        height: 85dvh;
        /* Take up most of the screen */
        max-height: 85dvh;
        width: 100%;
        padding: 40px 20px 30px;
        /* Increased top padding for handle */
        margin-bottom: 0;
        border-bottom: none;
        animation: slideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
        display: flex;
        flex-direction: column;
        position: relative;
    }

    /* Mobile specific adjustments to save space */
    .profile-header {
        margin-bottom: 1.5rem;
        flex-shrink: 0;
    }

    .avatar-wrapper {
        width: 160px;
        height: 160px;
        margin-bottom: 1rem;
    }

    .artist-name {
        font-size: 1.5rem;
    }

    .footer {
        margin-top: 1rem;
        flex-shrink: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}