/* RESET & BASE STYLES */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --text-color: #ffffff;
    --secondary-text-color: #b0b0b0;
    --accent-color: #00aaff;
    --background-overlay: rgba(0, 0, 0, 0.4);
    --transition-speed: 0.3s;
}
html, body { height: 100%; overflow-x: hidden; }
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    position: relative;
    background: #000;
}

/* INTERACTIVE ELEMENTS OUTLINES */
.share-btn:hover, .link-item:hover, .control-btn:hover, .mute-btn:hover, .badge:hover {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
}

/* LOADING SCREEN */
.loading-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; display: flex; justify-content: center; align-items: center;
    z-index: 10000; transition: opacity var(--transition-speed) ease; cursor: pointer;
}
.loading-screen::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    backdrop-filter: blur(20px); z-index: 1;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-content { position: relative; z-index: 2; text-align: center; }
.loading-text {
    color: var(--text-color); font-size: 24px; font-weight: 500;
    animation: pulseEye 2s infinite alternate;
}


@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* BACKGROUND */
.background-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; overflow: hidden;
}
.background-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--background-overlay); z-index: 1;
}
.background-video, .background-image {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%; object-fit: cover; z-index: 0;
}

/* AUDIO VISUALIZER */
.audio-visualizer {
    position: absolute; bottom: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
    opacity: 0.4; /* VÄ›tĹˇĂ­ neprĹŻhlednost podle pĹ™ĂˇnĂ­ (vĂ­ce viditelnĂ©) */
}

/* MAIN CONTAINER */
.main-container {
    min-height: 100vh; position: relative; z-index: 10;
    padding: 40px 20px; display: flex; justify-content: center; align-items: center;
    transition: opacity var(--transition-speed) ease;
}
.main-container.hidden { opacity: 0; pointer-events: none; }
.content-wrapper {
    max-width: 400px; width: 100%;
    animation: unboxFromCenter 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes unboxFromCenter {
    0% { opacity: 0; transform: scale(0); }
    60% { opacity: 1; transform: scale(1.35); }
    100% { opacity: 1; transform: scale(1.25); }
}

/* PROFILE SECTION */
.profile-section {
    background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px; padding: 15px;
    /* Using inset box-shadow instead of border to prevent WebKit flicker bug */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    position: relative;
    margin-bottom: 12px; text-align: center;
    transform: translateZ(0); backface-visibility: hidden;
}
.top-right-container {
    position: absolute; top: 15px; right: 15px; z-index: 2;
}
.share-btn {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s ease;
}
.share-btn:hover {
    background: rgba(255, 255, 255, 0.15); transform: scale(1.05);
}
.bottom-stats-container {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    margin-top: 15px; padding: 0 10px; color: #b3b3b3; font-size: 13px; font-weight: 500;
}
.location-container, .views-container {
    display: flex; align-items: center; gap: 6px;
}
.stat-separator {
    color: #555; margin: 0 2px;
}
.tooltip-parent {
    position: relative; cursor: default;
}
.stat-tooltip {
    position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.9); color: #fff; padding: 6px 10px;
    border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 0.2s, bottom 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1); z-index: 10;
}
.tooltip-parent:hover .stat-tooltip {
    opacity: 1; bottom: 150%;
}
.profile-header {
    display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 18px;
    text-align: center; position: relative;
}
.profile-image-container {
    position: relative;
}
.profile-image {
    width: 75px; height: 75px; border-radius: 50%; object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    --glow-color: rgba(255, 255, 255, 0.6); /* Default color fallback */
}
.profile-image:hover {
    transform: scale(1.05); box-shadow: 0 0 40px var(--glow-color);
}
.bio {
    font-size: 13px; color: #ffffff; line-height: 1.4;
    margin-bottom: 15px; text-align: center; width: 100%; padding: 0 5px;
}
.profile-info { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.display-name {
    font-size: 22px; font-weight: 700; text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}
.username { font-size: 13px; color: var(--secondary-text-color); margin-bottom: 2px; }

/* BADGES */
.badges-container { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.badge {
    width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.3s ease; position: relative;
}
.badge:hover { transform: scale(1.1); filter: drop-shadow(0 0 8px currentColor); }
.badge-tooltip {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.9); padding: 8px 12px; border-radius: 6px; font-size: 12px;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.3s;
}
.badge:hover .badge-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* LINKS */
.links-container {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; padding: 0 5px;
}
.link-item {
    width: 45px; height: 45px; background: transparent; backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: var(--text-color); transition: all 0.3s ease; position: relative;
}
.link-item:hover { transform: translateY(-3px) scale(1.1); }
.link-icon { width: 26px; height: 26px; }
.link-hover-text {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.9); padding: 6px 10px; border-radius: 6px; font-size: 11px;
    white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.3s;
}
.link-item:hover .link-hover-text { opacity: 1; transform: translateX(-50%) translateY(0); }

/* MUTE BUTTON & VOLUME SLIDER */
.volume-container {
    position: fixed; top: 20px; left: 20px; z-index: 1000;
    display: flex; align-items: center; gap: 10px;
}
.mute-btn {
    width: 50px; height: 50px; flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%;
    color: var(--text-color); font-size: 24px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
.mute-btn:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.1); }

.volume-slider-wrapper {
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px;
    height: 40px; display: flex; align-items: center;
    width: 0; opacity: 0; padding: 0; overflow: hidden; pointer-events: none;
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}
.volume-container:hover .volume-slider-wrapper {
    width: 120px; opacity: 1; pointer-events: auto; padding: 0 15px;
}
.volume-slider {
    -webkit-appearance: none; width: 100%; height: 4px; border-radius: 2px;
    background: rgba(255, 255, 255, 0.3); outline: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 14px; height: 14px; border-radius: 50%; background: #ffffff; cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}



/* MUSIC PLAYER */
.music-player {
    background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px; padding: 10px 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
    width: 100%; margin: 0 auto;
    transform: translateZ(0); backface-visibility: hidden;
    position: relative; overflow: hidden; /* Contains the visualizer canvas */
}
.music-player.hidden { display: none; }
.music-player-content { display: flex; gap: 10px; align-items: center; position: relative; z-index: 2; }
.album-art { width: 65px; height: 65px; border-radius: 6px; object-fit: cover; }
.music-info { flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding-right: 85px; }
.song-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; text-align: left; }
.artist-name { font-size: 11px; color: var(--secondary-text-color); margin-bottom: 6px; text-align: left; }
.progress-bar-container { width: 100%; margin-bottom: 6px; }
.progress-bar {
    width: 100%; height: 3px; background: rgba(255, 255, 255, 0.2);
    border-radius: 2px; cursor: pointer; margin-bottom: 4px;
}
.progress-fill { height: 100%; background: var(--accent-color); width: 0%; border-radius: 2px; transition: 0.1s; }
.time-display { display: flex; justify-content: space-between; font-size: 10px; color: var(--secondary-text-color); }
.control-buttons { display: flex; gap: 6px; justify-content: center; position: absolute; right: 0; bottom: 0; top: 0; align-items: center; }
.control-btn {
    background: transparent; border: none; color: #fff;
    width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
.control-btn:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.15); }

/* EASTER EGG STYLES */
.easter-egg-trigger {
    position: fixed; bottom: 15px; right: 15px;
    width: 12px; height: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%; z-index: 9999;
    cursor: default;
}
.easter-egg-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.black-hole {
    position: fixed; bottom: 21px; right: 21px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #000; z-index: 9000;
    transform: scale(0);
    box-shadow: 
        0 0 0 2px rgba(255, 255, 255, 0.9), 
        0 0 15px 5px rgba(255, 255, 255, 0.8),
        0 0 40px 15px rgba(255, 255, 255, 0.3);
    pointer-events: none;
    transition: transform 1.5s cubic-bezier(0.5, 0, 0.1, 1);
}
.black-hole.active {
    transform: scale(25);
}

.lightbulb-container {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%); z-index: 9001;
    display: none; pointer-events: none;
}
.lightbulb-icon {
    width: 80px; height: 80px;
    filter: brightness(0.2) grayscale(1);
    transition: filter 0.3s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0.8);
}
.lightbulb-icon.on {
    filter: brightness(1.2) drop-shadow(0 0 60px #ffeb3b) sepia(1) hue-rotate(-50deg) saturate(3);
    transform: scale(1.1);
}

.sucked-in {
    transform-origin: calc(100vw - 21px) calc(100vh - 21px);
    animation: simpleSuck 1.5s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}
@keyframes simpleSuck {
    0% { transform: scale(1); opacity: 1; filter: blur(0); }
    100% { transform: scale(0); opacity: 0; filter: blur(10px); }
}

.monster-eyes {
    position: fixed; top: 45%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex; gap: 40px; z-index: 9000;
    opacity: 0; pointer-events: none;
}
.monster-eye {
    width: 18px; height: 8px; background: rgba(255, 255, 255, 0.7);
    border-radius: 50%; box-shadow: 0 0 10px 4px rgba(255, 255, 255, 0.4);
    transform: rotate(5deg);
}
.monster-eye:nth-child(2) {
    transform: rotate(-5deg);
}

.fade-in-ui {
    animation: fadeInUI 1.5s ease forwards;
}
@keyframes fadeInUI {
    0% { opacity: 0; filter: blur(15px); }
    100% { opacity: 1; filter: blur(0); }
}

.easter-egg-text {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(0, 170, 255, 0.6);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1000;
}

.lightbulb {
    fill: #333;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    transition: filter 0.2s, fill 0.2s;
}
.lightbulb.on {
    fill: #fff;
    filter: drop-shadow(0 0 40px #fff) drop-shadow(0 0 80px #fff);
}

.mouse-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.top-left-container {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
}

.profile-section {
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

.profile-section.flipped-out {
    transform: perspective(1000px) rotateY(90deg);
}

.switch-icon-flipped {
    transform: rotate(180deg);
}


/* --- Gold Theme (Alter Ego) --- */
body.theme-gold .profile-section {
    background: rgba(20, 15, 0, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px 0 rgba(255, 215, 0, 0.15);
}

body.theme-gold .display-name {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

body.theme-gold .username {
    color: #ccaa00;
}

body.theme-gold .link-item {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

body.theme-gold .link-item:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

body.theme-gold .badge-tooltip, body.theme-gold .stat-tooltip, body.theme-gold .link-hover-text {
    background: rgba(25, 20, 0, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

body.theme-gold .progress-fill {
    background: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

body.theme-gold .volume-slider::-webkit-slider-thumb {
    background: #ffd700;
}

body.theme-gold .control-btn img, body.theme-gold .mute-btn img, body.theme-gold .share-btn img, body.theme-gold #switch-icon {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

body.theme-gold .song-title {
    color: #ffd700;
}

body.theme-gold .artist-name, body.theme-gold .time-display {
    color: #ccaa00;
}

/* Zlatý glow pro myš */
body.theme-gold #mouse-trail {
    filter: sepia(1) hue-rotate(340deg) saturate(5) brightness(1.2);
}


body.theme-gold .music-player {
    background: rgba(25, 20, 0, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.3);
}


/* CoreRP Button Glow Effect */
button#switch-profile-btn {
    transition: all 0.3s ease;
}
button#switch-profile-btn:hover {
    outline: 2px solid #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.5);
}
button#switch-profile-btn:hover img {
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}


/* --- Gold Theme Easter Egg --- */
body.theme-gold .easter-egg-text {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 170, 0, 0.6);
}

body.theme-gold .lightbulb.on {
    fill: #ffd700;
    filter: drop-shadow(0 0 40px #ffd700) drop-shadow(0 0 80px #ffd700);
}

body.theme-gold .monster-eye {
    background: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.5);
}

body.theme-gold .black-hole {
    box-shadow: 
        0 0 0 2px rgba(255, 215, 0, 0.9), 
        0 0 15px 5px rgba(255, 215, 0, 0.8),
        0 0 40px 15px rgba(255, 215, 0, 0.3);
}


/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 480px) {
    .content-wrapper {
        animation: unboxFromCenterMobile 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }
    .main-container {
        padding: 20px 15px;
    }
    .profile-section {
        padding: 12px 10px;
    }
    .top-right-container {
        top: 12px; right: 12px;
    }
    .top-left-container {
        top: 12px; left: 12px;
    }
    .share-btn {
        width: 24px; height: 24px;
    }
    .display-name {
        font-size: 20px;
    }
    .bio {
        font-size: 12px;
        padding: 0 2px;
    }
    .volume-container {
        top: 15px; left: 15px;
    }
    .mute-btn {
        width: 40px; height: 40px; font-size: 20px;
    }
    .volume-slider-wrapper {
        height: 34px;
    }
    .volume-container:hover .volume-slider-wrapper, .volume-container:active .volume-slider-wrapper {
        width: 100px; padding: 0 10px;
    }
    .music-player {
        padding: 8px 10px;
    }
    .album-art {
        width: 55px; height: 55px;
    }
    .music-info {
        padding-right: 70px;
    }
    .control-btn {
        width: 22px; height: 22px;
    }
    .link-item {
        width: 40px; height: 40px;
    }
    .link-icon {
        width: 22px; height: 22px;
    }
    .bottom-stats-container {
        font-size: 11px;
    }
}

@keyframes unboxFromCenterMobile {
    0% { opacity: 0; transform: scale(0); }
    60% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

