        /* MOBILE-OPTIMIZED STYLES */
        :root {
            /* Safe Area for Mobile Notch */
            --safe-top: env(safe-area-inset-top);
            --safe-bottom: env(safe-area-inset-bottom);
            --safe-left: env(safe-area-inset-left);
            --safe-right: env(safe-area-inset-right);

            /* Color Palette */
            --primary: #6a4df4;
            --primary-dark: #4b32c3;
            --secondary: #74b9ff;
            --accent: #ff7675;

            /* Text Colors */
            --text-main: #1d1d1f;
            --text-muted: #86868b;
            --danger: #ff3b30;

            /* Glassmorphism System */
            --glass-bg: rgba(255, 255, 255, 0.65);
            --glass-border: rgba(255, 255, 255, 0.5);
            --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
            --blur: blur(25px) saturate(180%);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            outline: none;
        }

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

        body {
            background: #f0f2f5;
            color: var(--text-main);
            font-family: 'Manrope', sans-serif;
            line-height: 1.7;
            font-size: 16px;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
            transition: filter 0.5s ease;
        }

        /* Aurora Background */
        .aurora-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
            background: #f4f6f9;
            transition: all 1s ease;
        }

        .aurora-blob {
            position: absolute;
            filter: blur(80px);
            opacity: 0.6;
            animation: float 10s infinite ease-in-out alternate;
            transition: background 2s ease-in-out;
            will-change: transform;
        }

        .blob-1 {
            top: -10%;
            left: -10%;
            width: 50vw;
            height: 50vw;
            background: var(--primary);
            animation-duration: 15s;
        }

        .blob-2 {
            bottom: -10%;
            right: -10%;
            width: 60vw;
            height: 60vw;
            background: var(--secondary);
            animation-duration: 20s;
        }

        .blob-3 {
            top: 40%;
            left: 40%;
            width: 40vw;
            height: 40vw;
            background: var(--accent);
            animation-duration: 12s;
            opacity: 0.4;
        }

        @keyframes float {
            0% { transform: translate(0, 0) scale(1); }
            100% { transform: translate(30px, 50px) scale(1.1); }
        }

        /* Glass Panel */
        .glass-panel {
            background: var(--glass-bg);
            backdrop-filter: var(--blur);
            -webkit-backdrop-filter: var(--blur);
            border: 1px solid var(--glass-border);
            box-shadow: var(--glass-shadow);
            transform: translateZ(0);
        }

        /* Typography - Mobile Optimized */
        h1, h2, h3, h4 {
            font-family: 'Playfair Display', serif;
            color: #000;
            font-weight: 700;
        }

        h1 {
            font-size: clamp(2rem, 8vw, 4.8rem);
            line-height: 1.1;
            letter-spacing: -0.02em;
            margin-bottom: 20px;
        }

        h2 {
            font-size: clamp(1.6rem, 5vw, 3rem);
            margin-bottom: 25px;
            position: relative;
            display: inline-block;
        }

        h3 {
            font-size: clamp(1.2rem, 4vw, 1.4rem);
            margin-bottom: 15px;
            margin-top: 30px;
            color: #111;
            border-left: 4px solid var(--primary);
            padding-left: 15px;
        }

        .subtitle {
            font-family: 'Cinzel', serif;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            font-size: clamp(0.65rem, 2vw, 0.75rem);
            color: var(--primary);
            font-weight: 800;
            margin-bottom: 15px;
            display: block;
        }

        p {
            margin-bottom: 20px;
            color: var(--text-muted);
            text-align: justify;
            font-size: clamp(0.95rem, 2.5vw, 1.05rem);
            line-height: 1.7;
        }

        /* Buttons - Touch Optimized */
        .btn {
            cursor: pointer;
            padding: 14px 28px;
            border: none;
            border-radius: 50px;
            background: #111;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-size: clamp(0.7rem, 2vw, 0.75rem);
            font-weight: 700;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            text-decoration: none;
            display: inline-flex;
            justify-content: center;
            align-items: center;
            white-space: nowrap;
            min-height: 44px;
        }

        .btn:hover, .btn:active {
            transform: scale(1.05);
            background: var(--primary);
            box-shadow: 0 20px 40px rgba(106, 77, 244, 0.3);
        }

        .btn-outline {
            background: transparent;
            border: 1px solid #111;
            color: #111;
        }

        .btn-outline:hover, .btn-outline:active {
            background: #111;
            color: #fff;
            border-color: #111;
        }

        .btn-danger {
            background: var(--danger);
            color: white;
            width: 100%;
            margin-top: 10px;
        }

        /* Layout - Safe Area Support */
        .container {
            width: 90%;
            max-width: 1050px;
            margin: 0 auto;
            position: relative;
            z-index: 2;
            padding-left: max(5%, var(--safe-left));
            padding-right: max(5%, var(--safe-right));
        }

        section {
            padding: clamp(60px, 15vw, 120px) 0;
            position: relative;
        }

        /* Navigation - Mobile First */
        nav {
            padding: 12px 5%;
            padding-top: calc(12px + var(--safe-top));
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: all 0.3s ease;
            border-bottom: 1px solid rgba(255,255,255,0.3);
        }

        .nav-logo {
            font-family: 'Cinzel', serif;
            font-weight: 800;
            font-size: clamp(1.1rem, 4vw, 1.4rem);
            cursor: pointer;
            color: #111;
            letter-spacing: 0.05em;
        }

        /* Hero Section - Mobile First */
        .hero-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 40px;
            align-items: center;
            min-height: 70vh;
        }

        .hero-image-wrapper {
            order: -1;
        }

        .hero-image-wrapper img {
            width: 100%;
            border-radius: 24px;
            box-shadow: 0 30px 60px rgba(0,0,0,0.15);
            border: 1px solid rgba(255,255,255,0.6);
            transition: 0.5s ease;
        }

        .hero-content {
            text-align: center;
        }

        .btn-group {
            display: flex;
            gap: 12px;
            margin-top: 30px;
            flex-wrap: wrap;
            justify-content: center;
        }

        @media(min-width: 900px) {
            .hero-grid {
                grid-template-columns: 1.2fr 0.8fr;
                gap: 70px;
                min-height: 85vh;
            }
            .hero-image-wrapper {
                order: 0;
            }
            .hero-image-wrapper img {
                border-radius: 32px;
                transform: rotate(2deg);
            }
            .hero-image-wrapper:hover img {
                transform: rotate(0deg) scale(1.02);
            }
            .hero-content {
                text-align: left;
            }
            .btn-group {
                justify-content: flex-start;
            }
        }

        /* Chat Application - Critical Mobile Optimization */
        .chat-wrapper {
            background: rgba(255,255,255,0.85);
            backdrop-filter: blur(40px);
            border-radius: 24px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            height: 100dvh;
            height: calc(100dvh - var(--safe-top));
            display: flex;
            flex-direction: column;
            position: relative;
            border: 1px solid rgba(255,255,255,0.6);
        }

        @media(min-width: 768px) {
            .chat-wrapper {
                height: 90vh;
                border-radius: 32px;
            }
        }

        .chat-header {
            padding: 15px 18px;
            padding-top: calc(15px + var(--safe-top));
            z-index: 10;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(255,255,255,0.6);
            border-bottom: 1px solid rgba(0,0,0,0.05);
            flex-shrink: 0;
        }

        .chat-header-left, .chat-header-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chat-header-center {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            justify-content: center;
        }

        .chat-header-center span {
            font-weight: 800;
            font-size: clamp(0.9rem, 3vw, 1rem);
            letter-spacing: 0.1em;
            font-family: 'Cinzel', serif;
        }

        .header-btn {
            padding: 6px 12px;
            border-radius: 12px;
            font-size: clamp(1rem, 4vw, 1.2rem);
            border: none;
            background: transparent;
            cursor: pointer;
            transition: 0.2s;
            min-width: 44px;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .header-btn:active {
            transform: scale(0.9);
            background: rgba(0,0,0,0.05);
        }

        .header-btn-text {
            display: none;
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            color: #111;
        }

        @media(min-width: 768px) {
            .header-btn-text {
                display: inline;
            }
        }

        .back-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 8px;
            transition: 0.2s;
            min-height: 44px;
        }

        .back-btn:active {
            background: rgba(0,0,0,0.05);
            transform: scale(0.95);
        }

        .back-btn span:first-child {
            font-size: 1.2rem;
            color: var(--primary);
        }

        .back-btn span:last-child {
            font-weight: 700;
            font-size: 0.75rem;
            color: var(--primary);
            letter-spacing: 0.05em;
        }

        .chat-messages {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 15px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            background: transparent;
            -webkit-overflow-scrolling: touch;
        }

        /* Message Styling - Mobile Optimized */
        #soul-avatars {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 5;
            width: 100%;
            height: 100%;
            background: transparent !important;
        }

        .message-row {
            display: flex;
            align-items: flex-end;
            margin-bottom: 10px;
            width: 100%;
        }

        .message-row.mine {
            flex-direction: row-reverse;
        }

        .message-row.system {
            justify-content: center;
        }

        .soul-avatar-placeholder {
            width: 40px;
            height: 40px;
            margin: 0 8px;
            flex-shrink: 0;
            /* Placeholder background for debugging or fallback */
            /* background: rgba(0,0,0,0.05); */
            border-radius: 50%;
        }

        .message {
            padding: 10px 14px;
            border-radius: 18px;
            border-bottom-left-radius: 4px;
            max-width: 75%;
            font-size: clamp(0.9rem, 2.5vw, 0.95rem);
            position: relative;
            background: #fff;
            color: #1a1a1a;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            transition: all 0.3s ease;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        .message-row.mine .message {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: #fff;
            border-radius: 18px;
            border-bottom-left-radius: 18px;
            border-bottom-right-radius: 4px;
            box-shadow: 0 6px 18px rgba(106, 77, 244, 0.25);
        }

        .message.system {
            background: #2d3436;
            color: #fff;
            border: 1px solid #000;
            border-radius: 12px;
            font-family: 'Courier New', monospace;
            font-size: clamp(0.8rem, 2vw, 0.85rem);
            max-width: 90%;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }

        .msg-time {
            font-size: clamp(0.6rem, 1.8vw, 0.65rem);
            opacity: 0.6;
            margin-top: 4px;
            text-align: right;
        }

        .msg-author {
            font-size: clamp(0.65rem, 2vw, 0.7rem);
            font-weight: 800;
            color: var(--primary);
            display: block;
            margin-bottom: 4px;
            cursor: pointer;
        }

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

        .controls {
            position: absolute;
            top: -8px;
            right: -8px;
            display: flex;
            gap: 4px;
            opacity: 0;
            transition: 0.2s;
        }

        .message:hover .controls,
        .message:active .controls {
            opacity: 1;
        }

        .control-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(0,0,0,0.7);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.7rem;
            transition: 0.2s;
        }

        .control-btn:active {
            transform: scale(0.85);
        }

        /* Media in messages */
        .msg-media {
            max-width: 100%;
            border-radius: 12px;
            margin-bottom: 6px;
        }

        .msg-img {
            cursor: pointer;
            max-height: 300px;
            object-fit: cover;
        }

        .msg-video {
            max-height: 250px;
        }

        /* Audio Player */
        .custom-audio-player {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(0,0,0,0.05);
            padding: 10px;
            border-radius: 12px;
            min-width: 200px;
        }

        .audio-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.8rem;
            transition: 0.2s;
            flex-shrink: 0;
        }

        .audio-btn:active {
            transform: scale(0.9);
        }

        .audio-track {
            flex: 1;
            height: 4px;
            background: rgba(0,0,0,0.1);
            border-radius: 2px;
            position: relative;
            overflow: hidden;
        }

        .audio-progress {
            height: 100%;
            background: var(--primary);
            width: 0%;
            transition: width 0.1s;
        }

        /* Chat Input Area - Critical for Mobile */
        #media-preview-area {
            display: none;
            position: absolute;
            top: -65px;
            left: 15px;
            right: 15px;
            background: rgba(255,255,255,0.95);
            backdrop-filter: blur(20px);
            padding: 12px 15px;
            border-radius: 16px;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
            z-index: 30;
        }

        .preview-content {
            display: flex;
            align-items: center;
            gap: 10px;
            flex: 1;
            min-width: 0;
        }

        #preview-icon {
            font-size: 1.5rem;
            flex-shrink: 0;
        }

        #preview-name {
            font-size: 0.85rem;
            font-weight: 600;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        .chat-input-area {
            padding: 12px 15px;
            padding-bottom: calc(12px + var(--safe-bottom));
            background: rgba(255,255,255,0.8);
            backdrop-filter: blur(20px);
            display: flex;
            gap: 8px;
            align-items: center;
            z-index: 20;
            border-top: 1px solid rgba(255,255,255,0.5);
            position: relative;
            flex-shrink: 0;
        }

        .standard-input-group {
            display: flex;
            width: 100%;
            gap: 8px;
            align-items: center;
        }

        .chat-input-area input[type="text"] {
            flex: 1;
            padding: 12px 16px;
            border: 1px solid rgba(0,0,0,0.05);
            border-radius: 24px;
            outline: none;
            background: #fff;
            font-size: 15px;
            transition: 0.3s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
            min-width: 0;
        }

        .chat-input-area input[type="text"]:focus {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(106, 77, 244, 0.15);
        }

        .media-btn {
            width: 44px;
            height: 44px;
            min-width: 44px;
            border-radius: 50%;
            border: none;
            background: #fff;
            cursor: pointer;
            color: #555;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.2s;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            flex-shrink: 0;
        }

        .media-btn:active {
            transform: scale(0.9);
            background: #f0f0f0;
        }

        #send-btn {
            background: #111;
            color: #fff;
        }

        #send-btn:active {
            background: var(--primary);
        }

        /* Radio Mode */
        .radio-overlay {
            pointer-events: none;
            position: absolute;
            inset: 0;
            z-index: 50;
            opacity: 0;
            transition: opacity 0.3s;
            background: repeating-linear-gradient(0deg, rgba(0,0,0,0.05), rgba(0,0,0,0.05) 1px, transparent 1px, transparent 2px);
            mix-blend-mode: overlay;
        }

        .radio-active .radio-overlay { opacity: 1; }

        .radio-btn-big {
            display: none;
            width: 100%;
            height: 50px;
            background: #2d3436;
            color: #fff;
            font-family: 'Cinzel', serif;
            font-weight: 800;
            letter-spacing: 2px;
            border: 2px solid #636e72;
            border-radius: 50px;
            text-transform: uppercase;
            cursor: pointer;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
            font-size: clamp(0.7rem, 2.5vw, 0.85rem);
            user-select: none;
            -webkit-user-select: none;
        }

        .radio-btn-big.pressed {
            background: #e74c3c;
            transform: scale(0.98);
        }

        .radio-active .standard-input-group { display: none; }
        .radio-active .radio-btn-big { display: block; }
        .radio-active .chat-wrapper { animation: jitter 0.2s infinite; }

        @keyframes jitter {
            0% { transform: translate(0,0); }
            25% { transform: translate(0.5px, 0.5px); }
            50% { transform: translate(-0.5px, -0.5px); }
            75% { transform: translate(-0.5px, 0.5px); }
            100% { transform: translate(0.5px, -0.5px); }
        }

        /* Night Vision */
        .nvg-mode {
            filter: sepia(1) hue-rotate(70deg) contrast(1.5) brightness(0.8) saturate(2);
        }
        .nvg-mode .aurora-bg { background: #000; }
        .nvg-mode .message { background: #000; color: #0f0; border: 1px solid #0f0; font-family: 'Courier New', monospace; }

        /* Modals - Mobile Optimized */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(15px);
            z-index: 2000;
            display: none;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .modal-box {
            background: rgba(255,255,255,0.9);
            backdrop-filter: blur(40px);
            width: 100%;
            max-width: 400px;
            padding: clamp(30px, 8vw, 40px);
            border-radius: 24px;
            text-align: center;
            position: relative;
            box-shadow: 0 40px 80px rgba(0,0,0,0.2);
            border: 1px solid rgba(255,255,255,0.6);
            max-height: 90vh;
            overflow-y: auto;
        }

        .close-icon {
            position: absolute;
            top: 15px;
            right: 15px;
            cursor: pointer;
            font-size: 1.5rem;
            width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: 0.2s;
        }

        .close-icon:active {
            background: rgba(0,0,0,0.05);
            transform: scale(0.9);
        }

        input:not([type="file"]), select, textarea {
            width: 100%;
            padding: 14px;
            margin-bottom: 12px;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 14px;
            background: rgba(255,255,255,0.6);
            transition: 0.3s;
            font-size: 15px;
        }

        input:focus, select:focus, textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(106, 77, 244, 0.15);
        }

        /* Profile Modal - Liquid Glass */
        .glass-profile-modal {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 24px;
            padding: clamp(30px, 8vw, 40px);
            width: 100%;
            max-width: 500px;
            position: relative;
            box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 40px rgba(255,255,255,0.5);
            max-height: 90vh;
            overflow-y: auto;
            color: #333333;
            font-family: 'Manrope', sans-serif !important;
            text-shadow: none;
        }

    .glass-profile-modal h1,
    .glass-profile-modal h2,
    .glass-profile-modal h3,
    .glass-profile-modal h4,
    .glass-profile-modal p,
    .glass-profile-modal span,
    .glass-profile-modal div,
    .glass-profile-modal strong {
        font-family: 'Manrope', sans-serif !important;
        color: #333333;
    }

    /* 3D Flower Visibility Fix */
    #profile-flower-canvas {
        width: 100% !important;
        height: 350px !important;
        display: block !important;
        margin: 0 auto 20px auto !important;
        z-index: 10;
        position: relative;
        background: radial-gradient(circle at center, rgba(106, 77, 244, 0.2) 0%, transparent 70%);
    }

        /* Flower / Tamagotchi Panel */
        .flower-panel {
            margin-top: 15px;
            padding: 15px;
            background: rgba(255,255,255,0.4);
            border: 1px dashed #333;
            border-radius: 12px;
        }

        .flower-stats {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }

        .stat-box {
            text-align: center;
            flex: 1;
        }

        .stat-label {
            display: block;
            font-size: 0.7rem;
            color: #666;
            font-weight: 600;
        }

        .stat-val {
            font-size: 1.1rem;
            font-weight: 800;
        }

        .flower-actions {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
        }

        .btn-small {
            padding: 8px 16px;
            border-radius: 8px;
            border: 1px solid #333;
            background: transparent;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            transition: 0.2s;
            text-transform: uppercase;
        }

        .btn-small:hover:not(:disabled) {
            background: #333;
            color: #fff;
        }

        .btn-small:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            border-style: dashed;
        }

        .btn-primary {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
        }

        .btn-primary:hover:not(:disabled) {
            background: var(--primary-dark);
            border-color: var(--primary-dark);
        }

        /* Lists */
        .users-list {
            max-height: 50vh;
            overflow-y: auto;
            text-align: left;
            margin-top: 20px;
            -webkit-overflow-scrolling: touch;
        }

        .user-item {
            padding: 12px;
            border-bottom: 1px solid rgba(0,0,0,0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            border-radius: 8px;
            transition: 0.2s;
            min-height: 44px;
        }

        .user-item:active {
            background: rgba(0,0,0,0.05);
        }

        .u-rank {
            font-size: clamp(0.65rem, 2vw, 0.7rem);
            background: #111;
            color: #fff;
            padding: 3px 10px;
            border-radius: 10px;
        }

        #report-content {
            font-family: 'Courier New', monospace;
            font-size: clamp(0.8rem, 2vw, 0.85rem);
            text-align: left;
            background: rgba(0,0,0,0.05);
            padding: 15px;
            border-radius: 10px;
            max-height: 50vh;
            overflow-y: auto;
            white-space: pre-wrap;
            -webkit-overflow-scrolling: touch;
        }

        /* Utils */
        .hidden { display: none !important; }
        .reveal { opacity: 0; transform: translateY(40px); transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1); }
        .reveal.active { opacity: 1; transform: translateY(0); }

        .codex-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            background: rgba(255,255,255,0.7);
            box-shadow: 0 10px 40px rgba(0,0,0,0.05);
            border-radius: 16px;
            overflow: hidden;
            margin: 30px 0;
            font-size: clamp(0.8rem, 2vw, 0.95rem);
        }
        .codex-table th {
            background: #111;
            color: #fff;
            padding: clamp(12px, 3vw, 20px);
            text-align: left;
        }
        .codex-table td {
            padding: clamp(12px, 3vw, 20px);
            border-bottom: 1px solid rgba(0,0,0,0.05);
        }

        #toast-container {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 5000;
            max-width: 90%;
        }
        .toast {
            background: rgba(20, 20, 20, 0.95);
            color: white;
            padding: 12px 24px;
            border-radius: 50px;
            font-size: clamp(0.8rem, 2.5vw, 0.9rem);
            backdrop-filter: blur(10px);
            margin-top: 10px;
            animation: fadeUp 0.3s forwards;
            text-align: center;
        }
        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .card-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: clamp(20px, 4vw, 40px);
            margin-top: 30px;
        }

        @media(min-width: 600px) {
            .card-grid {
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            }
        }

        .card-panel {
            padding: clamp(20px, 5vw, 30px);
            border-radius: 20px;
        }

        #image-viewer {
            padding: 20px;
        }

        #viewer-img {
            max-width: 95%;
            max-height: 85vh;
            border-radius: 10px;
            box-shadow: 0 0 50px rgba(0,0,0,0.5);
            object-fit: contain;
        }

        #nav-user {
            display: flex;
            align-items: center;
            gap: clamp(8px, 2vw, 15px);
        }

        #nav-user > div {
            text-align: right;
            cursor: pointer;
            line-height: 1.2;
        }

        #nav-username {
            font-weight: 700;
            font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        }

        #nav-rank {
            font-size: clamp(0.6rem, 2vw, 0.65rem);
            color: var(--primary);
            text-transform: uppercase;
            font-weight: 800;
        }

        /* Improved Scrollbar */
        .chat-messages::-webkit-scrollbar,
        .users-list::-webkit-scrollbar,
        #report-content::-webkit-scrollbar {
            width: 6px;
        }

        .chat-messages::-webkit-scrollbar-track,
        .users-list::-webkit-scrollbar-track,
        #report-content::-webkit-scrollbar-track {
            background: rgba(0,0,0,0.05);
            border-radius: 10px;
        }

        .chat-messages::-webkit-scrollbar-thumb,
        .users-list::-webkit-scrollbar-thumb,
        #report-content::-webkit-scrollbar-thumb {
            background: rgba(0,0,0,0.2);
            border-radius: 10px;
        }

        /* Countdown Timer */
        #countdown-timer {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 650px;
            background: rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 20px;
            padding: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.05);
            z-index: 400; /* Visible on landing page, below chat interface (500) */
            text-align: center;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .countdown-header {
            font-family: 'Cinzel', serif;
            font-weight: 800;
            color: #111;
            font-size: clamp(0.8rem, 3vw, 1rem);
            letter-spacing: 0.1em;
            margin-bottom: 5px;
        }

        .countdown-grid {
            display: flex;
            justify-content: space-around;
            align-items: center;
            gap: 5px;
        }

        .time-block {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 45px;
        }

        .time-block span:first-child {
            font-family: 'Courier New', monospace;
            font-weight: 700;
            color: #111;
            font-size: clamp(1.2rem, 4vw, 1.8rem);
            line-height: 1;
        }

        .time-block .label {
            font-size: clamp(0.5rem, 1.5vw, 0.6rem);
            color: #888;
            font-weight: 600;
            margin-top: 4px;
        }

        /* Mobile Adjustments */
        @media (max-width: 400px) {
            #countdown-timer {
                padding: 10px;
                width: 95%;
                bottom: 10px;
            }
            .time-block {
                min-width: 30px;
            }
        }

        @media (max-width: 768px) {
            .glass-panel {
                backdrop-filter: blur(10px);
                -webkit-backdrop-filter: blur(10px);
            }
            .chat-wrapper {
                backdrop-filter: blur(20px);
                -webkit-backdrop-filter: blur(20px);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .aurora-blob {
                animation: none;
            }
            *, *::before, *::after {
                animation-duration: 0.001s !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.001s !important;
                scroll-behavior: auto !important;
            }
        }
