/* 
    ============================================================================
    INDEX.CSS - MAIN STYLESHEET
    Organized into logical sections for better maintainability.
    ============================================================================
*/

/* ── Section 1: Setup ─────────────────────────────────────────────────────── */

@font-face {
    font-family: custom-font;
    src: url(../fonts/FiraCode.ttf);
    font-display: swap;
}

:root {
    --primary-color: #ffffff;
    --accent-color: #b69cff;
    --discord-color: #5865F2;
    --telegram-color: #24A1DE;
    --github-color: #ffffff;
    --guns-color: #ffde59;
    --eth-color: #627EEA;
    --btc-color: #F7931A;
    --bg-dark: #000000;
    --bg-card: rgba(255, 255, 255, 0.07);
    --bg-card-hover: rgba(255, 255, 255, 0.15);
    --border-color: rgba(255, 255, 255, 0.12);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    font-family: custom-font;
    user-select: none;
    -webkit-user-drag: none;
    box-sizing: border-box;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-size: cover;
    background-position: center center;
    display: flex;
    flex-direction: column;
    color: #fff;
    background-color: var(--bg-dark);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ── Section 2: Layout ────────────────────────────────────────────────────── */

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    top: 0;
    left: 0;
}

#vidx {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: -1;
}

.pixelated {
    width: 100%;
    height: 100%;
    z-index: -3;
    position: absolute;
    pointer-events: none;
}

.landing {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    z-index: 1;
    position: relative;
    overflow: hidden;
}

.border {
    padding: 20px 25px;
    width: 100%;
    max-width: 38rem;
    max-height: 95vh;
    border-radius: 35px;
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInSlideUp 1s cubic-bezier(0.23, 1, 0.32, 1);
    text-align: center;
    position: relative;
    overflow-y: auto;
    scrollbar-width: none; /* Hide scrollbar for Chrome/Safari */
}

.border::-webkit-scrollbar {
    display: none;
}

#enter {
    background-color: #000000;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 100%;
    height: 100%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    position: fixed;
    top: 0;
    left: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.enter-text {
    font-size: 24px;
    letter-spacing: 2px;
    animation: pulse 2s infinite ease-in-out;
}

/* ── Section 3: Typography & Text Effects ─────────────────────────────────── */

.username-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.customglow-username {
    font-size: 32px;
    background: linear-gradient(to bottom, #fff 30%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    line-height: 2.2rem;
    filter: drop-shadow(0 0 15px rgba(182, 156, 255, 0.4));
    letter-spacing: 1.5px;
    margin: 0;
}

.description {
    font-size: 17px;
    margin: 14px auto;
    color: #ffffff;
    max-width: 90%;
    display: block;
    text-align: center;
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.description span.wrap {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.typewrite>.wrap {
    border-right: 0.08em solid #fff;
}

/* ── Section 4: Profile Components ────────────────────────────────────────── */

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 5px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
}

.avatar:hover {
    transform: scale(1.05);
}

.role-icon-wrapper {
    padding: 7px 10px 1.5px;
    border-radius: 50px;
    max-width: fit-content;
    display: inline-flex;
    place-items: center;
    margin: 2px auto 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.role-icon {
    display: inline-block;
    position: relative;
    cursor: pointer;
    margin: 0 5px;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.role-icon.active {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(182, 156, 255, 0.3);
    transform: scale(1.15);
}

.role-icon img {
    width: 26px;
    height: 26px;
    display: block;
}

.role-icon:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.05);
}

.social-icons {
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.icon-link {
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-link:hover {
    transform: translateY(-5px) scale(1.1);
}

.icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
    transition: var(--transition-fast);
    fill: #ffffff;
}

.icon-link[data-url*="discord"]:hover .icon {
    fill: var(--discord-color);
    filter: drop-shadow(0 0 12px var(--discord-color));
}

.icon-link[data-url*="t.me"]:hover .icon {
    fill: var(--telegram-color);
    filter: drop-shadow(0 0 12px var(--telegram-color));
}

.icon-link[data-url*="github"]:hover .icon {
    fill: var(--github-color);
    filter: drop-shadow(0 0 12px var(--github-color));
}

.icon-link[data-url*="guns.lol"]:hover .icon {
    fill: var(--guns-color);
    filter: drop-shadow(0 0 12px var(--guns-color));
}

.crypto-link[data-address^="0x"]:hover .icon {
    fill: var(--eth-color);
    filter: drop-shadow(0 0 12px var(--eth-color));
}

.crypto-link[data-address^="1"]:hover .icon {
    fill: var(--btc-color);
    filter: drop-shadow(0 0 12px var(--btc-color));
}

.crypto-link[data-address^="3"]:hover .icon {
    fill: var(--btc-color);
    filter: drop-shadow(0 0 12px var(--btc-color));
}

.crypto-link {
    position: relative;
    display: inline-block;
    margin: 0 4px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.crypto-link:hover {
    transform: translateY(-3px) scale(1.1);
}

/* ── Section 5: Tooltips ──────────────────────────────────────────────────── */

.tooltip-new,
.tooltip-text {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.has-tooltip {
    position: relative;
}

.has-tooltip:hover .tooltip-new,
.has-tooltip:hover .tooltip-text,
.role-icon:hover .tooltip-new {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Section 6: Discord & Presence ────────────────────────────────────────── */

#discordrpc {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.discord-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 10px;
    width: 100%;
    max-width: 400px;
    transition: var(--transition-smooth);
    animation: fadeIn 1s ease-out 0.5s backwards;
}

.discord-card:hover {
    background-color: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.discord-main {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.discord-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.discord-avatar {
    width: 65px;
    height: 65px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    object-fit: cover;
}

.discord-status-icon {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    background-color: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    border: 2px solid #111;
}

.discord-status-icon svg {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

.discord-info {
    flex: 1;
    min-width: 0;
}

.discord-username {
    color: #fff;
    margin: 0 0 2px 0;
    font-size: 18px;
    font-weight: 600;
}

.discord-activity-text {
    color: #99aab5;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.discord-images {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
}

.discord-large-img {
    height: 64px;
    width: 64px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.discord-small-img {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    position: absolute;
    bottom: -6px;
    right: -6px;
    border: 3px solid #111;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.discord-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    margin-left: 77px;
    justify-content: flex-start;
}

.platformIcon__39ec2 {
    width: 18px;
    height: 13px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: #ff0000;
    flex-shrink: 0;
}

.activity-button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.activity-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ── Spotify Player Revamp ─────────────────────────────────────────────── */

/* ── YouTube Player Styles ────────────────────────────────────────────── */
.youtube-card {
    position: relative;
    overflow: hidden;
    padding: 16px !important;
    background: rgba(15, 15, 15, 0.8) !important;
    border: 1px solid rgba(255, 0, 0, 0.15) !important;
}

.youtube-layout {
    display: flex;
    gap: 15px;
    align-items: center;
}

.youtube-thumbnail-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.youtube-play-overlay {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.youtube-play-overlay svg {
    margin-left: 2px;
    fill: #fff;
}

.youtube-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.youtube-header-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.youtube-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #99aab5;
    letter-spacing: 0.5px;
}

.youtube-title {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    display: block;
    margin-bottom: 2px;
    line-height: 1.3;
}

.youtube-channel {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 8px;
}

.youtube-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 4px;
}

.youtube-progress-bar {
    height: 100%;
    background: #ff0000;
    border-radius: 2px;
    width: 0%;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.youtube-timestamps {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Fira Code', monospace;
}

/* Presence Transition Animations */
.presence-switching {
    opacity: 0 !important;
    transform: scale(0.92) translateY(15px) rotateX(10deg) !important;
    filter: blur(12px) grayscale(1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.presence-switched {
    animation: presenceRevealCustom 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes presenceRevealCustom {
    0% {
        opacity: 0;
        transform: scale(1.08) translateY(-15px) rotateX(-10deg);
        filter: blur(15px) brightness(1.5);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0);
        filter: blur(0) brightness(1);
    }
}

.spotify-card {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: rgba(10, 10, 10, 0.6) !important;
}

.spotify-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.4);
    opacity: 0.6;
    z-index: 0;
    transition: background-image 0.8s ease-in-out;
}

.spotify-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    padding: 16px;
    align-items: center;
}

.spotify-album-wrapper {
    position: relative;
    width: 85px;
    height: 85px;
}

.spotify-album-art {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.spotify-sound-waves {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 15px;
}

.sound-wave {
    width: 3px;
    background: #1DB954;
    border-radius: 2px;
    animation: wave 1.2s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        height: 4px;
    }

    50% {
        height: 15px;
    }
}

.spotify-info {
    display: flex;
    flex-direction: column;
    text-align: center;
    min-width: 0;
    align-items: center;
}

.spotify-track {
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.spotify-artist {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.spotify-controls {
    width: 100%;
    margin-top: 4px;
}

.spotify-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}

.spotify-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1DB954, #1ed760);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.4);
    width: 0%;
}

.spotify-timestamps {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Fira Code', monospace;
}

.spotify-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    align-items: center;
}

.spotify-lyrics-toggle,
.spotify-open-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spotify-lyrics-toggle:hover,
.spotify-lyrics-toggle.active,
.spotify-open-link:hover {
    color: #1DB954;
    transform: scale(1.1);
}

.spotify-lyrics-view {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 10;
    padding: 15px;
    box-sizing: border-box;
    border-radius: 16px;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.spotify-lyrics-view.active {
    display: flex;
}

.spotify-lyrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.spotify-lyrics-header span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #1DB954;
}

.spotify-lyrics-content {
    flex: 1;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    scrollbar-width: none;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.spotify-lyrics-content::-webkit-scrollbar {
    display: none;
}

.spotify-lyrics-text {
    white-space: pre-line;
    padding: 10px 0;
    text-align: center;
    font-weight: 500;
}

.lyric-line {
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 0 30px;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', 'Noto Sans Arabic', sans-serif;
    font-weight: 500;
    line-height: 1.4;
    margin: 12px 0;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0.6; /* High Visibility Base */
    filter: none !important; /* Removed all blur */
    transform: scale(1);
    color: #fff;
    text-align: left;
}

.lyric-line.active {
    opacity: 1;
    filter: blur(0);
    transform: scale(1.05);
    font-weight: 800;
}

/* High-Visibility Arabic Overrides */
.lyric-line.rtl-lyrics {
    font-size: 1.35em;
    line-height: 1.6;
    opacity: 0.65;
    filter: none !important;
    direction: rtl;
    text-align: right;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
}

.lyric-line.rtl-lyrics.active {
    font-weight: 900;
    transform: scale(1.02);
}

.lyric-line.passed {
    opacity: 0.2;
    filter: blur(0);
}

.lyric-word {
    display: inline;
    transition: all 0.4s ease;
    opacity: 0.5;
    color: #fff;
    position: relative;
    margin: 0; /* Removed margin to fix spacing gaps */
}

.lyric-line.active .lyric-word.active {
    opacity: 1;
    color: #fff !important; /* Solid White for max visibility */
    -webkit-text-fill-color: #fff !important;
    font-weight: 900;
    filter: drop-shadow(0 0 12px rgba(29, 185, 84, 0.8));
    text-shadow: 0 0 5px rgba(29, 185, 84, 1);
}

/* Presence Transition Animations */
.presence-switching {
    opacity: 0 !important;
    transform: scale(0.95) translateY(10px) !important;
    filter: blur(10px);
}

.presence-switched {
    animation: presenceReveal 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes presenceReveal {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(15px);
        filter: blur(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.lyric-instrumental {
    letter-spacing: 0.5em;
    animation: pulseDots 2s infinite ease-in-out;
    font-size: 20px;
    padding: 10px 0;
    pointer-events: none;
}

@keyframes pulseDots {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.spotify-lyrics-snippet {
    font-size: 13px;
    color: #fff;
    font-style: normal;
    margin-top: 8px;
    display: none;
    -webkit-line-clamp: 3; /* Increased from 2 to 3 for longer phrases */
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    line-height: 1.5;
    animation: lyricSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', 'Noto Sans Arabic', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    padding: 2px 15px; /* Increased padding to protect animated words */
}

/* Snippet Arabic legibility */
.spotify-lyrics-snippet.rtl-lyrics {
    font-size: 15px;
    line-height: 1.7;
}

.spotify-lyrics-snippet .lyric-word {
    opacity: 0.5;
    transition: all 0.3s ease;
    display: inline;
    margin: 0 2px;
    position: relative;
    color: #fff;
}

.spotify-lyrics-snippet .lyric-word.active {
    opacity: 1;
    background: linear-gradient(135deg, #1DB954, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    filter: drop-shadow(0 0 8px rgba(29, 185, 84, 0.4));
}

.spotify-lyrics-snippet:hover {
    transform: scale(1.02);
}

@keyframes lyricSlideIn {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Discord Invite */
.discord-activity {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.premium-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 18px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    transition: var(--transition-smooth);
    text-align: left;
    /* Default to left for card content */
    cursor: pointer;
}

.premium-card:hover {
    background-color: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Duplicate Section Removed - Consolidated above */

.discord-card {
    animation: fadeIn 1s ease-out 0.5s backwards;
}

.DiscordServerLO1 {
    width: 100%;
    margin-top: 15px;
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.DiscordServerLO2 {
    width: 100%;
}

.DiscordServerLO3 {
    display: flex;
    align-items: center;
    gap: 15px;
}

.DiscordServerLO3 img {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.DiscordServerLO4 {
    text-align: left;
    flex: 1;
}

.DiscordServerLO4 h1 {
    font-size: 16px;
    margin: 0 0 4px 0;
    color: #fff;
    font-weight: 600;
}

.DiscordServerLO4 h3 {
    font-size: 12px;
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Section 7: Projects & Repos ─────────────────────────────────────────── */

.projects-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 450px));
    gap: 25px;
    justify-content: center;
    width: 100%;
}

.projects-toggle {
    margin: 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.projects-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

border-color: var(--accent-color);
transform: translateY(-3px);
}

.projects-section {
    display: none;
    margin-top: 25px;
    max-height: 450px;
    overflow-y: auto;
    padding: 10px;
    animation: slideDownFadeIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.repo-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 15px;
    transition: var(--transition-smooth);
    text-align: center;
    display: block;
    text-decoration: none;
}

.repo-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.repo-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.repo-card p {
    font-size: 0.88rem;
    color: #ccc;
    margin: 8px 0;
    line-height: 1.5;
}

.repo-stats {
    display: flex;
    gap: 18px;
    font-size: 0.82rem;
    color: #999;
    margin-top: 12px;
    justify-content: center;
}

.repo-card-footer {
    margin-top: 15px;
}

.repo-card-btn {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    border: 1px solid rgba(182, 156, 255, 0.3);
    padding: 6px 18px;
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.repo-card:hover .repo-card-btn {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    transform: scale(1.05);
}

/* ── Section 8: Modals ───────────────────────────────────────────────────── */

.modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 35px;
    border-radius: 30px;
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.repo-modal-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 30px;
    width: 100%;
}

.repo-modal-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.repo-modal-btn.primary {
    background: #ffffff;
    color: #000000;
    border: none;
}

.repo-modal-btn:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(182, 156, 255, 0.2);
}

.repo-modal-btn.primary:hover {
    background: #e0e0e0;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 36px;
    height: 36px;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.25s ease, border-color 0.2s ease;
    z-index: 10;
    user-select: none;
    flex-shrink: 0;
}

.close-modal:hover {
    background: rgba(255, 80, 80, 0.25);
    border-color: rgba(255, 80, 80, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.markdown-body {
    max-height: 60vh;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
    padding-right: 10px;
    color: #eee;
}

.markdown-body a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.markdown-body a:hover {
    text-decoration: underline;
    filter: brightness(1.2);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-top: 24px;
    color: #fff;
}

/* ── Section 9: Utilities ────────────────────────────────────────────────── */

.visitor-stats,
#location-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 10px 5px;
    font-size: 14px;
    color: #eee;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s infinite linear;
}

.skeleton-line {
    height: 15px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.long {
    width: 80%;
}

.view-transition {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view-hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* ── Section 10: Animations ──────────────────────────────────────────────── */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes skeletonPulse {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* ── Section 11: Media Queries ───────────────────────────────────────────── */

@media (max-width: 600px) {
    .border {
        width: 95%;
        padding: 25px 15px;
        border-radius: 25px;
    }

    .customglow-username {
        font-size: 26px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    /* Keep RPC horizontal like PC version */
    .discord-main {
        flex-direction: row;
        text-align: left;
        gap: 12px;
    }

    .discord-info {
        text-align: left;
    }

    .discord-buttons {
        margin-left: 77px;
        justify-content: flex-start;
    }

    .discord-images {
        margin-left: auto;
    }
}

/* Avatar Grid Styles — canonical section */
.avatars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* Loading spinner inside grid must span all columns */
.avatars-grid>div:only-child {
    grid-column: 1 / -1;
}

.avatar-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
    background: rgba(0, 0, 0, 0.2);
}

.avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-item:hover {
    transform: scale(1.08) translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-color);
}

/* ── Section 12: Image Gallery Modal ─────────────────────────────────────── */

.image-modal-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.img-zoom-container {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
    margin: 20px 0;
}

.img-zoom-container img {
    max-width: 90%;
    max-height: 75vh;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.1s ease-out;
}

.img-modal-controls {
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.img-ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
}

.img-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.img-ctrl-btn:active {
    transform: scale(0.95);
}

.img-modal-sep {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

#zoom-level-label {
    font-size: 14px;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.img-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.img-nav-prev {
    left: 40px;
}

.img-nav-next {
    right: 40px;
}

.repo-language-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 12px currentColor, 0 0 4px currentColor;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Markdown Alerts ─────────────────────────────────────────────────────── */

.markdown-alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 4px solid #30363d;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.markdown-alert-note {
    border-left-color: #1f6feb;
}

.markdown-alert-note .alert-title {
    color: #4493f8;
}

.markdown-alert-tip {
    border-left-color: #238636;
}

.markdown-alert-tip .alert-title {
    color: #3fb950;
}

.markdown-alert-important {
    border-left-color: #8957e5;
}

.markdown-alert-important .alert-title {
    color: #a371f7;
}

.markdown-alert-warning {
    border-left-color: #d29922;
}

.markdown-alert-warning .alert-title {
    color: #d29922;
}

.markdown-alert-caution {
    border-left-color: #da3633;
}

.markdown-alert-caution .alert-title {
    color: #f85149;
}

.alert-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

/* duplicate rules removed — canonical versions are in Section 12 */

/* Avatar Preview Styles */
.avatar-preview-overlay {
    background: rgba(5, 5, 5, 0.9) !important;
    backdrop-filter: blur(25px) saturate(150%);
}

.avatar-preview-content {
    max-width: 550px !important;
    padding: 30px !important;
    background: rgba(20, 20, 20, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 30px !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8) !important;
    overflow: visible !important;
}

.avatar-preview-content h2 {
    font-size: 24px;
    margin-top: 0;
    background: linear-gradient(to right, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.avatar-zoom-container {
    width: 100%;
    max-height: 500px;
    margin: 25px 0 10px 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    cursor: grab;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.avatar-zoom-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease-out, opacity 0.2s ease-in-out;
}

.avatar-preview-controls-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.avatar-preview-content button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 25px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition-smooth);
    width: 100%;
}

.avatar-preview-content button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.avatar-preview-content button.primary {
    background: var(--accent-color);
    color: #000;
    border: none;
}

.avatar-preview-content button.primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(182, 156, 255, 0.4);
}

.avatar-preview-count {
    position: absolute;
    top: 25px;
    left: 30px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    font-weight: 600;
}

.avatar-preview-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    margin-bottom: 20px;
    padding: 15px;
}

.avatar-preview-details .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.avatar-preview-details .label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
}

.avatar-preview-details .value {
    color: #fff;
    font-size: 14px;
}

.avatar-preview-footer {
    display: flex;
    gap: 12px;
}

/* second duplicate avatar grid removed — canonical above */

/* Open Raw & Open Link */
.img-link-wrapper {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 15px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.img-open-link-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.img-link-wrapper:hover .img-open-link-btn {
    opacity: 1;
    transform: translateY(0);
}

.img-open-link-btn:hover {
    background: var(--accent-color);
    color: #000 !important;
    border-color: var(--accent-color);
    transform: scale(1.05);
}

/* ── Section 14: GitHub Markdown Content ────────────────────────────────── */

.markdown-body {
    color: #e6edf3;
    font-family: inherit;
    line-height: 1.6;
    word-wrap: break-word;
    text-align: left;
}

.markdown-body a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.markdown-body a:hover {
    text-decoration: underline;
    filter: brightness(1.2);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.3em;
}

.markdown-body code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(110, 118, 129, 0.4);
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
}

.markdown-body pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: rgba(1, 4, 9, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    font-size: 100%;
}

.markdown-alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 4px solid;
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.03);
}

.markdown-alert-note {
    border-left-color: #2f81f7;
}

.markdown-alert-tip {
    border-left-color: #3fb950;
}

.markdown-alert-important {
    border-left-color: #a371f7;
}

.markdown-alert-warning {
    border-left-color: #d29922;
}

.markdown-alert-caution {
    border-left-color: #f85149;
}

.alert-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
}

.markdown-body img {
    transition: var(--transition-smooth);
}

.markdown-body img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

/* ── Section 15: Sound Control Widget ────────────────────────────────────── */

.sound-control {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 10px 14px;
    transition: background 0.3s ease, border-color 0.3s ease,
        box-shadow 0.3s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    user-select: none;
    cursor: default;
    transform: translateX(-10px) scale(0.92);
    /* initial hidden state, JS animates in */
}

.sound-control:hover {
    background: rgba(18, 18, 18, 0.75);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(182, 156, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

/* Muted state */
.sound-control.muted {
    border-color: rgba(255, 80, 80, 0.28);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 14px rgba(255, 80, 80, 0.08);
}

/* ── Icon area ── */
.sound-icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sound-icon-wrapper:hover {
    transform: scale(1.2);
}

.sound-icon-wrapper:active {
    transform: scale(0.9);
}

.sound-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.85);
    opacity: 0;
    transform: scale(0.65) rotate(-15deg);
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.sound-svg.active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Muted icon — red stroke */
.sound-control.muted #icon-vol-mute {
    stroke: rgba(255, 100, 100, 0.95);
}

/* ── Slider panel (hidden → expands on hover) ── */
.sound-slider-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    transition: max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease,
        margin-left 0.35s ease;
    padding: 5px 0;
    /* Extra vertical space for thumb shadows */
}

.sound-control.expanded .sound-slider-panel {
    max-width: 160px;
    opacity: 1;
    margin-left: 12px;
    overflow: visible;
    /* Allow thumb shadows and scaling without clipping */
}

/* Custom range input */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    background: transparent;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
}

/* Track — WebKit */
.volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(to right,
            var(--accent-color) 0%,
            var(--accent-color) var(--fill, 50%),
            rgba(255, 255, 255, 0.15) var(--fill, 50%),
            rgba(255, 255, 255, 0.15) 100%);
    transition: height 0.2s ease;
}

.volume-slider:hover::-webkit-slider-runnable-track {
    height: 6px;
}

/* Thumb — WebKit */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(182, 156, 255, 0.4), 0 2px 5px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    margin-top: -4px;
    /* Center thumb on 4px track */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.2s ease;
}

.volume-slider:hover::-webkit-slider-thumb {
    transform: scale(1.25);
    box-shadow: 0 0 0 3px rgba(182, 156, 255, 0.5), 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Track — Firefox */
.volume-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(to right,
            var(--accent-color) 0%,
            var(--accent-color) var(--fill, 50%),
            rgba(255, 255, 255, 0.15) var(--fill, 50%),
            rgba(255, 255, 255, 0.15) 100%);
    transition: height 0.2s ease;
}

.volume-slider:hover::-moz-range-track {
    height: 6px;
}

/* Thumb — Firefox */
.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 0 0 2px rgba(182, 156, 255, 0.4), 0 2px 5px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.volume-slider:hover::-moz-range-thumb {
    transform: scale(1.25);
    box-shadow: 0 0 0 3px rgba(182, 156, 255, 0.5), 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Volume percentage label */
.volume-label {
    font-size: 10px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Fira Code', monospace;
    min-width: 28px;
    text-align: right;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.sound-control.expanded .volume-label {
    color: rgba(255, 255, 255, 0.85);
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .sound-control {
        top: 14px;
        left: 14px;
        padding: 8px 12px;
    }

    .volume-slider {
        width: 72px;
    }

    .sound-control.expanded .sound-slider-panel {
        max-width: 120px;
    }
}

/* ── Discord Activity Cards ── */
.additional-activity-card {
    background: #111214 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    margin-top: 8px !important;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

.activity-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.activity-header-text {
    font-size: 11px;
    font-weight: 700;
    color: #dbdee1;
    text-transform: capitalize;
}

.activity-more-icon {
    color: #b5bac1;
    opacity: 0.6;
    letter-spacing: 1px;
    font-size: 14px;
}

.activity-content-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.activity-image-wrapper {
    position: relative;
    flex-shrink: 0;
}

.activity-main-image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    transform: rotate(-8deg);
    /* Tilted look from screenshot */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.additional-activity-card:hover .activity-main-image {
    transform: rotate(0deg) scale(1.05);
}

.activity-info-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

.activity-title-text {
    font-size: 14px;
    font-weight: 800;
    color: #f2f3f5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-stats-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #949ba4;
}

.activity-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.activity-elapsed-green {
    color: #23a55a;
    font-weight: 600;
}

.activity-details-text {
    font-size: 12px;
    color: #b5bac1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tooltip-down { bottom: auto !important; top: calc(100% + 12px) !important; transform: translateX(-50%) translateY(-5px) !important; }
.has-tooltip:hover .tooltip-down { transform: translateX(-50%) translateY(0) !important; }
