/* styles.css - Full Glassmorphism Effect */
:root {
    --bg-light: linear-gradient(145deg, #fafafc 0%, #f0f0f4 100%);
    --bg-dark: linear-gradient(135deg, #050505 0%, #141416 100%);
    --glass-white: rgba(255, 255, 255, 0.25);
    --glass-dark: rgba(0, 0, 0, 0.3);
    --glass-border-light: rgba(255, 255, 255, 0.4);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --text-light: #1a1a1e;
    --text-dark: #efefef;
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
    --accent: #2c2c30;
    --transition-default: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: var(--bg-light);
    color: var(--text-light);
    overflow: hidden;
    letter-spacing: -0.01em;
    transition: background-color 0.4s ease, color 0.25s ease;
}

body.dark {
    background: var(--bg-dark);
    color: var(--text-dark);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    height: 100%;
}

.main-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.main-content.visible {
    opacity: 1;
    visibility: visible;
}

.main-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    overflow: visible;
}

/* MAIN GLASS CONTAINER */
.container-3d {
    max-width: 320px;
    width: 85%;
    margin: 0 auto;
    padding: 2rem 1.5rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.08s linear;
    transform-style: preserve-3d;
    will-change: transform;
    pointer-events: auto;
    border-radius: 32px;
    /* GLASS EFFECT */
    background: var(--glass-white);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    box-shadow: var(--shadow-light);
}

body.dark .container-3d {
    background: var(--glass-dark);
    border: 1px solid var(--glass-border-dark);
    box-shadow: var(--shadow-dark);
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 300px;
    margin-bottom: 0;
}

/* PROFILE PICTURE - GLASS */
.profile-pic {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border-light);
    box-shadow: var(--shadow-light);
    margin-bottom: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.02);
}

body.dark .profile-pic {
    background: var(--glass-dark);
    border: 2px solid var(--glass-border-dark);
    box-shadow: var(--shadow-dark);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username {
    font-size: 1.6rem;
    font-weight: 590;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent);
    white-space: nowrap;
    font-weight: 590;
    animation: tL 3.6s steps(8, end) infinite, bC 0.75s step-end infinite;
}

@keyframes tL {
    0% { width: 0; }
    35% { width: 8.2ch; }
    65% { width: 8.2ch; }
    100% { width: 0; }
}

@keyframes bC {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent); }
}

/* PROFILE VIEWS - GLASS */
.profile-views {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.3rem 0 0.5rem 0;
    padding: 0.3rem 0.8rem;
    background: var(--glass-white);
    backdrop-filter: blur(8px);
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 450;
    border: 1px solid var(--glass-border-light);
}

body.dark .profile-views {
    background: var(--glass-dark);
    border: 1px solid var(--glass-border-dark);
}

.views-count {
    font-weight: 600;
    background: linear-gradient(135deg, #2c2c30, #3d3d44);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

body.dark .views-count {
    background: linear-gradient(135deg, #e0e0e8, #ffffff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* BADGES CONTAINER - GLASS */
.badges-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0.2rem 0 0.5rem;
}

.profile-badges {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: var(--glass-white);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    border-radius: 60px;
    box-shadow: var(--shadow-light);
}

body.dark .profile-badges {
    background: var(--glass-dark);
    border: 1px solid var(--glass-border-dark);
    box-shadow: var(--shadow-dark);
}

.badge-wrapper {
    position: relative;
    display: inline-flex;
    cursor: default;
}

.verified-badge, .early-badge, .staff-badge {
    width: 22px;
    height: 20px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.badge-tooltip {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    color: #f0f0f0;
    padding: 4px 10px;
    border-radius: 40px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, bottom 0.2s ease;
    z-index: 20;
}

.badge-wrapper:hover .badge-tooltip {
    opacity: 1;
    bottom: 170%;
}

.badge-wrapper:hover .verified-badge,
.badge-wrapper:hover .early-badge,
.badge-wrapper:hover .staff-badge {
    transform: scale(1.1);
}

/* CONTACT LINKS - GLASS */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    width: 100%;
    max-width: 280px;
    margin-top: 0.5rem;
}

.contact-item {
    background: var(--glass-white);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    box-shadow: var(--shadow-light);
    padding: 0.7rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
    transform-style: preserve-3d;
}

body.dark .contact-item {
    background: var(--glass-dark);
    border: 1px solid var(--glass-border-dark);
    box-shadow: var(--shadow-dark);
}

.contact-item:hover {
    transform: translateY(-2px) translateZ(10px);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

body.dark .contact-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.contact-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: #2c2c30;
}

body.dark .contact-icon {
    color: #cdcdd4;
}

.contact-text {
    font-weight: 480;
    flex-grow: 1;
    text-align: left;
    font-size: 0.85rem;
    letter-spacing: -0.2px;
}

.static-contact {
    cursor: default;
}
.static-contact:hover {
    transform: none;
}

/* THEME TOGGLE - GLASS */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--glass-white);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    box-shadow: var(--shadow-light);
    z-index: 1001;
    transition: var(--transition-default);
    pointer-events: auto;
}

body.dark .theme-toggle {
    background: var(--glass-dark);
    border: 1px solid var(--glass-border-dark);
    box-shadow: var(--shadow-dark);
}

.theme-toggle:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.4);
}

/* AUDIO CONTROL - GLASS */
.audio-control-container {
    position: fixed;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0;
    z-index: 1001;
    background: var(--glass-white);
    backdrop-filter: blur(16px);
    border-radius: 40px;
    border: 1px solid var(--glass-border-light);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: width 0.35s ease;
    width: 40px;
    height: 40px;
    pointer-events: auto;
}

body.dark .audio-control-container {
    background: var(--glass-dark);
    border: 1px solid var(--glass-border-dark);
    box-shadow: var(--shadow-dark);
}

.audio-control-container:hover {
    width: 150px;
    background: rgba(255, 255, 255, 0.35);
}

body.dark .audio-control-container:hover {
    background: rgba(0, 0, 0, 0.45);
}

.audio-control-container:hover .volume-container {
    opacity: 1;
    width: 90px;
}

.audio-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1rem;
    color: inherit;
    background: transparent;
    border: none;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    width: 0;
    transition: opacity 0.25s ease, width 0.3s ease;
    padding-right: 12px;
}

.volume-control {
    width: 100%;
    height: 3px;
    -webkit-appearance: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    outline: none;
}

.volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2c2c30;
    cursor: pointer;
}

body.dark .volume-control {
    background: rgba(255, 255, 255, 0.3);
}
body.dark .volume-control::-webkit-slider-thumb {
    background: #ddd;
}

/* BACKGROUND VIDEO */
#bgVideo {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    object-fit: cover;
    opacity: 0.25;
    filter: grayscale(100%) contrast(1.1);
}

body.dark #bgVideo {
    opacity: 0.18;
    filter: grayscale(100%) brightness(0.6) contrast(1.2);
}

/* ENTRY OVERLAY - GLASS */
.entry-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    transition: all 0.5s ease-out;
    cursor: pointer;
}

.entry-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.overlay-content {
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    border-radius: 80px;
    padding: 0.5rem;
    border: 1px solid var(--glass-border-light);
}

body.dark .overlay-content {
    background: var(--glass-dark);
    border: 1px solid var(--glass-border-dark);
}

.entry-text {
    font-size: 1.5rem;
    font-weight: 520;
    background: linear-gradient(135deg, #1e1e24, #3a3a44);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: pG 2.2s infinite;
    padding: 10px 24px;
    border-radius: 60px;
}

body.dark .entry-text {
    background: linear-gradient(135deg, #e8e8f0, #bcbcc6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

@keyframes pG {
    0%, 100% { opacity: 0.9; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* LOADING SPINNER - GLASS */
.loading-spinner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #2c2c30;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10001;
}

body.dark .loading-spinner {
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: #efefef;
}

.loading-spinner.visible {
    opacity: 1;
}

@keyframes spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

/* SNOWFLAKES */
.snowflake {
    position: fixed;
    top: -10px;
    z-index: 999;
    color: rgba(200, 200, 210, 0.5);
    user-select: none;
    pointer-events: none;
    font-size: 0.8rem;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
body.dark .snowflake {
    color: rgba(150, 150, 160, 0.4);
}
@keyframes fall {
    to { transform: translateY(100vh); }
}

/* CURSOR GLOW */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44,44,48,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transition: transform 0.15s ease-out;
    transform: translate(-50%, -50%);
}

body.dark .cursor-glow {
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

/* RESPONSIVE */
@media (max-width: 580px) {
    .container-3d { 
        max-width: 320px;
        width: 90%;
        padding: 1.5rem 1rem 1.8rem 1rem;
        border-radius: 28px;
    }
    .username { font-size: 1.4rem; }
    .profile-pic { width: 75px; height: 75px; }
    .contact-item { padding: 0.6rem 0.8rem; border-radius: 18px; }
    .contact-text { font-size: 0.8rem; }
    .theme-toggle, .audio-control-container { width: 36px; height: 36px; top: 0.8rem; }
    .audio-control-container:hover { width: 130px; }
    .audio-btn { width: 36px; height: 36px; }
    .profile-badges { padding: 4px 12px; gap: 8px; }
    .verified-badge, .early-badge, .staff-badge { width: 18px; height: 16px; }
    .contact-links { max-width: 250px; gap: 0.6rem; }
}

/* ===== NEW: Discord Status Indicator on PFP ===== */
.profile-pic-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.profile-pic {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border-light);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    margin-bottom: 0;
}

.profile-pic:hover {
    transform: scale(1.02);
}

body.dark .profile-pic {
    background: var(--glass-dark);
    border: 2px solid var(--glass-border-dark);
    box-shadow: var(--shadow-dark);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Status indicator bubble - bottom right of PFP */
.status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--glass-white);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

body.dark .status-indicator {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Status colors */
.status-indicator.online i { color: #23a55a; }
.status-indicator.idle i { color: #f0b232; }
.status-indicator.dnd i { color: #f13f43; }
.status-indicator.offline i { color: #80848e; }
.status-indicator.streaming i { color: #593695; }

.status-indicator i {
    font-size: 12px;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.3));
}

/* ===== 3D GRID BACKGROUND ===== */
.grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

body.dark .grid-canvas {
    opacity: 0.25;
}

/* Activity tooltip on hover */
.status-indicator {
    cursor: pointer;
}

.status-tooltip {
    position: absolute;
    bottom: 130%;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    color: #f0f0f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
    font-family: 'Inter', monospace;
    letter-spacing: 0;
}

.status-indicator:hover .status-tooltip {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 580px) {
    .profile-pic {
        width: 75px;
        height: 75px;
    }
    .status-indicator {
        width: 18px;
        height: 18px;
        bottom: 2px;
        right: 2px;
    }
    .status-indicator i {
        font-size: 9px;
    }
    .status-tooltip {
        font-size: 9px;
        white-space: nowrap;
        right: -10px;
    }
}

/* Add these styles to your existing styles.css */

/* Username link styling */
.username-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.username-link:hover {
    opacity: 0.8;
}

/* Status indicator on PFP */
.profile-pic-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.profile-pic {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--glass-white);
    backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border-light);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    margin-bottom: 0;
}

.profile-pic:hover {
    transform: scale(1.02);
}

body.dark .profile-pic {
    background: var(--glass-dark);
    border: 2px solid var(--glass-border-dark);
    box-shadow: var(--shadow-dark);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Status indicator bubble - bottom right of PFP */
.status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--glass-white);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

body.dark .status-indicator {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Status colors */
.status-indicator.online i { color: #23a55a; }
.status-indicator.idle i { color: #f0b232; }
.status-indicator.dnd i { color: #f13f43; }
.status-indicator.offline i { color: #80848e; }
.status-indicator.streaming i { color: #593695; }

.status-indicator i {
    font-size: 12px;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.3));
}

/* Activity tooltip on hover */
.status-indicator {
    cursor: pointer;
}

.status-tooltip {
    position: absolute;
    bottom: 130%;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    color: #f0f0f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
    font-family: 'Inter', monospace;
    letter-spacing: 0;
}

.status-indicator:hover .status-tooltip {
    opacity: 1;
}

/* 3D Grid Canvas */
.grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

body.dark .grid-canvas {
    opacity: 0.25;
}

/* Responsive adjustments */
@media (max-width: 580px) {
    .profile-pic {
        width: 75px;
        height: 75px;
    }
    .status-indicator {
        width: 18px;
        height: 18px;
        bottom: 2px;
        right: 2px;
    }
    .status-indicator i {
        font-size: 9px;
    }
    .status-tooltip {
        font-size: 9px;
        white-space: nowrap;
        right: -10px;
    }
}