* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0a0a0f;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
}
body.light { background: #f0f0f5; }

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.35;
    filter: blur(2px) brightness(0.5);
    transition: opacity 0.4s ease;
}
body.light #bg-video { opacity: 0.15; }

.card {
    background: rgba(18, 16, 30, 0.75);
    border-radius: 24px;
    padding: 30px 28px 22px;
    max-width: 420px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.03);
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: cardFade 0.8s ease-out;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
body.light .card {
    background: rgba(240, 240, 245, 0.85);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}
@keyframes cardFade {
    0% { opacity: 0; transform: translateY(30px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.visitor-badge {
    position: absolute;
    top: 14px;
    right: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 4px;
}
body.light .visitor-badge {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.35);
}
.visitor-badge .visitor-loading {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(139, 123, 247, 0.2);
    border-top-color: #8b7bf7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.visitor-badge span { color: #8b7bf7; font-weight: 600; }

/* TOP LEFT INFO */
.top-left-info {
    position: absolute;
    top: 14px;
    left: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    z-index: 5;
}
.top-left-info .device-indicator {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.3px;
    transition: color 0.4s ease;
    margin: 0;
    text-align: left;
}
body.light .top-left-info .device-indicator { color: rgba(0, 0, 0, 0.25); }
.top-left-info .latency-display {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3px;
    transition: color 0.4s ease;
    margin: 0;
    text-align: left;
}
body.light .top-left-info .latency-display { color: rgba(0, 0, 0, 0.2); }
.top-left-info .latency-display .latency-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-right: 3px;
}
.top-left-info .latency-display .latency-dot.good { background: #43b581; }
.top-left-info .latency-display .latency-dot.ok { background: #faa61a; }
.top-left-info .latency-display .latency-dot.bad { background: #ed4245; }

/* ============================================================
   AVATAR
   ============================================================ */

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.avatar {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 44px;
    font-weight: 700;
    color: #fff;

    background: linear-gradient(135deg, #6c5ce7, #a37cff, #6c5ce7);
    background-size: 300% 300%;
    animation: gradientMove 4s ease-in-out infinite;

    border: 2px solid rgba(255,255,255,.08);
    box-shadow: 0 0 40px rgba(108,92,231,.15);

    overflow: visible;
    isolation: isolate;
    z-index: 1;
}

@keyframes gradientMove {
    0%   { background-position:0% 50%; }
    50%  { background-position:100% 50%; }
    100% { background-position:0% 50%; }
}

#avatar-img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    display: block;

    object-fit: cover;
    border-radius: 50%;

    z-index: 2;
}

#avatar-fallback {
    position: absolute;
    inset: 0;

    display: none;
    justify-content: center;
    align-items: center;

    font-size: 44px;
    font-weight: 700;
    color: #fff;

    border-radius: 50%;
    background: linear-gradient(135deg,#6c5ce7,#a37cff);

    z-index: 1;
}

/* ============================================================
   DISCORD AVATAR DECORATION
   ============================================================ */

#decoration-container {
    position: absolute;

    /* Discord-like sizing */
    top: -10px;
    left: -10px;

    width: 120px;
    height: 120px;

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    pointer-events: none;
    display: none;
    z-index: 5;

    /* Smooth rendering */
    image-rendering: auto;
    transform: translateZ(0);
    will-change: transform;
}

#decoration-container.active {
    display: block;
}

/* ============================================================
   STATUS DOT
   ============================================================ */

#avatar-status-dot{
    position:absolute;
    bottom:0;
    right:0;

    width:20px;
    height:20px;

    border-radius:50%;
    background:#747f8d;
    border:2.5px solid rgba(18,16,30,.95);

    box-shadow:0 0 12px rgba(0,0,0,.6);

    pointer-events:none;
    z-index:999;
}

#avatar-status-dot.online{
    background:#43b581;
    animation:avatarStatusPulse 2s ease-in-out infinite;
}

#avatar-status-dot.idle{
    background:#faa61a;
}

#avatar-status-dot.dnd{
    background:#ed4245;
}

#avatar-status-dot.offline{
    background:#747f8d;
}

@keyframes avatarStatusPulse{
    0%,100%{
        transform:scale(1);
        box-shadow:0 0 12px rgba(67,181,129,.3);
    }
    50%{
        transform:scale(1.15);
        box-shadow:0 0 24px rgba(67,181,129,.6);
    }
}

.username {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
    letter-spacing: -0.3px;
    transition: color 0.4s ease;
}
body.light .username { color: #1a1a2e; }

.discord-tag {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    transition: color 0.4s ease;
}
body.light .discord-tag { color: rgba(0, 0, 0, 0.4); }
.discord-tag .clan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(163, 124, 255, 0.08));
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 5px;
    padding: 1px 8px 1px 6px;
    font-size: 9px;
    font-weight: 600;
    color: #a37cff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.05);
}
.discord-tag .clan-badge::before {
    content: '◆';
    font-size: 7px;
    color: #a37cff;
    opacity: 0.6;
}
.discord-tag .status-text-clan {
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}
body.light .discord-tag .status-text-clan { color: rgba(0, 0, 0, 0.4); }

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
    padding: 3px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.4s ease;
}
body.light .badge {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.5);
}

.bio {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 14px;
    padding: 0 4px;
    transition: color 0.4s ease;
    text-align: center;
}
body.light .bio { color: rgba(0, 0, 0, 0.6); }
.bio span { color: #a37cff; }

.terminal-bio {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    margin-bottom: 14px;
    text-align: left;
    min-height: 30px;
    border-left: 2px solid rgba(108, 92, 231, 0.3);
    transition: all 0.4s ease;
}
body.light .terminal-bio {
    color: rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.05);
}
.terminal-bio .prompt { color: #a37cff; }
.terminal-bio .cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.link-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}
body.light .link-section {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.04);
}
.link-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(163, 124, 255, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.link-section:hover::before { opacity: 1; }
.link-section:hover {
    border-color: rgba(108, 92, 231, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.link-section:active { transform: scale(0.98); }
.link-section .title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: color 0.4s ease;
}
body.light .link-section .title { color: #1a1a2e; }
.link-section .desc {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    margin-top: 2px;
    position: relative;
    z-index: 1;
    transition: color 0.4s ease;
}
body.light .link-section .desc { color: rgba(0, 0, 0, 0.3); }
.link-section .arrow {
    float: right;
    color: rgba(255, 255, 255, 0.15);
    font-size: 15px;
    margin-top: 1px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}
body.light .link-section .arrow { color: rgba(0, 0, 0, 0.15); }
.link-section:hover .arrow {
    color: rgba(108, 92, 231, 0.6);
    transform: translateX(3px);
}
.link-section .icon-left {
    margin-right: 8px;
    font-size: 15px;
    position: relative;
    z-index: 1;
}
.link-stats {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 4px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.25);
}
body.light .link-stats { color: rgba(0, 0, 0, 0.25); }
.link-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.link-stats .stat-item .stat-number {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}
body.light .link-stats .stat-item .stat-number { color: rgba(0, 0, 0, 0.5); }

.footer {
    margin-top: 18px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.12);
    letter-spacing: 1px;
    transition: color 0.4s ease;
}
body.light .footer { color: rgba(0, 0, 0, 0.12); }
.footer span { color: rgba(108, 92, 231, 0.3); }

.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.03);
}
body.light .status-row { border-top-color: rgba(0, 0, 0, 0.05); }
.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #747f8d;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
    animation: status-pulse 2s ease-in-out infinite;
}
.status-dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(116, 127, 141, 0.2);
    animation: status-ring 2s ease-in-out infinite;
    transition: background-color 0.3s ease;
}
.status-dot::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: rgba(116, 127, 141, 0.06);
    animation: status-ring-outer 2s ease-in-out infinite;
    transition: background-color 0.3s ease;
}
@keyframes status-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
@keyframes status-ring {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.8); opacity: 0; }
}
@keyframes status-ring-outer {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(3); opacity: 0; }
}
.status-text {
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
body.light .status-text { color: rgba(0, 0, 0, 0.2); }
.status-text .highlight {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}
body.light .status-text .highlight { color: rgba(0, 0, 0, 0.5); }

.privacy-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 4px 12px;
    margin: 0 auto 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    width: fit-content;
    user-select: none;
}
body.light .privacy-toggle {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.3);
}
.privacy-toggle:hover {
    border-color: rgba(108, 92, 231, 0.2);
    background: rgba(255, 255, 255, 0.04);
}
body.light .privacy-toggle:hover { background: rgba(0, 0, 0, 0.04); }
.privacy-toggle .privacy-icon { font-size: 11px; }
.privacy-toggle .privacy-label { letter-spacing: 0.3px; }
.privacy-toggle .privacy-status {
    font-weight: 600;
    font-size: 8px;
    padding: 1px 7px;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.privacy-toggle .privacy-status.on {
    color: #43b581;
    background: rgba(67, 181, 129, 0.1);
}
.privacy-toggle .privacy-status.off {
    color: #ed4245;
    background: rgba(237, 66, 69, 0.1);
}

.theme-toggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10;
    background: rgba(18, 16, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}
body.light .theme-toggle {
    background: rgba(240, 240, 245, 0.6);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.5);
}
.theme-toggle:hover {
    border-color: rgba(108, 92, 231, 0.3);
    color: #fff;
    transform: scale(1.05);
}
body.light .theme-toggle:hover { color: #1a1a2e; }

#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
    background: transparent !important;
}
#snow-container * {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#bg-audio { display: none; }

.music-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10;
    background: rgba(18, 16, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}
body.light .music-toggle {
    background: rgba(240, 240, 245, 0.6);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.5);
}
.music-toggle:hover {
    border-color: rgba(108, 92, 231, 0.3);
    color: #ffffff;
    transform: scale(1.05);
}
body.light .music-toggle:hover { color: #1a1a2e; }

#start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    z-index: 99998 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-direction: column;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
body.light #start-overlay { background: rgba(240, 240, 245, 0.95); }
#start-overlay .icon {
    font-size: 50px;
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 4px;
}
#start-overlay h1 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 3px;
    margin-top: 10px;
    opacity: 0.8;
}
body.light #start-overlay h1 { color: #1a1a2e; }
#start-overlay p {
    color: rgba(255, 255, 255, 0.2);
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 1px;
}
body.light #start-overlay p { color: rgba(0, 0, 0, 0.2); }
@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.4; transform: scale(0.95); }
}
#start-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ============================================================
   OPTIMIZED MODERN PARTICLES - REDUCED COUNT
   ============================================================ */
.modern-particle {
    position: absolute;
    pointer-events: none;
    user-select: none;
    z-index: 2;
    font-family: 'Segoe UI', Arial, sans-serif;
    will-change: transform;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    line-height: 1 !important;
}

/* Reduced animations - simpler, less GPU intensive */
@keyframes fall {
    0% { transform: translateY(-10px) rotate(0deg) scale(1); opacity: var(--start-opacity, 0.6); }
    100% { transform: translateY(110vh) rotate(360deg) scale(0.3); opacity: 0.1; }
}
@keyframes float {
    0% { transform: translateY(0px) translateX(0px) scale(1); opacity: var(--start-opacity, 0.5); }
    50% { transform: translateY(-20px) translateX(10px) scale(1.05); opacity: 0.7; }
    100% { transform: translateY(0px) translateX(0px) scale(1); opacity: var(--start-opacity, 0.5); }
}
@keyframes twinkle {
    0% { transform: scale(1); opacity: var(--start-opacity, 0.3); }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1); opacity: var(--start-opacity, 0.3); }
}
@keyframes swirl {
    0% { transform: rotate(0deg) translateX(0px) translateY(0px); opacity: 0.4; }
    50% { transform: rotate(180deg) translateX(0px) translateY(-30px); opacity: 1; }
    100% { transform: rotate(360deg) translateX(0px) translateY(0px); opacity: 0.4; }
}
@keyframes drift {
    0% { transform: translateX(-10px) translateY(0px) scale(1); opacity: 0.4; }
    50% { transform: translateX(20px) translateY(-20px) scale(1.05); opacity: 0.7; }
    100% { transform: translateX(-10px) translateY(0px) scale(1); opacity: 0.4; }
}
@keyframes glow {
    0% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.5); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.2; }
}

/* Disable heavy animations on mobile */
@media (max-width: 768px) {
    .modern-particle {
        display: none !important;
    }
    #snow-container {
        display: none !important;
    }
}

/* ============================================================
   OPTIMIZED CUSTOM MOUSE POINTER - DISABLED ON MOBILE
   ============================================================ */
body { cursor: none !important; }
.custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, rgba(163, 124, 255, 0.9), rgba(108, 92, 231, 0.6));
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.15s ease, height 0.15s ease, background 0.3s ease;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.5), 0 0 60px rgba(108, 92, 231, 0.2);
    mix-blend-mode: screen;
    will-change: transform;
}
.custom-cursor-ring {
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(163, 124, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease, border-color 0.4s ease, opacity 0.4s ease;
    will-change: transform;
}
.custom-cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 99997;
    width: 4px;
    height: 4px;
    background: rgba(163, 124, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease;
    will-change: transform;
}
.custom-cursor.grow {
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(163, 124, 255, 1), rgba(108, 92, 231, 0.8));
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.7), 0 0 80px rgba(108, 92, 231, 0.3);
}
.custom-cursor-ring.grow {
    width: 60px;
    height: 60px;
    border-color: rgba(163, 124, 255, 0.6);
}

/* Disable custom cursor on mobile */
@media (max-width: 768px) {
    body { cursor: auto !important; }
    .custom-cursor,
    .custom-cursor-ring,
    .custom-cursor-trail {
        display: none !important;
    }
}

/* ============================================================
   COMMENT SYSTEM
   ============================================================ */
.comment-system {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.comment-toggle {
    background: rgba(18, 16, 30, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
body.light .comment-toggle {
    background: rgba(240, 240, 245, 0.7);
    color: rgba(0, 0, 0, 0.7);
}
.comment-toggle:hover {
    border-color: rgba(108, 92, 231, 0.3);
    transform: scale(1.05);
    box-shadow: 0 8px 40px rgba(108, 92, 231, 0.15);
}
.comment-toggle #comment-count {
    background: rgba(108, 92, 231, 0.2);
    padding: 0 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #a37cff;
}

.comment-panel {
    position: fixed;
    bottom: 140px;
    right: 24px;
    width: 340px;
    max-height: 420px;
    background: rgba(18, 16, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    z-index: 21;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.light .comment-panel { background: rgba(240, 240, 245, 0.9); }
.comment-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}
.comment-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
}
body.light .comment-panel-header { color: rgba(0, 0, 0, 0.6); }
.comment-panel-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.3s ease;
}
body.light .comment-panel-close { color: rgba(0, 0, 0, 0.2); }
.comment-panel-close:hover {
    color: rgba(255, 255, 255, 0.6);
}
body.light .comment-panel-close:hover { color: rgba(0, 0, 0, 0.6); }

.comment-input-area {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.comment-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
}
body.light .comment-input-area input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
    color: #1a1a2e;
}
.comment-input-area input:focus {
    border-color: rgba(108, 92, 231, 0.3);
}
.comment-input-area button {
    background: linear-gradient(135deg, #6c5ce7, #a37cff);
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.comment-input-area button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.comment-list {
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}
.comment-list::-webkit-scrollbar { width: 3px; }
.comment-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.comment-list::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.3);
    border-radius: 10px;
}
.comment-item {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 6px;
    animation: slideInComment 0.3s ease-out;
}
body.light .comment-item { background: rgba(0, 0, 0, 0.02); }
@keyframes slideInComment {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}
.comment-item .comment-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    word-wrap: break-word;
}
body.light .comment-item .comment-text { color: rgba(0, 0, 0, 0.8); }
.comment-item .comment-time {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 2px;
}
body.light .comment-item .comment-time { color: rgba(0, 0, 0, 0.2); }
.comment-empty {
    color: rgba(255, 255, 255, 0.2);
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}
body.light .comment-empty { color: rgba(0, 0, 0, 0.2); }

/* ============================================================
   COMMENT BUBBLES - OPTIMIZED
   ============================================================ */
.comment-bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 12;
    overflow: hidden;
}
.comment-bubble {
    position: absolute;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(18, 16, 30, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
    font-family: 'Segoe UI', Arial, sans-serif;
}
body.light .comment-bubble {
    background: rgba(240, 240, 245, 0.55);
    color: rgba(0, 0, 0, 0.8);
}
.comment-bubble.visible {
    opacity: var(--bubble-opacity, 0.85);
    transform: scale(1);
}
.comment-bubble .bubble-avatar {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a37cff);
    color: #fff;
    font-size: 7px;
    text-align: center;
    line-height: 16px;
    margin-right: 6px;
    font-weight: 700;
}
.comment-bubble.purple {
    border-color: rgba(108, 92, 231, 0.15);
    background: rgba(108, 92, 231, 0.08);
}
.comment-bubble.blue {
    border-color: rgba(52, 152, 219, 0.15);
    background: rgba(52, 152, 219, 0.08);
}
.comment-bubble.green {
    border-color: rgba(46, 204, 113, 0.15);
    background: rgba(46, 204, 113, 0.08);
}
.comment-bubble.pink {
    border-color: rgba(231, 76, 60, 0.15);
    background: rgba(231, 76, 60, 0.08);
}
.comment-bubble.gold {
    border-color: rgba(241, 196, 15, 0.15);
    background: rgba(241, 196, 15, 0.08);
}
.comment-bubble.cyan {
    border-color: rgba(0, 206, 201, 0.15);
    background: rgba(0, 206, 201, 0.08);
}
@keyframes bubbleFloat {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(var(--dx1, 20px), var(--dy1, -20px)) scale(1.02); }
    50% { transform: translate(var(--dx2, -15px), var(--dy2, -40px)) scale(0.98); }
    75% { transform: translate(var(--dx3, 25px), var(--dy3, -60px)) scale(1.01); }
    100% { transform: translate(0, 0) scale(1); }
}
.comment-bubble.floating {
    animation: bubbleFloat var(--float-duration, 15s) ease-in-out infinite;
}
.comment-toggle.loading {
    opacity: 0.6 !important;
    transform: scale(0.95) !important;
    pointer-events: none;
}
.comment-toggle .comment-count-loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: #a37cff;
    border-radius: 50%;
    animation: commentCountSpin 0.8s linear infinite;
    margin-left: 4px;
}
@keyframes commentCountSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   OVERLAY - BLOCK CLICK-THROUGH
   ============================================================ */
#start-overlay:not(.hidden) ~ .card { pointer-events: none !important; }
#start-overlay:not(.hidden) { pointer-events: all !important; }

/* ============================================================
   OPTIMIZED DISCORD SERVER ADVERTISEMENT
   ============================================================ */
.ad-wrapper {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99999 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.ad-wrapper.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.ad-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 14px;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(163, 124, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s ease;
    cursor: default;
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.05);
}
body.light .ad-label {
    color: rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(108, 92, 231, 0.2);
}
.ad-label:hover {
    border-color: rgba(163, 124, 255, 0.4);
    box-shadow: 0 0 40px rgba(108, 92, 231, 0.15);
}
.ad-label-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #43b581;
    animation: labelDotPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(67, 181, 129, 0.5);
}
@keyframes labelDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}
.ad-label-pulse {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(163, 124, 255, 0.6);
    animation: labelPulse 1.5s ease-in-out infinite;
}
@keyframes labelPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.8); }
}

.ad-card {
    position: relative;
    top: auto;
    right: auto;
    z-index: auto;
    background: rgba(18, 16, 30, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: adSlideIn 0.6s ease-out;
    border-image: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(163, 124, 255, 0.05)) 1;
}
body.light .ad-card {
    background: rgba(240, 240, 245, 0.88);
    border-color: rgba(0, 0, 0, 0.06);
}
.ad-card.hidden {
    opacity: 0;
    transform: translateX(30px) scale(0.9) rotateY(-10deg);
    pointer-events: none;
    max-height: 0;
    padding: 0 20px;
    margin: 0;
    overflow: hidden;
    border: none;
}
.ad-card:not(.hidden) {
    max-height: 350px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
@keyframes adSlideIn {
    0% { opacity: 0; transform: translateX(30px) scale(0.9) rotateY(-5deg); }
    100% { opacity: 1; transform: translateX(0) scale(1) rotateY(0deg); }
}

.ad-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.ad-server-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6c5ce7, #a37cff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.15);
}
.ad-server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}
.ad-server-icon-fallback { font-size: 28px; line-height: 1; }
.ad-server-info { flex: 1; min-width: 0; }
.ad-server-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    text-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}
body.light .ad-server-name { color: #1a1a2e !important; }
.ad-server-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}
body.light .ad-server-status { color: rgba(0, 0, 0, 0.4); }
.ad-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #43b581;
    animation: adStatusPulse 2s ease-in-out infinite;
}
@keyframes adStatusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.ad-stats {
    display: flex;
    gap: 24px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 12px;
}
body.light .ad-stats { border-color: rgba(0, 0, 0, 0.04); }
.ad-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
.ad-stat-number {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, #ffffff, rgba(163, 124, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.light .ad-stat-number {
    background: linear-gradient(135deg, #1a1a2e, #6c5ce7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ad-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
body.light .ad-stat-label { color: rgba(0, 0, 0, 0.25); }

.ad-join-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6c5ce7, #a37cff);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.ad-join-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}
.ad-join-btn:hover::before { left: 100%; }
.ad-join-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}
.ad-join-btn:active { transform: scale(0.98); }

/* ============================================================
   MOBILE VERSION - ONE LINE LAYOUT
   ============================================================ */
@media (max-width: 480px) {
    .ad-wrapper {
        top: 10px;
        right: 10px;
        gap: 4px;
        max-width: calc(100% - 20px);
    }
    .ad-label {
        font-size: 7px;
        padding: 2px 10px;
        letter-spacing: 1px;
        gap: 4px;
    }
    .ad-label-dot { width: 4px; height: 4px; }
    .ad-label-pulse { width: 3px; height: 3px; }

    .ad-card {
        min-width: auto;
        max-width: 100%;
        width: 100%;
        padding: 8px 12px;
        border-radius: 12px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        background: rgba(18, 16, 30, 0.92);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
        max-height: 56px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .ad-card:not(.hidden) {
        max-height: 56px;
        padding: 8px 12px;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }
    .ad-card.hidden {
        max-height: 0;
        padding: 0 12px;
        opacity: 0;
        transform: translateX(20px) scale(0.95);
        pointer-events: none;
        border: none;
        overflow: hidden;
        margin: 0;
    }
    .ad-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 0;
        flex: 1;
        min-width: 0;
    }
    .ad-server-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 14px;
        flex-shrink: 0;
        box-shadow: 0 0 16px rgba(108, 92, 231, 0.12);
    }
    .ad-server-icon-fallback { font-size: 16px; }
    .ad-server-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .ad-server-name {
        font-size: 11px;
        font-weight: 700;
        color: #ffffff !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
        text-shadow: none;
    }
    body.light .ad-server-name { color: #1a1a2e !important; }
    .ad-server-status {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 9px;
        color: rgba(255, 255, 255, 0.35);
        line-height: 1.2;
    }
    body.light .ad-server-status { color: rgba(0, 0, 0, 0.35); }
    .ad-status-dot { width: 4px; height: 4px; }
    .ad-stats { display: none; }

    .ad-join-btn {
        width: auto;
        padding: 4px 12px;
        font-size: 9px;
        font-weight: 600;
        border-radius: 8px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #6c5ce7, #a37cff);
        color: #fff;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        letter-spacing: 0.2px;
        white-space: nowrap;
    }
    .ad-join-btn::before { display: none; }
    .ad-join-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 2px 12px rgba(108, 92, 231, 0.3);
    }
    .ad-join-btn:active { transform: scale(0.95); }
}

/* ============================================================
   EXTRA SMALL SCREENS
   ============================================================ */
@media (max-width: 380px) {
    .ad-wrapper { top: 8px; right: 8px; gap: 3px; }
    .ad-card {
        padding: 6px 10px;
        max-height: 48px;
        border-radius: 10px;
    }
    .ad-card:not(.hidden) {
        max-height: 48px;
        padding: 6px 10px;
    }
    .ad-server-icon {
        width: 24px;
        height: 24px;
        border-radius: 6px;
        font-size: 12px;
    }
    .ad-server-icon-fallback { font-size: 14px; }
    .ad-server-name { font-size: 10px; }
    .ad-server-status { font-size: 8px; }
    .ad-join-btn {
        padding: 3px 10px;
        font-size: 8px;
        border-radius: 6px;
    }
    .ad-label {
        font-size: 6px;
        padding: 2px 8px;
    }
}

.ad-server-icon{
    width:56px;
    height:56px;
    border-radius:18px;
    overflow:hidden;
    border:2px solid rgba(255,255,255,.08);

    background:rgba(255,255,255,.05);
    box-shadow:
        0 10px 30px rgba(0,0,0,.45),
        0 0 24px rgba(124,92,255,.18);

    flex-shrink:0;
}

.ad-server-icon img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}