/* ===== VARIABLES ===== */
:root {
    --accent: 255, 255, 255;
    --accent-rgb: rgb(255, 255, 255);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #e0e0e0;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== VIDEO BACKGROUND ===== */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* ===== CONTAINER ===== */
.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 560px;
    padding: 20px;
    padding-bottom: 160px;
}

/* ===== CARD ===== */
.card {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(var(--accent), 0.08);
    border-radius: 24px;
    padding: 44px 30px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: cardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    transition: border-color 1s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent), 0.2), transparent);
    transition: background 1s ease;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== AVATAR ===== */
.avatar {
    width: 115px;
    height: 115px;
    min-width: 115px;
    min-height: 115px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--accent), 0.2);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    margin-bottom: 18px;
    background: #111;
    transition: all 0.4s ease, border-color 1s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(var(--accent), 0.1);
}

/* ===== TEXT ===== */
.displayname {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: -0.03em;
}

.username {
    font-size: 0.82rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 28px;
    letter-spacing: 0.02em;
}

/* ===== SOCIAL LINKS ===== */
.links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    color: #aaa;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.link-btn:hover {
    transform: translateY(-3px);
    color: #fff;
    background: rgba(var(--accent), 0.1);
    border-color: rgba(var(--accent), 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--accent), 0.08);
}

.link-btn:active {
    transform: translateY(0);
}

.link-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Staggered animation */
.link-btn:nth-child(1) { animation: linkSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.link-btn:nth-child(2) { animation: linkSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.link-btn:nth-child(3) { animation: linkSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.link-btn:nth-child(4) { animation: linkSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
.link-btn:nth-child(5) { animation: linkSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }

@keyframes linkSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== MUSIC PLAYER ===== */
.music-player {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
    max-width: 560px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#visualizer {
    width: 100%;
    height: 48px;
    margin-bottom: -6px;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(var(--accent), 0.14), rgba(0,0,0,0.2));
    box-shadow: inset 0 0 0 1px rgba(var(--accent), 0.08);
    border: 1px solid rgba(var(--accent), 0.12);
    border-bottom: none;
}

.player-body {
    width: 100%;
    background: linear-gradient(180deg, rgba(14,14,14,0.97), rgba(5,5,5,0.93));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(var(--accent), 0.18);
    border-radius: 20px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding: 16px 18px 14px;
    transition: border-color 1s ease, box-shadow 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 24px rgba(var(--accent), 0.08);
    position: relative;
    overflow: hidden;
}

.player-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--accent), 0.08), transparent 45%);
    pointer-events: none;
}

.player-top {
    display: grid;
    place-items: center;
    position: relative;
    margin-bottom: 14px;
    min-height: 20px;
}

.song-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f5f5f5;
    letter-spacing: 0.02em;
    text-align: center;
    text-shadow: 0 0 16px rgba(var(--accent), 0.12);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.song-time {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: #a7a7a7;
    font-variant-numeric: tabular-nums;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    margin-bottom: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    touch-action: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(var(--accent), 0.92), rgba(var(--accent), 0.6));
    border-radius: inherit;
    width: 0%;
    transition: background 1s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 12px rgba(var(--accent), 0.35);
}

.progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%) scale(1.15);
    width: 14px;
    height: 14px;
    background: var(--accent-rgb);
    border-radius: 50%;
    opacity: 1;
    transition: opacity 0.2s ease, background 1s ease, transform 0.2s ease;
    box-shadow: 0 0 16px rgba(var(--accent), 0.45);
}

/* ===== PLAYER CONTROLS ===== */
.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    min-height: 32px;
}

.ctrl-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #bbb;
    transition: all 0.2s ease;
}

.ctrl-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.ctrl-btn svg {
    width: 18px;
    height: 18px;
}

.play-btn {
    width: 46px;
    height: 46px;
    background: rgba(var(--accent), 0.16);
    border: 1px solid rgba(var(--accent), 0.32);
    color: #fff;
    transition: all 0.3s ease, background 1s ease, border-color 1s ease;
    box-shadow: 0 0 22px rgba(var(--accent), 0.12);
}

.play-btn:hover {
    background: rgba(var(--accent), 0.2);
    transform: scale(1.08);
}

.play-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== VOLUME ===== */
.volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px 4px 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(var(--accent), 0.1);
    border-radius: 999px;
}

.vol-btn {
    width: 28px;
    height: 28px;
}

.vol-btn svg {
    width: 16px;
    height: 16px;
}

.vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 72px;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(var(--accent), 0.8);
    cursor: pointer;
    transition: background 1s ease;
}

.vol-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(var(--accent), 0.8);
    border: none;
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .container {
        padding: 16px;
        padding-bottom: 150px;
    }
    .card {
        padding: 32px 20px;
        border-radius: 20px;
    }
    .avatar {
        width: 90px;
        height: 90px;
        min-width: 90px;
        min-height: 90px;
    }
    .displayname {
        font-size: 1.3rem;
    }
    .music-player {
        max-width: 100%;
        bottom: 10px;
    }
    .vol-slider {
        width: 50px;
    }
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(var(--accent), 0.2);
    color: #fff;
}

/* ===== PROTECTION ===== */
img, video {
    -webkit-user-drag: none;
    user-select: none;
}
