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

/* Make text cursor (caret) smaller for better visibility */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="color"],
textarea,
.form-input {
    caret-color: rgba(255, 255, 255, 0.9);
    caret-width: 1px; /* Smaller cursor width - note: limited browser support */
    line-height: 1.4; /* Tighter line height makes cursor appear smaller */
}

/* Additional optimization for cursor appearance */
input:focus,
textarea:focus,
.form-input:focus {
    caret-color: #667eea; /* Use theme color for focused cursor */
    outline: none; /* Remove default outline for cleaner look */
}

/* For textarea and large inputs, reduce font size slightly to make cursor smaller */
textarea,
input[type="text"],
input[type="email"],
.form-input {
    font-size: 0.95em; /* Slightly smaller font = smaller cursor */
}

/* Base cursor styling - custom cursor will override */
* {
    cursor: none;
}

/* Buttons MUST be clickable */
button.face-icon {
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
    position: relative !important;
}

/* Child elements should not block clicks on button */
button.face-icon * {
    pointer-events: none !important;
}

/* Icons row must allow pointer events */
.icons-row {
    pointer-events: auto !important;
    z-index: 999999 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    cursor: auto; /* Show cursor - custom cursor will overlay */
    align-items: center;
    padding: 20px;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

/* -----------------------------------------------------------------------------
   AppDialog (in-app modal + toast)
----------------------------------------------------------------------------- */
.ts-dialog-open {
    overflow: hidden !important;
}

#ts-dialog-root {
    position: relative;
    z-index: 1000000; /* above cursor overlay */
}

.ts-dialog-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: tsFadeIn 140ms ease-out;
    /* Allow cursor to track through backdrop, but still capture clicks */
    pointer-events: auto;
}

.ts-dialog {
    width: min(520px, 92vw);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: radial-gradient(1200px 600px at 10% 10%, rgba(102, 126, 234, 0.20), rgba(0,0,0,0) 60%),
                radial-gradient(900px 500px at 90% 0%, rgba(240, 147, 251, 0.14), rgba(0,0,0,0) 55%),
                rgba(10, 12, 20, 0.92);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    animation: tsPopIn 160ms ease-out forwards;
}

.ts-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.ts-dialog-title {
    font-weight: 800;
    letter-spacing: 0.2px;
    color: rgba(255,255,255,0.95);
    font-size: 1.05rem;
}

.ts-dialog-x {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.ts-dialog-x:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.10);
}

.ts-dialog-body {
    padding: 16px 18px 10px;
}

.ts-dialog-message {
    color: rgba(255,255,255,0.78);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.ts-dialog-input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    outline: none;
    font-size: 0.95rem;
}
.ts-dialog-input:focus {
    border-color: rgba(102,126,234,0.55);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.18);
}

.ts-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 18px 18px;
}

.ts-dialog-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ts-dialog-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.22);
}

.ts-dialog-btn-secondary {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}
.ts-dialog-btn-secondary:hover {
    background: rgba(255,255,255,0.10);
    transform: translateY(-1px);
}

.ts-dialog-btn-primary {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.24);
}
.ts-dialog-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.34);
}

.ts-dialog-btn-danger {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    box-shadow: 0 10px 24px rgba(255, 65, 108, 0.22);
}
.ts-dialog-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(255, 65, 108, 0.30);
}

.ts-toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000001;
    pointer-events: none;
}

.ts-toast {
    pointer-events: none;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(15, 18, 30, 0.92);
    color: rgba(255,255,255,0.92);
    box-shadow: 0 14px 40px rgba(0,0,0,0.50);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: tsSlideIn 160ms ease-out;
    max-width: min(360px, 92vw);
}
.ts-toast-success {
    border-color: rgba(76, 175, 80, 0.35);
}
.ts-toast-info {
    border-color: rgba(102, 126, 234, 0.35);
}
.ts-toast-hide {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 220ms ease, transform 220ms ease;
}

@keyframes tsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes tsPopIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tsSlideIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

body.world-active {
    overflow: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

.world-container {
    scroll-behavior: smooth;
}

/* Custom Interactive Cursor - Galaxy Themed */
.custom-cursor {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    pointer-events: none !important;
    z-index: 1000001 !important; /* Above dialog (1000000) */
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100vw;
    height: 100vh;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8),
                0 0 30px rgba(255, 255, 255, 0.4),
                0 0 45px rgba(255, 255, 255, 0.2);
    animation: cursorPulse 2s ease-in-out infinite;
}

.cursor-ring {
    width: 35px;
    height: 35px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4),
                inset 0 0 15px rgba(255, 255, 255, 0.1);
    animation: cursorRotate 8s linear infinite;
}

.cursor-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Particle trail effect */
.cursor-trail {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    animation: trailFade 0.5s ease-out forwards;
}

@keyframes cursorPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes cursorRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes trailFade {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

.custom-cursor.cursor-hover .cursor-ring {
    width: 50px;
    height: 50px;
    border-width: 2.5px;
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6),
                inset 0 0 25px rgba(255, 255, 255, 0.2);
}

.custom-cursor.cursor-hover .cursor-dot {
    width: 12px;
    height: 12px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 1),
                0 0 40px rgba(255, 255, 255, 0.6),
                0 0 60px rgba(255, 255, 255, 0.3);
}

/* Background Canvas - Galaxy/Universe Effect */
.background-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0 !important;
    pointer-events: none !important;
    opacity: 1 !important;
    display: block !important;
    background: #000000 !important;
}

/* Transparent background for world modules (public profile) - particles overlay on colored backgrounds */
.world-container.active ~ .background-canvas {
    background: transparent !important;
}

/* When world container is active, make canvas transparent so colored backgrounds show through */
body:has(.world-container.active) .background-canvas {
    background: transparent !important;
}

/* Ensure proper z-index layering: 
   - background-canvas (z-index 0) - particles at base
   - world-background (z-index -1 inside container) - colored overlay
   - world-content (z-index 1 inside container) - actual content
*/
.world-content {
    z-index: 1 !important;
    position: relative;
}

/* Hide navigation and buttons when world module is active */
.world-container.active ~ nav.nav-bar,
body:has(.world-container.active) nav.nav-bar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.world-container.active ~ .container header .icons-row,
body:has(.world-container.active) .container header .icons-row {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.container {
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1; /* Above the background canvas */
}

header {
    text-align: center;
    margin-bottom: 60px;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.headshot-container {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 30px;
    pointer-events: none !important;
    z-index: 100;
    min-height: 250px; /* Ensure space for floating */
    overflow: visible; /* Allow headshots to float outside */
}

.headshot-container > * {
    pointer-events: auto !important;
}

/* Icons row above headshot */
.icons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    animation: iconsFadeIn 1s ease-out 0.3s both;
}

@keyframes iconsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
    pointer-events: auto !important;
    z-index: 10000;
    position: relative;
}

.headshot-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    perspective: 1000px;
    /* Floating is now handled by JavaScript */
    will-change: transform;
    z-index: 50; /* Ensure headshots are above background but below buttons */
}

/* Headshot stays in normal flow */
#headshotWrapper {
    position: relative;
    margin: 0 auto 30px;
}

.headshot-3d {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.headshot {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    display: block;
    transform-style: preserve-3d;
    will-change: transform;
}

.headshot-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.headshot-wrapper:hover .headshot-glow {
    opacity: 0.8;
}

.headshot-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.headshot-wrapper:hover .headshot-placeholder {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.placeholder-icon {
    font-size: 80px;
    opacity: 0.7;
}

/* Loading spinner for profile picture */
.headshot-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 6px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(102, 126, 234, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading skeleton for username and bio */
.loading-skeleton {
    display: inline-block;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    height: 1.2em;
    min-width: 150px;
}

.username-loading .loading-skeleton {
    width: 200px;
    height: 2rem;
}

.bio-loading .loading-skeleton {
    width: 300px;
    height: 1.2rem;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.username-text,
.bio-text {
    display: none;
}

/* Show text when loading is hidden */
#publicUsername:has(.username-loading[style*="display: none"]) .username-text,
#publicBio:has(.bio-loading[style*="display: none"]) .bio-text {
    display: inline;
}

/* Fallback for browsers without :has() support */
.username-text.show,
.bio-text.show {
    display: inline !important;
}

/* Interactive icons above headshot - Easy to click */
.face-icon {
    position: relative;
    cursor: pointer !important;
    z-index: 10000 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 90px;
    overflow: visible;
    transform-style: preserve-3d;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
    /* Button reset */
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-decoration: none;
}

.face-icon svg {
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
    pointer-events: none;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px currentColor);
}

.icon-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    margin-top: 4px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    pointer-events: none;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.icon-pulse {
    pointer-events: none !important;
}

.icon-pulse {
    pointer-events: none !important;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 2px solid currentColor;
    opacity: 0;
    animation: iconPulse 2s ease-in-out infinite;
    z-index: 0;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* SVG sizing handled above */

.face-icon:hover {
    transform: scale(1.2) translateY(-8px) rotateX(5deg) !important;
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.5),
                0 0 50px rgba(255, 255, 255, 0.3),
                inset 0 2px 10px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.25);
}

.face-icon:hover svg {
    animation: iconFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px currentColor);
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.1);
    }
}

.face-icon:active {
    transform: scale(1.1) translateY(-4px) rotateX(2deg) !important;
    transition: transform 0.1s ease;
}

/* Ripple effect on click */
.face-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s, opacity 0.6s;
    pointer-events: none;
    z-index: 0;
}

.face-icon:active::before {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* Animated gradient background */
.face-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shimmer 3s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Focus states for accessibility */
.face-icon:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
}

.world-close-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
}

/* Eye icon styling - Watching theme (warm red/crimson for cinema/movies) */
.eye-icon-face {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.5);
}

.eye-icon-face:hover {
    background: rgba(231, 76, 60, 0.25);
    border-color: #e74c3c;
    box-shadow: 0 12px 40px rgba(231, 76, 60, 0.6),
                0 0 50px rgba(231, 76, 60, 0.4),
                inset 0 2px 10px rgba(231, 76, 60, 0.2);
    transform: translateY(-8px) scale(1.2) rotateX(5deg) !important;
}

.eye-icon-face:hover .icon-label {
    color: #e74c3c;
    text-shadow: 0 0 20px rgba(231, 76, 60, 1),
                 0 0 30px rgba(231, 76, 60, 0.6);
    transform: scale(1.1);
}

.eye-icon-face:hover svg {
    animation: iconPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 15px #e74c3c);
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.9;
    }
}

/* Ear icon styling - Listening theme (bright cyan-blue to match ocean blue gradient) */
.ear-icon-face {
    color: #52c9f2;
    border-color: rgba(82, 201, 242, 0.5);
}

.ear-icon-face:hover {
    background: rgba(82, 201, 242, 0.25);
    border-color: #52c9f2;
    box-shadow: 0 12px 40px rgba(82, 201, 242, 0.6),
                0 0 50px rgba(82, 201, 242, 0.4),
                inset 0 2px 10px rgba(82, 201, 242, 0.2);
    transform: translateY(-8px) scale(1.2) rotateX(5deg) !important;
}

.ear-icon-face:hover .icon-label {
    color: #52c9f2;
    text-shadow: 0 0 20px rgba(82, 201, 242, 1),
                 0 0 30px rgba(82, 201, 242, 0.6);
    transform: scale(1.1);
}

.ear-icon-face:hover svg {
    animation: iconRotate 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px #52c9f2);
}

@keyframes iconRotate {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-5deg) scale(1.1);
    }
    75% {
        transform: rotate(5deg) scale(1.1);
    }
}

/* Head icon styling - Reading theme (vibrant purple to match purple-green gradient) */
.head-icon-face {
    color: #a569bd;
    border-color: rgba(165, 105, 189, 0.5);
}

.head-icon-face:hover {
    background: rgba(165, 105, 189, 0.25);
    border-color: #a569bd;
    box-shadow: 0 12px 40px rgba(165, 105, 189, 0.6),
                0 0 50px rgba(165, 105, 189, 0.4),
                inset 0 2px 10px rgba(165, 105, 189, 0.2);
    transform: translateY(-8px) scale(1.2) rotateX(5deg) !important;
}

.head-icon-face:hover .icon-label {
    color: #a569bd;
    text-shadow: 0 0 20px rgba(165, 105, 189, 1),
                 0 0 30px rgba(165, 105, 189, 0.6);
    transform: scale(1.1);
}

.head-icon-face:hover svg {
    animation: iconBounce 1.8s ease-in-out infinite;
    filter: drop-shadow(0 0 15px #a569bd);
}

.brain-icon-face {
    color: #6c5ce7;
    border-color: rgba(108, 92, 231, 0.5);
}

.brain-icon-face:hover {
    background: rgba(108, 92, 231, 0.25);
    border-color: #6c5ce7;
    box-shadow: 0 12px 40px rgba(108, 92, 231, 0.6),
                0 0 50px rgba(108, 92, 231, 0.4),
                inset 0 2px 10px rgba(108, 92, 231, 0.2);
    transform: translateY(-8px) scale(1.2) rotateX(5deg) !important;
}

.brain-icon-face:hover .icon-label {
    color: #6c5ce7;
    text-shadow: 0 0 20px rgba(108, 92, 231, 1),
                 0 0 30px rgba(108, 92, 231, 0.6);
    transform: scale(1.1);
}

.brain-icon-face:hover svg {
    animation: iconBounce 1.8s ease-in-out infinite;
    filter: drop-shadow(0 0 15px #6c5ce7);
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-4px) scale(1.1);
    }
    50% {
        transform: translateY(0) scale(1.05);
    }
    75% {
        transform: translateY(-2px) scale(1.08);
    }
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    animation: titleFadeIn 1s ease-out 0.2s both;
    letter-spacing: -0.02em;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    animation: subtitleFadeIn 1.5s ease-out 0.5s both;
}

@keyframes subtitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Portal overlay for transition effect */
.portal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.portal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.portal-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Glitch Effect */
.glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.glitch-effect.active {
    opacity: 1;
    animation: glitch 0.3s;
}

.glitch-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: white;
    opacity: 0.8;
    animation: glitchLine 0.3s;
}

.glitch-line:nth-child(1) {
    top: 20%;
    animation-delay: 0s;
}

.glitch-line:nth-child(2) {
    top: 50%;
    animation-delay: 0.1s;
}

.glitch-line:nth-child(3) {
    top: 80%;
    animation-delay: 0.2s;
}

@keyframes glitch {
    0%, 100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-2px);
    }
    40% {
        transform: translateX(2px);
    }
    60% {
        transform: translateX(-1px);
    }
    80% {
        transform: translateX(1px);
    }
}

@keyframes glitchLine {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

.portal-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: portalRipple 1s ease-out;
}

@keyframes portalRipple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200vw;
        height: 200vw;
        opacity: 0;
    }
}

.portal-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: particleFloat 3s infinite ease-in-out;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
}

/* Immersive world container */
.world-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Above world-background (1) and particles (0) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent; /* Transparent so world-background shows through */
}

.world-container.active {
    opacity: 1;
    visibility: visible;
}

/* Hide navigation and buttons when world module is active */
/* Using both :has() selector and body class for maximum browser compatibility */
body:has(.world-container.active) .nav-bar,
body.world-module-active .nav-bar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide watching/listening/reading buttons when module is active */
body:has(.world-container.active) .icons-row,
body.world-module-active .icons-row {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Also hide the entire headshot container when module is active */
body:has(.world-container.active) .headshot-container,
body.world-module-active .headshot-container {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide header text when module is active */
body:has(.world-container.active) .container header h1,
body:has(.world-container.active) .container header .subtitle,
body.world-module-active .container header h1,
body.world-module-active .container header .subtitle {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.world-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    background: transparent;
}

.world-canvas.active {
    opacity: 1;
}

.world-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 1s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1; /* Above particles (0) but below world-container (2) */
    pointer-events: none; /* Don't block clicks */
    /* Semi-transparent backgrounds allow particles to show through */
}

.world-background.active {
    opacity: 1; /* Element opacity - actual transparency is in the rgba colors */
    visibility: visible;
}

/* Themed backgrounds - semi-transparent so particles show through from behind */
.world-background[data-theme="watching"] {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.7) 0%, rgba(165, 42, 42, 0.7) 30%, rgba(192, 57, 43, 0.7) 60%, rgba(231, 76, 60, 0.7) 100%);
    animation: watchingPulse 4s ease-in-out infinite;
}

.world-background[data-theme="listening"] {
    background: linear-gradient(135deg, rgba(26, 84, 144, 0.7) 0%, rgba(41, 128, 185, 0.7) 30%, rgba(52, 152, 219, 0.7) 60%, rgba(82, 201, 242, 0.7) 100%);
    animation: listeningWave 6s ease-in-out infinite;
}

.world-background[data-theme="reading"] {
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.7) 0%, rgba(142, 36, 170, 0.7) 30%, rgba(165, 105, 189, 0.7) 60%, rgba(186, 104, 200, 0.7) 100%);
    animation: readingGlow 5s ease-in-out infinite;
}

.world-background[data-theme="thinking"] {
    background: linear-gradient(135deg, rgba(76, 81, 191, 0.7) 0%, rgba(95, 39, 205, 0.7) 30%, rgba(108, 92, 231, 0.7) 60%, rgba(129, 118, 255, 0.7) 100%);
    animation: thinkingPulse 5s ease-in-out infinite;
}

@keyframes watchingPulse {
    0%, 100% {
        filter: brightness(1) hue-rotate(0deg);
    }
    50% {
        filter: brightness(1.2) hue-rotate(10deg);
    }
}

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

@keyframes readingGlow {
    0%, 100% {
        filter: brightness(1) saturate(1);
    }
    50% {
        filter: brightness(1.3) saturate(1.2);
    }
}

@keyframes thinkingPulse {
    0%, 100% {
        filter: brightness(1) hue-rotate(0deg);
    }
    50% {
        filter: brightness(1.2) hue-rotate(5deg);
    }
}

.world-content {
    position: relative;
    z-index: 100;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 40px 40px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    animation: worldEnter 1s ease-out;
    pointer-events: auto;
}

@keyframes worldEnter {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.world-close-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1001;
}

.world-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.world-header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
    animation: fadeInUp 1s ease-out 0.3s both;
    padding-top: 20px;
    position: relative;
    z-index: 100;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    border-radius: 20px;
    margin: 0 auto 50px;
    max-width: 800px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.world-header h2 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 
                 0 0 60px rgba(255, 255, 255, 0.4),
                 0 4px 10px rgba(0, 0, 0, 0.8);
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 101;
}

.world-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8),
                 0 0 20px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 101;
    color: rgba(255, 255, 255, 0.95);
}

.world-list {
    display: grid;
    gap: 25px;
    animation: fadeInUp 1s ease-out 0.5s both;
    position: relative;
    z-index: 101;
}

.world-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    min-height: auto;
    height: auto;
}

/* Content wrapper for horizontal layout */
.world-item-content-wrapper {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

/* Image container on the left */
.world-item-image {
    flex-shrink: 0;
    width: 150px;
    min-width: 150px;
}

.world-item-image img,
.world-item-image video {
    width: 100%;
    max-width: 150px;
    height: auto;
    max-height: 225px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.world-item-image video {
    max-height: 225px;
    object-fit: contain;
}

/* Text content on the right */
.world-item-text-content {
    flex: 1;
    min-width: 0; /* Allows text to shrink and wrap */
    display: flex;
    flex-direction: column;
}

.world-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.world-item:hover::before {
    left: 100%;
}

.world-item:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 60px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.world-item:active {
    transform: translateY(-8px) scale(1.01);
}

.world-item-text-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 0;
}

.world-item-text-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1 1 auto;
}

.world-item-text-content .meta {
    margin-top: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    transition: color 0.3s ease;
}

.world-item:hover .world-item-text-content .meta {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

/* Link styling */
.world-item-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.world-item-link:hover {
    color: rgba(255, 255, 255, 1);
}

/* Thoughtful button */
.entry-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
    pointer-events: auto;
}

.like-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    pointer-events: auto;
}

.like-btn:hover {
    background: rgba(108, 92, 231, 0.2);
    border-color: #6c5ce7;
    transform: scale(1.05);
}

.like-btn.active {
    background: rgba(108, 92, 231, 0.3);
    border-color: #6c5ce7;
}

.like-count {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}


/* Mobile: Show default cursor */
@media (max-width: 768px) {
    * {
        cursor: auto !important;
    }
    
    .custom-cursor {
        display: none;
    }
    
    /* Keep background canvas visible on mobile, just ensure it doesn't block content */
    .background-canvas {
        opacity: 0.7;
    }
    
    /* Responsive design */
    .world-header h2 {
        font-size: 2.5rem;
    }

    .world-subtitle {
        font-size: 1.1rem;
    }

    .world-content {
        padding: 40px 20px;
    }

    .world-close-btn {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    .world-item {
        padding: 25px 20px;
    }

    /* Stack world-item content vertically on mobile */
    .world-item-content-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .world-item-image {
        width: 100%;
        min-width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .world-item-image img,
    .world-item-image video {
        max-width: 100%;
        width: 100%;
    }

    .world-item-text-content h3 {
        font-size: 1.3rem;
    }
    .headshot-wrapper {
        width: 150px;
        height: 150px;
    }

    .headshot,
    .headshot-placeholder {
        width: 150px;
        height: 150px;
        border-width: 4px;
    }

    .placeholder-icon {
        font-size: 60px;
    }

    /* Adjust icons row for mobile */
    .icons-row {
        gap: 15px;
    }

    .face-icon {
        min-width: 80px;
        padding: 14px 18px;
    }

    .face-icon svg {
        width: 30px;
        height: 30px;
    }

    .icon-label {
        font-size: 0.75rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

}

/* Welcome Overlay */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    pointer-events: auto;
}

.welcome-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-content {
    position: relative;
    text-align: center;
    padding: 40px;
    z-index: 1;
    animation: welcomeFadeIn 1.2s ease-out;
}

.welcome-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: welcomePulse 3s ease-in-out infinite;
    z-index: -1;
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 40px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.2);
    letter-spacing: -0.02em;
    animation: welcomeTitleSlide 1s ease-out 0.3s both;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.05em;
    animation: welcomeSubtitleFade 1s ease-out 0.6s both;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.welcome-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.welcome-particles::before,
.welcome-particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.6),
        0 0 20px rgba(255, 255, 255, 0.4);
    animation: welcomeParticleFloat 4s ease-in-out infinite;
}

.welcome-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.welcome-particles::after {
    top: 60%;
    right: 25%;
    animation-delay: 2s;
}

@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes welcomePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.5;
    }
}

@keyframes welcomeTitleSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes welcomeSubtitleFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

@keyframes welcomeParticleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) translateX(-15px);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-30px) translateX(5px);
        opacity: 1;
    }
}

/* Welcome Headshot Blackboard Eraser Effect */
.welcome-headshot {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    animation: headshotAppearRight 0.6s ease-out 2s forwards, headshotEraseLeft 3s linear 2.6s forwards;
    overflow: visible;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}

.welcome-headshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(1.1) contrast(1.05);
    border-radius: 50%;
}

/* Dust particles effect */
.welcome-headshot::before,
.welcome-headshot::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
    animation: dustParticles 2.5s ease-in-out 2.6s infinite;
}

.welcome-headshot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: dustCloud 2.5s ease-in-out 2.6s forwards;
    pointer-events: none;
}

.welcome-headshot::after {
    display: none;
}

@keyframes headshotAppearRight {
    0% {
        opacity: 0;
        right: 5%;
        transform: translateY(-50%) scale(0.3);
    }
    100% {
        opacity: 1;
        right: 5%;
        transform: translateY(-50%) scale(1);
    }
}

@keyframes headshotEraseLeft {
    0% {
        right: 5%;
        left: auto;
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    10% {
        right: 0%;
        left: auto;
        transform: translateY(-50%) scale(1.05);
        opacity: 1;
    }
    25% {
        right: auto;
        left: 80%;
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }
    40% {
        right: auto;
        left: 50%;
        transform: translateY(-50%) scale(1.2);
        opacity: 1;
    }
    55% {
        right: auto;
        left: 30%;
        transform: translateY(-50%) scale(1.3);
        opacity: 1;
    }
    70% {
        right: auto;
        left: 10%;
        transform: translateY(-50%) scale(1.4);
        opacity: 1;
    }
    85% {
        right: auto;
        left: -5%;
        transform: translateY(-50%) scale(1.3);
        opacity: 1;
    }
    100% {
        right: auto;
        left: -30%;
        transform: translateY(-50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes dustParticles {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-30px, -20px) scale(1);
    }
    40% {
        opacity: 0.8;
        transform: translate(-60px, -40px) scale(0.8);
    }
    60% {
        opacity: 0.6;
        transform: translate(-90px, -30px) scale(0.6);
    }
    100% {
        opacity: 0;
        transform: translate(-120px, -50px) scale(0.3);
    }
}

/* Blackboard eraser effect - text disappears as headshot passes */
.welcome-overlay.wiping .welcome-content {
    position: relative;
    z-index: 10000;
}

.welcome-overlay.wiping .welcome-title,
.welcome-overlay.wiping .welcome-subtitle {
    position: relative;
    z-index: 1;
    animation: textEraseDuster 2.5s ease-in-out 2.6s forwards;
}

@keyframes textEraseDuster {
    0% {
        clip-path: inset(0 0% 0 0%);
        -webkit-clip-path: inset(0 0% 0 0%);
        opacity: 1;
        filter: blur(0px);
    }
    15% {
        clip-path: inset(0 20% 0 0%);
        -webkit-clip-path: inset(0 20% 0 0%);
        opacity: 0.9;
        filter: blur(0.5px);
    }
    30% {
        clip-path: inset(0 40% 0 0%);
        -webkit-clip-path: inset(0 40% 0 0%);
        opacity: 0.7;
        filter: blur(1px);
    }
    50% {
        clip-path: inset(0 60% 0 0%);
        -webkit-clip-path: inset(0 60% 0 0%);
        opacity: 0.5;
        filter: blur(1.5px);
    }
    70% {
        clip-path: inset(0 80% 0 0%);
        -webkit-clip-path: inset(0 80% 0 0%);
        opacity: 0.3;
        filter: blur(2px);
    }
    85% {
        clip-path: inset(0 90% 0 0%);
        -webkit-clip-path: inset(0 90% 0 0%);
        opacity: 0.1;
        filter: blur(2.5px);
    }
    100% {
        clip-path: inset(0 100% 0 0%);
        -webkit-clip-path: inset(0 100% 0 0%);
        opacity: 0;
        filter: blur(3px);
    }
}

/* Responsive welcome overlay */
@media (max-width: 768px) {
    .welcome-title {
        font-size: 2.5rem;
    }
    
    .welcome-subtitle {
        font-size: 1.1rem;
    }
    
    .welcome-glow {
        width: 300px;
        height: 300px;
    }
    
    .welcome-headshot {
        animation: headshotWipe 1.2s ease-in-out 2s forwards;
    }
}

/* ============================================================================
   NOTIFICATION SYSTEM
   ============================================================================ */

/* Notification Container */
.notification-container {
    position: relative !important;
    display: inline-block !important;
    z-index: auto !important;
    isolation: auto !important;
}

.notification-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
    }
}

/* Notification Dropdown */
.notification-dropdown {
    position: fixed !important; /* Use fixed to escape any parent stacking contexts */
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: 20px !important;
    width: 400px;
    max-width: 90vw;
    max-height: 600px;
    background: rgba(10, 12, 20, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    z-index: 99999999 !important; /* Highest z-index - above everything including modals */
    overflow: hidden !important;
    display: none; /* Start hidden - inline style will override */
    flex-direction: column !important;
    animation: slideDown 0.3s ease-out;
    pointer-events: auto !important;
    isolation: isolate !important; /* Create new stacking context */
    visibility: hidden; /* Ensure it's hidden initially */
    opacity: 0; /* Start with opacity 0 */
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out !important;
    transform: none !important; /* Ensure no transform creates stacking context issues */
    will-change: transform, opacity; /* Optimize for animation */
}

/* When shown via inline style */
.notification-dropdown[style*="display: flex"],
.notification-dropdown[style*="display:flex"] {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure parent containers don't clip the dropdown */
.dashboard-header,
.dashboard-actions,
.notification-container {
    overflow: visible !important;
    position: relative !important;
}

/* Nav-bar should be fixed at top for feed/quotes/discover pages */
.nav-bar {
    overflow: visible !important;
}

/* Ensure dashboard container doesn't clip */
.dashboard-container {
    overflow: visible !important;
}

/* Ensure category sections don't create stacking contexts that interfere */
.category-section {
    isolation: auto !important;
}

/* Notification container should not create stacking context */
.notification-container {
    z-index: auto !important;
    position: relative !important;
    isolation: auto !important;
}

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

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(102, 126, 234, 0.1);
}

.notification-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.mark-all-read-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark-all-read-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.notification-list {
    overflow-y: auto;
    max-height: 500px;
    padding: 8px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
}

.notification-item.unread:hover {
    background: rgba(102, 126, 234, 0.15);
}

.notification-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-entry-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-time {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.loading-notifications,
.empty-notifications {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Notification Page Styles */
.notifications-page {
    min-height: 100vh;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.notifications-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notifications-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.notification-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

.notifications-list-page {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item-page {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-item-page:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.notification-item-page.unread {
    background: rgba(102, 126, 234, 0.15);
    border-left: 4px solid #667eea;
}

.notification-avatar-page {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.notification-content-page {
    flex: 1;
}

.notification-text-page {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.5;
}

.notification-entry-title-page {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.notification-time-page {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.notification-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding-top: 4px;
}

.notification-action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.notification-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.notification-action-btn.delete:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.4);
    color: #f44336;
}

@media (max-width: 768px) {
    .notification-dropdown {
        width: 320px;
        right: -50px;
    }
    
    .notifications-page-title {
        font-size: 2rem;
    }
    
    .notification-item-page {
        padding: 12px;
    }
}


