@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Bebas+Neue&family=Roboto:wght@400;500;600&display=swap');

 
/* ===================================
LAYER ARCHITECTURE
=================================== */
@layer tokens, reset, base, components, utilities;

/* ===================================
DESIGN TOKENS - SINGLE SOURCE OF TRUTH
=================================== */
@layer tokens {
    :root {
        /* Typography Scale - Aligned growth rates */
        --fs-base: clamp(0.88rem, 0.78rem + 0.55vw, 1rem);         /* Body text */
        --fs-h1: clamp(2.4rem, 1.9rem + 2vw, 2.6rem);             /* Hero titles */
        --fs-h2: clamp(1.55rem, 1.25rem + 1vw, 2.1rem);           /* Section titles */
        --fs-callout: clamp(1.1rem, 0.95rem + 0.5vw, 1.35rem);    /* Important text */
        --fs-medium: clamp(0.85rem, 0.5rem + 0.4vw, 1rem);        /* Micro-copy */
       --fs-small: clamp(0.75rem, 0.4rem + 0.25vw, 0.875rem);

        
        /* Spacing Scale - Matched growth rate to typography */
        --sp-base: clamp(0.4rem, 0.35rem + 0.55vw, 0.8rem);       /* Universal spacing */
        --sp-lg: clamp(1.2rem, 0.9rem + 1.8vw, 2.4rem);           /* Large sections */
        --sp-md: clamp(0.8rem, 0.65rem + 0.9vw, 1.4rem);          /* Medium spacing */
        --sp-sm: clamp(0.25rem, 0.22rem + 0.3vw, 0.45rem);        /* Micro-spacing */
        --sp-xl: clamp(2rem, 1.5rem + 2.5vw, 4rem);               /* Extra large sections */
        
        /* Component Size Scale */
        --size-avatar-sm: clamp(32px, 4vw, 48px);                  /* Small avatar */
        --size-avatar-md: clamp(48px, 6vw, 80px);                  /* Medium avatar */
        --size-avatar-lg: clamp(80px, 8vw, 130px);                 /* Large avatar */
        --size-button: clamp(36px, 5vw, 44px);                     /* Button height */
        
        /* Typography Foundation - Optimized font stacks */
        --ff-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
        --ff-heading: "Bangers", "Comic Sans MS", cursive, fantasy;
        --ff-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
        --ff-button: "Bebas Neue", "Arial Black", "Helvetica Neue", Arial, sans-serif;
        --ff-decorative: "Bangers", "Comic Sans MS", cursive, fantasy;
        --ff-futuristic: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
        
        /* Colors - WCAG AA+ Compliant */
        --text-primary: #222222;
        --text-secondary: #827D7D;
        --text-muted: #4A4A4A;           /* Improved contrast for small text */
        --accent-red: #f52363;
        --accent-blue: #039CE2;
        --accent-yellow: #FFC107;
        --panel-bg: rgba(255, 255, 255, 0.85);
        
        /* Layout Tokens */
        --blur: 25px;
        --radius: 24px;
        --radius-sm: 8px;
        --radius-lg: 32px;
        
        /* Shadow System */
        --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
        --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
        --shadow-focus: 0 0 0 3px rgba(52, 144, 220, 0.1);
        --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.5);
        --shadow-glow: 0 0 30px rgba(255, 215, 0, 0.3);
        
        /* Border System */
        --border-light: 1px solid rgba(204, 204, 204, 0.3);
        --border-medium: 1px solid #e8e8e8;
        --border-accent: 2px solid rgba(52, 144, 220, 0.2);
        --border-focus: 2px solid #3490dc;
        
        /* Motion System - Specific properties only */
        --tr-fast: transform 0.2s ease, opacity 0.2s ease;
        --tr-smooth: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        --tr-slow: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
        --tr-bounce: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        --tr-colors: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
        --tr-layout: padding 0.3s ease, margin 0.3s ease, width 0.3s ease, height 0.3s ease;
        --transition: var(--tr-smooth); /* Alias for backward compatibility */
    }
    
    /* Dark mode token overrides */
    /* @media (prefers-color-scheme: dark) {
        :root {
            --text-primary: #e8e8e8;
            --text-secondary: #c0c0c0;
            --text-muted: #a0a0a0;
            --panel-bg: rgba(32, 32, 32, 0.85);
            --border-light: 1px solid rgb(80 79 100 / 10%);
            --border-medium: 1px solid rgba(255, 255, 255, 0.15);
            --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.3);
            --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
        }
    } */
}

/* ===================================
RESET & GLOBAL STYLES
=================================== */
@layer reset {
    html {
        color-scheme: light dark; /* Native dark scrollbars */
    }
    
    :where(*, *::before, *::after) {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    body {
        font-family: var(--ff-body);
        font-weight: 400;
        background-color: #ffffff;
        color: var(--text-primary);
        overflow-x: hidden;
        line-height: 1.6;
        font-size: var(--fs-base);
    }
    
    /* Fallback styling for broken images */
    img {
        min-height: 1px;
    }
    
    .user-avatar-container img,
    .avatar-frame img {
        background-color: #f0f0f0;
        border: 1px solid #ddd;
    }
    
    /* Focus styles */
    :focus-visible {
        outline: #3490dc solid 2px;
        outline-offset: 2px;
    }
    
    /* Scrollbar styling */
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(52, 144, 220, 0.3);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(52, 144, 220, 0.5);
    }
}

/* ===================================
BASE LAYOUT & STRUCTURE
=================================== */
@layer base {
    #superwrapper {
        width: 100%;
        min-height: 100vh;
        position: relative;
    }
    
    #wrapper {
        display: flex;
        gap: var(--sp-lg);
        max-width: 1600px;
        margin: 0 auto;
        padding: var(--sp-lg);
        position: relative;
    }
    
    #contentColumn {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: var(--sp-lg);
        min-width: 0;
    }
    
    /* Main headers */
    h2 {
        font-family: var(--ff-heading);
        font-size: var(--fs-h1);
        color: #039CE2;
        border-bottom: 3px solid #020202;
        margin: var(--sp-lg) 0 var(--sp-md);
        padding-bottom: var(--sp-base);
    }
}

/* ===================================
COMPONENTS
=================================== */
@layer components {
    /* Loading & Header */
    #loadingSpinner {
        position: fixed;
        inset: 0;
        z-index: 9999;
        background: rgba(255, 255, 255, 0.95);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    #loadingSpinner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
.header {
  width: 100%;
  height: 0;
  /* â¬‡ (was in .header.active) */
  background: url("eloriab.webp") center center / contain no-repeat transparent;
  transition: 3s cubic-bezier(0.4,0,0.2,1);
  opacity: 0;
  position: relative;
  overflow: hidden;  height: min(50vw, 1000px);
}

/* .header.active now only drives height + opacity */
.header.active {

  opacity: 1;
}



    .header h1 { 
        display: none; 
    }
    
    .header.loading {
        opacity: 0;
    }
    

    
    /* Wallet Connection */
    .metamask-container {
        position: absolute;
        top: var(--sp-md);
        inset-inline-end: var(--sp-lg); /* Logical property for RTL support */
        z-index: 100;
    }
    
    .metamask-container button {
        position: relative;
        padding: var(--sp-base) var(--sp-base);
        font-size: var(--fs-callout);
        font-family: var(--ff-button);
        font-weight: bold;
        background: linear-gradient(45deg, transparent 5%, #ff013c 5%);
        border: 0;
        color: white;
        letter-spacing: 0.1em;
        box-shadow: #299efd 6px 0 0 0;
        cursor: pointer;
        transition: var(--tr-fast);
        text-transform: uppercase;
    }
    
    .metamask-container button:hover {
        background: linear-gradient(45deg, transparent 5%, #0fc6ae 5%);
        transform: translateX(-2px) translateY(-2px);
        box-shadow: #299efd 8px 2px 0 0;
        will-change: transform;
    }
    
    .metamask-container button::after {
        content: attr(data-text);
        position: absolute;
        inset: 0;
        background: linear-gradient(45deg, transparent 3%, #00e6f6 3%, #00e6f6 5%, #ff013c 5%);
        display: flex;
        align-items: center;
        justify-content: center;
        text-shadow: #f8f005 -2px -2px 0, #00e6f6 2px 2px 0;
        clip-path: inset(50%);
        opacity: 0;
    }
    
    .metamask-container button:hover::after {
        animation: glitch 1s steps(2);
        opacity: 1;
    }
    
    /* Left Sidebar */
    .left-column {
        width: 280px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: var(--sp-md);
    }
    
    /* Social Buttons */
    .social-buttons {
        display: flex;
        flex-direction: column;
        gap: var(--sp-md);
        margin-bottom: var(--sp-md);
    }
    
    .social-btn {
        display: flex;
        align-items: center;
        gap: var(--sp-base);
        padding: var(--sp-md) var(--sp-md);
        border-radius: 12px;
        text-decoration: none;
        font-weight: 600;
        font-size: var(--fs-base);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    box-shadow 0.3s ease, 
                    border-color 0.3s ease;
        border: 2px solid transparent; 
        position: relative;
        overflow: hidden;
    }
    
    .social-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.6s ease;
    }
    
    .social-btn:hover::before {
        left: 100%;
    }
    
    .social-btn i {
        font-size: var(--fs-base);
        flex-shrink: 0;
    }
    
    .discord-btn {
        background: linear-gradient(135deg, #5865F2, #4752C4);
        color: white;
        box-shadow: var(--shadow-hover);
    }
    
    .discord-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
        border-color: rgba(255, 255, 255, 0.3);
        will-change: transform;
    }
    
    .twitter-btn {
        background: linear-gradient(135deg, #1DA1F2, #0d7bc4);
        color: white;
        box-shadow: var(--shadow-hover);
    }
    
    .twitter-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
        border-color: rgba(255, 255, 255, 0.3);
        will-change: transform;
    }
    
    .dev-btn {
        background: linear-gradient(135deg, #6A11CB, #2575FC);
        color: white;
        box-shadow: var(--shadow-hover);
    }
    
    .dev-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
        border-color: rgba(255, 255, 255, 0.3);
        will-change: transform;
    }
    
    /* User List */
    .user-list {
        background: linear-gradient(145deg, #ffffff, #f8f9fa);
        border-radius: 12px;
        padding: var(--sp-md);
        box-shadow: var(--shadow-soft);

        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    box-shadow 0.3s ease;
content-visibility:auto;

       
    }
    
    .user-list:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
    }
    
    .user-list h3 {
        color: #2c3e50;
        margin-bottom: var(--sp-md);
        padding-bottom: var(--sp-base);
        border-bottom: 2px solid rgba(52, 144, 220, 0.2);
        position: relative;
    }
    
    .user-list h3::after {
        content: "";
        position: absolute;
        bottom: -2px;
        inset-inline-start: 0; /* Logical property for RTL support */
        width: 60px;
        height: 2px;
        background: linear-gradient(90deg, #3490dc, transparent);
        transition: var(--tr-fast);
    }
    
    .user-list:hover h3::after {
        width: 100%;
    }
    
    .user-search {
        margin-bottom: var(--sp-md); 
        border: var(--border-light);
        border-radius: var(--radius-sm); 
        background: rgba(255, 255, 255, 0.8);
        transition: var(--tr-fast);
    }
    
    .user-search input {
        width: 100%;
        padding: var(--sp-base) var(--sp-md);
        border: var(--border-light);
        border-radius: var(--radius-sm); 
        background: rgba(255, 255, 255, 0.8);
        transition: var(--tr-fast);
        color: #2c3e50;
    }
    
    .user-search input:focus {
        outline: none;
        border-color: #3490dc;
        background: #ffffff;
        box-shadow: var(--shadow-focus);
    }
    
    .user-list ul {
        list-style: none;
        max-height: 60vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(52, 144, 220, 0.3) transparent;
    }
    
    .user-list li {
        cursor: pointer;
        padding: var(--sp-base);
        border-radius: var(--radius-sm);
        margin-bottom: var(--sp-base);
        transition: var(--tr-fast);
        position: relative;
    }
    
    .user-list li:hover {
        background: rgba(52, 144, 220, 0.08);
        transform: translateX(4px);
        will-change: transform;
    }
    
    .user-list li.hidden {
        opacity: 0;
        height: 0;
        padding: 0;
        margin: 0;
        pointer-events: none;
    }
    
    .user-list-item {
        display: flex;
        align-items: center;
        gap: var(--sp-base);
    }
    
    .user-avatar-container {
        position: relative;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .user-avatar-container img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #ffffff;
        box-shadow: var(--shadow-soft);
        transition: var(--tr-fast);
    }
    
    .user-list li:hover .user-avatar-container img {
        transform: scale(1.1);
        will-change: transform;
    }
    
    .user-name {
        font-size: var(--fs-base);
        color: var(--text-secondary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .og-badge {
        position: absolute;
        top: calc(-1 * var(--sp-sm));
        right: calc(-1 * var(--sp-sm));
        background: linear-gradient(135deg, #ffd700, #ffa500);
        color: #000000;
        padding: 0.1rem 0.3rem;
        border-radius: 10px;
        font-size: var(--fs-small);
        font-weight: bold;
        box-shadow: var(--shadow-soft);
        transform: scale(0.9);
        transition: var(--tr-fast);
    }
    
    .user-list li:hover .og-badge {
        transform: scale(1);
        will-change: transform;
    }
    
    .user-list-status {
        margin-top: var(--sp-md);
        padding-top: var(--sp-md);
        border-top: 1px solid rgba(204, 204, 204, 0.2);
        font-size: var(--fs-small);
        color: var(--text-secondary); 
        text-align: center;
    }
    
    #userCount {
        font-weight: 600; /* Specific weight instead of bold */
        color: #3490dc;
    }


/* ===================================
ACCOUNT SWITCHER STYLING
=================================== */
.account-switcher-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    padding: var(--sp-base);
    background: rgba(241, 245, 249, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3); 
    width: 100%; /* Take full width of the text-info container */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.account-switcher-label {
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--text-muted);
    font-family: var(--ff-body);
}

.account-switcher-select {
    width: 100%;
    padding: var(--sp-base);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    font-family: var(--ff-mono);
    font-size: var(--fs-small);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--tr-colors), var(--tr-smooth);
}

.account-switcher-select:hover {
    border-color: #3490dc;
}

.account-switcher-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: var(--shadow-focus);
}

    
}

/* ===================================
PERFORMANCE OPTIMIZED ANIMATIONS
=================================== */
@layer components {
 
    @keyframes pulse {
        0%, 100% { 
            transform: scale(1); 
            opacity: 1; 
        }
        50% { 
            transform: scale(1.05); 
            opacity: 0.9; 
        }
    }
    
    @keyframes float {
        0%, 100% { 
            transform: translateY(0px); 
        }
        50% { 
            transform: translateY(-10px); 
        }
    }
      
    
    .search-icon-animated {
        will-change: auto;
        backface-visibility: hidden;
        /* Remove infinite animation - add via JS when visible */
    }
    
    .search-icon-animated.animate-active {
        animation: floatAndMove 3s ease-in-out infinite;
        will-change: transform;
    }
       
}

/* ============================================
Gamingâ€‘2025 âœ¦ Bleachâ€‘Inspired User Panel
Bright, minimal, and clean â€” with subtle
anime accent colours. Uses design tokens.
============================================ */

/* ---------- Wrapper ---------- */
.userInfoPanelWrapper {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    width: 100%;
    align-items: stretch;
}
/* ---------- Animated Gradient Keyframes ---------- */
@keyframes flowingGradient {
    0%   { background-position:   0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position:   0% 50%; }
}

/* ---------- Enhanced User Info Container ---------- */
#userInfoContainer {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
    align-items: center;
    
    width: 100%;
    padding: var(--sp-md);
    border-radius: var(--radius-lg); 
    
    /* Enhanced shadow system */
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    
    /* Gradient border with Web3 accent */
    border: 1px solid transparent; 
    
    font-family: var(--ff-futuristic);
    color: #1a202c;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
     
}

/* Dynamic left accent stripe based on connection status */
#userInfoContainer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #6A11CB, #2575FC);
    border-radius: 0 4px 4px 0;
    opacity: 0.8;
    transition: all 0.4s ease;
}

/* Anonymous user gets different accent */
#userInfoContainer:not([data-authenticated="true"])::after { 
    opacity: 0.5;
}

/* Animated shimmer sweep */
#userInfoContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%; 
    transition: left 1s cubic-bezier(0.4, 0, 0.2, 1);
}

#userInfoContainer:hover::before { 
    left: 100%; 
}

/* Enhanced hover state */
#userInfoContainer:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(106, 17, 203, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 1px rgba(106, 17, 203, 0.1);
    
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 250, 252, 0.95) 50%,
        rgba(241, 245, 249, 0.9) 100%
    );
}

/* Connection status indicator */
#userInfoContainer[data-authenticated="true"] {
    border-color: rgba(106, 17, 203, 0.2);
}

#userInfoContainer[data-authenticated="true"]::after {
    opacity: 1;
    box-shadow: 0 0 20px rgba(106, 17, 203, 0.3);
}

/* Anonymous state styling */
#userInfoContainer:not([data-authenticated="true"]) {
    border-color: rgba(148, 163, 184, 0.3); 
}

/* ---------- Collapsed State Enhancement ---------- */
#userInfoContainer.collapsed { 
    padding: 1rem 1rem;
    gap: 0;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.85) 100%
    );
    transform: scale(0.95);
    transition: all 0.3s ease;
    
}

#userInfoContainer.collapsed:hover {
    transform: scale(0.98) translateY(-2px);
}

#userInfoContainer.collapsed .text-info { 
    display: none; 
}

#userInfoContainer.collapsed .avatar-frame {
    width: 4rem;
    height: 4rem;
    margin-bottom: 0;
    border:0;
}

#userInfoContainer.collapsed::after {
    width: 3px;
    opacity: 0.6;
}

/* Pulsing animation for anonymous users to encourage connection */
#userInfoContainer:not([data-authenticated="true"]):not(.collapsed) {
    animation: subtlePulse 4s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% { 
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.12),
            0 2px 16px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    50% { 
        box-shadow:
            0 12px 40px rgba(148, 163, 184, 0.2),
            0 4px 20px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.95);
    }
}



/* ===================================
UPDATED TOGGLE BUTTON STYLES - CONSISTENT ACROSS ALL BREAKPOINTS
=================================== */

/* Enhanced Toggle Button for User Info - General/Desktop */
.toggle-user-info-btn {
    position: absolute;
    top: var(--sp-base);
    left: 2rem;
    width: 40px;
    height: 40px;
    
    /* Subtle, integrated background like mobile */
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(0, 0, 0, 0.12);
    color: #666;
    border-radius: 6px;
    
    /* Soft, elegant shadow */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 15;
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    opacity: 0.8;
    
    /* Subtle backdrop blur for premium feel */
    backdrop-filter: blur(8px);
}

.toggle-user-info-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.18);
    color: #333;
    opacity: 1;
    transform: scale(1.1);
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.toggle-user-info-btn:active {
    transform: scale(0.95);
    transition: all 0.1s ease;
}

/* ---------- Enhanced Avatar Frame ---------- */
.avatar-frame {
    width: var(--size-avatar-md);
    height: var(--size-avatar-md);
    padding: 2px;
    
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9), 
        rgba(248, 250, 252, 0.8),
        rgba(241, 245, 249, 0.7)
    );
    border-radius: 50%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.05),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.02);
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.8); 
}

/* Animated ring for authenticated users */
.avatar-frame::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #6A11CB, #2575FC, #00D4FF, #6A11CB);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: all 0.4s ease;
    background-size: 200% 200%;
}

/* Different ring for anonymous users */
.avatar-frame[data-anonymous="true"]::after {
    background: linear-gradient(135deg, #94a3b8, #64748b, #94a3b8);
    background-size: 200% 200%;
}

.avatar-frame:hover {
    background: linear-gradient(135deg, 
        rgba(106, 17, 203, 0.05), 
        rgba(37, 117, 252, 0.03)
    );
    border-color: rgba(106, 17, 203, 0.3);
    transform: scale(1.05);
    
    box-shadow: 
        0 12px 32px rgba(106, 17, 203, 0.2),
        0 6px 16px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 1);
}

.avatar-frame:hover::after {
    opacity: 1;
    animation: rotateRing 3s linear infinite;
}

@keyframes rotateRing {
    from { 
        transform: rotate(0deg);
        background-position: 0% 50%;
    }
    to { 
        transform: rotate(360deg);
        background-position: 200% 50%;
    }
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.avatar-frame:hover img { 
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 20px rgba(106, 17, 203, 0.3);
}

/* ---------- Enhanced Text Info ---------- */
.text-info {
    flex: 1;  
    z-index: 1;
    min-width: 0;
    width: 100%; 
}

.text-info p {
    margin-bottom: 10px;
    padding: var(--sp-sm) var(--sp-sm);
    
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(248, 250, 252, 0.8) 50%,
        rgba(241, 245, 249, 0.7) 100%
    ); 
    border-radius: 10px;
    
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    flex: 0 1 auto;
    
    /* Subtle inner glow */
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Enhanced shimmer effect */
.text-info p::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(106, 17, 203, 0.1), 
        rgba(255, 255, 255, 0.3),
        rgba(37, 117, 252, 0.1),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-info p:hover::before {
    left: 100%;
}

.text-info p:hover { 
    transform: translateX(8px) translateY(-2px);
    border-color: rgba(106, 17, 203, 0.3);
    
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.9) 50%,
        rgba(241, 245, 249, 0.85) 100%
    );
    
    box-shadow: 
        0 6px 20px rgba(106, 17, 203, 0.15),
        0 2px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(106, 17, 203, 0.1);
}

/* Specific styling for different info types */
.text-info .user-name {  
    color: #1a202c;  
    word-break: break-all;
     
    border-color: rgba(106, 17, 203, 0.2);
}

.text-info .user-id { 
    color: #4a5568; 
    font-weight: 500;
    font-family: var(--ff-mono);
    font-size: var(--fs-small);
}

.text-info .user-address { 
    color: #2d3748; 
    font-weight: 500;
    font-family: var(--ff-mono);
    font-size: var(--fs-small);
    word-break: break-all;
    
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.06) 0%,
        rgba(37, 117, 252, 0.04) 50%,
        rgba(255, 255, 255, 0.9) 100%
    );
}

/* Anonymous state styling */
#userInfoContainer:not([data-authenticated="true"]) .text-info p {
    background: linear-gradient(135deg, 
        rgba(241, 245, 249, 0.9) 0%,
        rgba(226, 232, 240, 0.8) 50%,
        rgba(203, 213, 225, 0.7) 100%
    );
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.3);
}

#userInfoContainer:not([data-authenticated="true"]) .text-info p:hover {
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 
        0 4px 16px rgba(148, 163, 184, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Connected status indicator */
#userInfoContainer[data-authenticated="true"] .user-name::after {
    content: 'âœ“';
    margin-left: var(--sp-sm);
    color: #22c55e;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(34, 197, 94, 0.3);
}

/* ===================================
MODERN CHAT CONTAINER
=================================== */
.modern-chat-container {
    container-type: inline-size; /* Enable container queries */
    background: rgba(255, 255, 255, 0.92); 
    border: 1px solid #bcbdc6;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Fixed height approach */
    height: calc(100vh - 100px);  /* Adjust based on your header/other elements */
    max-height: 900px;  /* Maximum height on large screens */
    min-height: 500px;  /* Minimum viable height */
    
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

/* Container queries for chat responsiveness */
@container (max-width: 400px) {
    .modern-chat-container {
        border-radius: 12px;
        min-height: 400px;
    }
    
    .chat-header {
        padding: var(--sp-base) var(--sp-md);
    }
    
    .ai-avatar {
        width: var(--size-avatar-sm);
        height: var(--size-avatar-sm);
    }
}

.modern-chat-container:hover {
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-2px);
    box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(106, 17, 203, 0.2);
}

/* Chat Header */
.chat-header {
    padding: var(--sp-md) var(--sp-lg);
    background: linear-gradient(135deg, rgba(248, 248, 248, 0.9), rgba(255, 255, 255, 0.8));
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: var(--sp-md); 
}

.ai-avatar {
    position: relative;
    width: var(--size-avatar-lg);
    height: var(--size-avatar-lg);
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ai-avatar:hover {
    border-color: #6A11CB;
    box-shadow: 0 4px 16px rgba(106, 17, 203, 0.2);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chat-info {
    flex: 1;
}

.ai-name {
    font-size: var(--fs-callout);
    font-weight: 600;
    color: #333;
    margin: 0 0 var(--sp-sm) 0;
    background: linear-gradient(45deg, #6A11CB, #2575FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-status {
    font-size: var(--fs-small);
    color: #666;
    margin: 0;
    font-weight: 500;
}



.auth-content {
    text-align: center;
    padding: var(--sp-lg) var(--sp-lg);
    max-width: 420px;
    animation: slideInUp 0.6s ease-out;
}

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

.lock-icon-modern {
    font-size: var(--fs-h1);
    margin: 0;
    color: #6A11CB;
    filter: drop-shadow(0 2px 4px rgba(106, 17, 203, 0.2));
}

.lock-icon-modern i {
    display: inline-block;
}

.auth-content h2 {
    font-size: var(--fs-h2);
    font-weight: 600; /* Reduced from 700 to use existing weight */
    color: #333;
    margin-bottom: 0;
    border: none;
    padding: 0;
}

.auth-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: var(--sp-md);
    font-size: var(--fs-base);
    font-weight: 400;
}

.auth-steps {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
    text-align: left;
}

.auth-step {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
}

.auth-step:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(106, 17, 203, 0.3);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(106, 17, 203, 0.1);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(45deg, #6A11CB, #2575FC);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: var(--fs-small);
    flex-shrink: 0;
}

.step-text {
    color: #333;
    font-weight: 500;
    font-size: var(--fs-base);
}

.discord-button {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-base);
    padding: var(--sp-md) var(--sp-lg);
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    font-size: var(--fs-base);
    position: relative;
}

.discord-button:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.discord-button i {
    font-size: var(--fs-callout);
}

.external-indicator {
    position: absolute;
    bottom: calc(-1 * var(--sp-md));
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--fs-small);
    color: #999;
    font-weight: 400;
    white-space: nowrap;
}

.chat-messages-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;  /* Critical for flex children */
    overflow: hidden;
}

.chat-interface-modern {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;  /* Allow shrinking */
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    scroll-behavior: smooth;
    padding: var(--sp-md);
    min-height: 0;  /* Critical */
    
    /* Modern scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(106, 17, 203, 0.3) transparent;
    
    /* Scroll padding for better UX */
    scroll-padding-bottom: var(--sp-md);
    scroll-padding-top: var(--sp-md);
}

.chat-interface-modern.has-messages {
    opacity: 1;
    padding: var(--sp-md);
}


/* Message Bubbles */
.user-message {
    align-self: flex-end;
    max-width: 75%;
    padding: var(--sp-md) var(--sp-md);
    background: linear-gradient( #2575FC);
    color: white;
    border-radius: 20px 20px 6px 20px;
    font-size: var(--fs-base);
    line-height: 1.4;
    animation: messageSlideIn 0.4s ease-out;
    box-shadow: 0 2px 12px rgba(106, 17, 203, 0.3);
    position: relative;
}

.user-message::after {
    content: '';
    position: absolute;
    bottom: 6px;
    right: -6px;
    width: 12px;
    height: 12px;
    background: linear-gradient( #2575FC);
    transform: rotate(45deg);
    border-radius: 0 0 0 2px;
}

.ai-message {
    align-self: flex-start;
    max-width: 100%;
    padding: var(--sp-md) var(--sp-md);
    background: rgb(252 252 255 / 90%);
    color: #333;
    border-radius: 20px 20px 20px 6px;
    font-size: var(--fs-base);
    line-height: 1.4;
    animation: messageSlideIn 0.4s ease-out;  
    position: relative;
    margin-left: var(--sp-md);
}

.ai-message::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--sp-lg) + var(--sp-sm));
    top: var(--sp-base);
    width: var(--sp-lg);
    height: var(--sp-lg);
    background: url('hikariweb.webp') center/cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-message::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: -6px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.9);
    transform: rotate(45deg);
    border-radius: 0 0 0 2px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

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

/* Chat Input */
.chat-input-area {
    flex-shrink: 0;  /* Never shrink */
    padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
    background: linear-gradient(to top, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0) 100%);
    border-top: 1px solid rgba(232, 232, 232, 0.5); 
    position: relative;
}

/* New message indicator */
.new-messages-indicator {
    position: absolute;
    bottom: calc(100% + var(--sp-base));
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6A11CB, #2575FC);
    color: white;
    padding: var(--sp-base) var(--sp-md);
    border-radius: 20px;
    font-size: var(--fs-small);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(106, 17, 203, 0.3);
    z-index: 20;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.new-messages-indicator.show {
    opacity: 1;
    pointer-events: auto;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* Scroll to bottom button */
.scroll-to-bottom {
    position: absolute;
    bottom: var(--sp-md);
    right: var(--sp-md);
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 15;
}

.scroll-to-bottom.show {
    opacity: 1;
    pointer-events: auto;
}

.scroll-to-bottom:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Add a subtle shadow above input */
.chat-input-area::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to top, 
    rgba(0, 0, 0, 0.03) 0%, 
    transparent 100%);
    pointer-events: none;
}

.chat-form-modern {
    width: 100%;
    margin-bottom: var(--sp-md);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--sp-base);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: var(--sp-base) var(--sp-md);
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); 
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0;
}

.input-wrapper:focus-within {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(106, 17, 203, 0.12);
    border-color: rgba(106, 17, 203, 0.3);
}

.message-input-modern {
    flex: 1;
    border: none;
    background: transparent; 
    font-size: var(--fs-base);
    outline: none;
    color: #333;
    font-weight: 500;
}

.message-input-modern::placeholder {
    color: #999;
    font-weight: 400;
}

.send-btn-modern {
    background: linear-gradient( #03A9F4);
    border: none;
    width: var(--size-button);
    height: var(--size-button);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(106, 17, 203, 0.3);
    flex-shrink: 0;
}

.send-btn-modern:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(106, 17, 203, 0.4);
}

.send-btn-modern:active {
    transform: scale(0.98);
}

.send-btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-help {
    text-align: center;
    margin-top: var(--sp-base);
}

.chat-help p {
    color: #999;
    font-size: var(--fs-small);
    margin: 0;
    font-style: italic;
}

/* ===================================
PROJECT SHOWCASE
=================================== */
#NftContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: var(--sp-md);
    align-items: start;
}


/* ===================================
NFT PROMO FLOATING BADGE
=================================== */

/* Remove old static styling first */
.text-contents a.nft-promo {
    /* Reset previous styles */
    position: absolute !important;
    order: unset;
}

/* Main NFT Promo Badge */
.info-container {
    position: relative; /* Ensure this is set */
}

.info-container .nft-promo {
    position: absolute;
    top: -100px;  
    padding: var(--sp-sm) var(--sp-base) !important;
    background: linear-gradient(135deg, #ff006e, #ff4081) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    font-size: var(--fs-small) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important; 
    box-shadow: 
    0 4px 15px rgba(255, 0, 110, 0.4),
    0 0 30px rgba(255, 0, 110, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important; 
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    animation: pulse 2s ease-in-out infinite; 
    transform-origin: center;
    white-space: nowrap !important;
    display: inline-block !important;
}

/* Glowing effect */
.info-container .nft-promo::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #ff006e, #ff4081);
    border-radius: 50px;
    z-index: -1;
    opacity: 0.7;
    filter: blur(10px);
    animation: glow 2s ease-in-out infinite;
}

/* Shine effect */
.info-container .nft-promo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

/* Hover state */
.info-container .nft-promo:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 6px 20px rgba(255, 0, 110, 0.5),
        0 0 40px rgba(255, 0, 110, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #ff1744, #ff6090);
}
 

/* Alternative style: Corner badge */
.info-container .nft-promo.corner {  
    right: 0;
    border-radius: 0 16px 0 50px;
    padding: var(--sp-base) var(--sp-md) var(--sp-md) var(--sp-md);
}
     

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

@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}
 


.info-container {
    position: relative;
    min-height: 280px; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background-size: 120% auto;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
}

.info-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    background-size: 140% auto;
    background-position: center 20%;
}

.info-container:nth-child(even):hover {
    background-position: center 80%;
}

.info-container:nth-child(3n):hover {
    background-position: 20% center;
}

.info-container:nth-child(3n+1):hover {
    background-position: 80% center;
}

/* Project Background Images */
#synthetic { background-image: url("syntheticbanner.webp"); }
#brenda { background-image: url("brendabannerx.webp"); }
#kira { background-image: url("kirabanner.webp"); }
#steel { background-image: url("steelbanner.webp"); }
#continuum { background-image: url("continuumbanner.webp"); }
#dorothy { background-image: url("dorothybanner.webp"); }
#aumiga { background-image: url("aumigabanner.webp"); }
#spaceadventure { background-image: url("spaceadventure2.webp"); }
#wb { background-image: url("wbbanner.webp"); }

.text-contents {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0; 
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 70%, transparent 100%);
    color: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column; 
    min-height: 180px;
    padding: 1rem;
}

.text-contents h3 {
    font-family: var(--ff-decorative);
    font-size: var(--fs-h2);
    margin: 0 0 0.2rem 0;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    
}

.text-contents p {
    font-size: var(--fs-small);
    line-height: 1.3;
     margin: 0 0 0.5rem 0;
    opacity: 0.95;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    margin-top: auto;
}

.text-contents a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.3rem 1rem;
    background: rgba(33, 150, 243, 0.8);
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s ease;
    font-size: var(--fs-small);
    font-weight: 500;
    white-space: nowrap;
}

.text-contents a:hover {
    background: #e91e63;
    transform: translateY(-1px);
}


/* ===================================
LOG CONTAINER
=================================== */
#logContainer {
    position: absolute;
    right: var(--sp-lg);
    top: 10rem;
    width: 680px; 
    backdrop-filter: blur(10px);
    border: 1px solid #75bbf5;
    border-radius: 12px;
    color: #ffffff; 
    font-size: var(--fs-md);
    transition: 0.3s;
    z-index: 1000;
    overflow: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); 
    line-height: 1.2;
    background: rgb(255 255 255 / 30%);  
}

#logContainer.collapsed {
    height: 0;
    padding: 0;
    border-width: 0;
}

#logContainer.active {
    max-height: 180px;
    padding: var(--sp-base);
}

/* Enhanced Toggle Button for Log Container - General/Desktop */
.toggle-log-button {
    position: absolute;
    right: var(--sp-lg);
    top: 120px;
    width: 32px;
    height: 32px;
    
    /* Matching subtle style */
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(0, 0, 0, 0.12);
    color: #666;
    border-radius: 8px;
    
    /* Consistent shadow system */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.8;
    
    /* Subtle backdrop blur */
    backdrop-filter: blur(8px);
}

 

.toggle-log-button i {
    transition: all 0.3s ease;
}

.toggle-log-button:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.18);
    color: #333;
    opacity: 1;
    transform: scale(1.1);
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.toggle-log-button:active {
    transform: scale(0.95);
    transition: all 0.1s ease;
}

/* Icon states for better visual feedback */
.toggle-log-button .fa-clipboard-list,
.toggle-log-button .fa-file-alt {
    /* When showing logs icon */
    color: rgba(255, 255, 255, 0.9);
}

.toggle-log-button .fa-times,
.toggle-log-button .fa-eye-slash {
    /* When hiding logs icon */
    color: rgba(255, 255, 255, 1);
}

/* ===================================
USER PROFILE MODAL
=================================== */
.user-profile-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    backdrop-filter: blur(20px);
    padding: var(--sp-lg);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.user-profile-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.close-modal {
    position: absolute;
    top: var(--sp-md);
    right: var(--sp-md);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--fs-h2);
    transition: 0.3s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    margin-bottom: var(--sp-lg);
    padding-bottom: var(--sp-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.user-profile-name {
    font-size: var(--fs-h1);
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: var(--sp-base);
}

.og-badge-modal {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #000000;
    padding: var(--sp-sm) var(--sp-base);
    border-radius: 20px;
    font-size: var(--fs-small);
    font-weight: 600; /* Specific weight instead of bold */
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.user-profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.detail-card {
    background: rgba(255, 255, 255, 0.05); 
    padding: var(--sp-md);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.detail-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.detail-label {
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--sp-base);
}

.detail-value {
     font-size: var(--fs-base);
    color: #ffffff;word-break: break-word;
    font-weight: 500;
}

.og-status {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.brenda-stats {
    background: linear-gradient(135deg, #e91e63, #9c27b0);
    padding: var(--sp-md);
    border-radius: 12px;
    margin-top: var(--sp-md);
}

.brenda-stats h3 {
    color: #ffffff;
    font-size: var(--fs-callout);
    margin-bottom: var(--sp-md);
    text-align: center;
}

.interaction-stats {
    display: flex;
    justify-content: space-around;
    gap: var(--sp-md);
}

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

.stat-value {
    font-size: var(--fs-h1);
    font-weight: 600; /* Specific weight instead of bold */
    color: #ffd700;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: var(--fs-small);
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-top: 1rem;
}


/* ===================================
UTILITIES
=================================== */
@layer utilities {
    /* Transition Utilities */
    .tr-fast { transition: var(--tr-fast); }
    .tr-smooth { transition: var(--tr-smooth); }
    
    /* Text Utilities */
    .text-primary { color: var(--text-primary); }
    .text-secondary { color: var(--text-secondary); }
    .text-muted { color: var(--text-muted); }
    
    /* Visibility Utilities */
    .hidden { display: none !important; }
    .visible { 
        opacity: 1 !important; 
        pointer-events: auto !important; 
    }
    
    /* Layout Utilities */
    .flex-center {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .stack {
        display: flex;
        flex-direction: column;
        gap: var(--sp-base);
    }
    
    /* Scrollbar Utilities for Chat */
    .messages-container::-webkit-scrollbar {
        width: 6px;
    }
    
    .messages-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }
    
    .messages-container::-webkit-scrollbar-thumb {
        background: rgba(106, 17, 203, 0.3);
        border-radius: 3px;
    }
    
    .messages-container::-webkit-scrollbar-thumb:hover {
        background: rgba(106, 17, 203, 0.5);
    }
}


.hikari-search-loader {
    padding: var(--sp-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px; 
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    margin-top: var(--sp-md);
}

.messages-container.loader-active {
    scroll-padding-bottom: 140px; /* Height of loader + some padding */
}

.search-loader-content {
    text-align: center;
    max-width: 500px;
    position: relative;
}

.search-icon-container {
    height: 60px;
    position: relative;
    margin-bottom: var(--sp-md);
}

.search-icon-animated {
    font-size: var(--fs-h1);
    color: #6A11CB;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 4px 12px rgba(106, 17, 203, 0.3));
    animation: floatAndMove 3s ease-in-out infinite;
}

/* Hikari Typing Indicator */
.hikari-typing {
    padding: var(--sp-base) var(--sp-md);
    animation: fadeIn 0.3s ease-out;
}

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

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.typing-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6A11CB;
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingDots {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    40% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Different animations for different actions */
@keyframes floatAndMove {
    0% {
        transform: translate(-50%, -50%) translateX(-30px) translateY(0) rotate(0deg);
    }
    25% {
        transform: translate(-50%, -50%) translateX(0) translateY(-10px) rotate(10deg);
    }
    50% {
        transform: translate(-50%, -50%) translateX(30px) translateY(0) rotate(-10deg);
    }
    75% {
        transform: translate(-50%, -50%) translateX(0) translateY(10px) rotate(5deg);
    }
    100% {
        transform: translate(-50%, -50%) translateX(-30px) translateY(0) rotate(0deg);
    }
}

/* Icon-specific animations */
.search-icon-animated.talking {
    animation: talkBounce 0.8s ease-in-out infinite;
}

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

.search-icon-animated.looking {
    animation: lookAround 2s ease-in-out infinite;
}

@keyframes lookAround {
    0% { transform: translate(-50%, -50%) translateX(-40px); }
    50% { transform: translate(-50%, -50%) translateX(40px); }
    100% { transform: translate(-50%, -50%) translateX(-40px); }
}

.search-icon-animated.fixing {
    animation: spinFix 1.5s ease-in-out infinite;
}

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

.search-icon-animated.digging {
    animation: digMotion 1s ease-in-out infinite;
}

@keyframes digMotion {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(15px); }
}

.search-status-text {
    color: #666;
    font-size: var(--fs-base);
    font-style: italic;
    margin: 0;
    animation: fadeInOut 0.5s ease-in-out;
    font-family: var(--ff-mono);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

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

/* Icon color variations */
.search-icon-animated.chat-icon { color: #e91e63; }
.search-icon-animated.food-icon { color: #ff9800; }
.search-icon-animated.game-icon { color: #4caf50; }
.search-icon-animated.nail-icon { color: #ff69b4; }
.search-icon-animated.folder-icon { color: #2196f3; }


/* Enhanced Message Formatting */
.ai-message .message-content,
.user-message .message-content {
    display: inline-block;
    vertical-align: top;
    max-width: 100%;
}

.ai-message .timestamp,
.user-message .timestamp {
    display: inline-block; 
    margin-right: var(--sp-base);
    opacity: 0.8;
    font-size: var(--fs-medium);
    font-family: var(--ff-mono);
    white-space: nowrap;
}
/* AI Message Content Formatting */
.ai-message .message-content p {
    margin: 0 0 var(--sp-base) 0;
    line-height: 1.5;
}

.ai-message .message-content p:last-child {
    margin-bottom: 0;
}

.ai-message .message-content ul,
.ai-message .message-content ol {
    margin: var(--sp-base) 0 var(--sp-base) var(--sp-md);
    padding: 0;
}

.ai-message .message-content li {
    margin-bottom: var(--sp-base);
    line-height: 1.5;
}

.ai-message .message-content li:last-child {
    margin-bottom: 0;
}

.ai-message .message-content strong {
    font-weight: 500;  /* Semi-bold instead of bold */
    color: #333;       /* Slightly darker than regular text */
}

.ai-message .message-content code {
    background: rgba(106, 17, 203, 0.08);
    padding: var(--sp-sm) var(--sp-base);
    border-radius: 4px;
    font-family: var(--ff-mono);
    font-size: var(--fs-small);
    color: #6A11CB;
}

/* --- START: UPDATED HEADER STYLES --- */

/* This new rule styles the largest header (##) */
.ai-message .message-content h2 {
    font-size: var(--fs-h2); /* Using your h2 design token */
    margin: var(--sp-md) 0;
    color: #6A11CB;
    font-weight: 600;
    line-height: 1.2;
    border-bottom: 1px solid rgba(106, 17, 203, 0.2);
    padding-bottom: var(--sp-base);
}

/* This is your existing group for common properties */
.ai-message .message-content h3,
.ai-message .message-content h4 {
    margin: var(--sp-md) 0 var(--sp-base) 0;
    color: #6A11CB;  /* Make headers stand out with Eloria purple */
    font-weight: 600;
    line-height: 1.3;
}

/* This is your existing rule for first-child headers */
.ai-message .message-content h2:first-child,
.ai-message .message-content h3:first-child,
.ai-message .message-content h4:first-child {
    margin-top: var(--sp-base);  /* Less space at top */
}

/* This is your existing, specific style for H3 */
.ai-message .message-content h3 {
    font-size: var(--fs-callout);
}

/* This is your existing, specific style for H4 */
.ai-message .message-content h4 {
    font-size: var(--fs-base);
    margin: var(--sp-base) 0 var(--sp-base) 0;  /* Tighter spacing for h4 */
}
/* --- END: UPDATED HEADER STYLES --- */



/* Add to your CSS */
#hikariSearchLoader {
    transition: opacity 0.3s ease-out;
}

#hikariSearchLoader.hiding {
    opacity: 0;
}
 

 
/*  WELCOME-PLACEHOLDER ANIMATION UPLIFT          */
/*  paste below the current .placeholder-message  */ 

/* 1 â–¸ arrive like every other message */
.placeholder-message {
  /* Your existing animation code stays exactly the same */
  opacity: 0;
  transform: translateY(18px) scale(.96);
  animation: placeholderArrive .45s cubic-bezier(.25,.8,.25,1) .15s forwards,
             placeholderPulse 2.4s ease-in-out .6s infinite;
  will-change: transform, opacity;

  /* ADD: Hide empty placeholder structure until it has content */
  visibility: hidden;
}

/* When it becomes a real message, make it visible so animations work */
.ai-message:not(.placeholder-message) {
  visibility: visible;
}

/* 2 â–¸ shimmering skeleton inside the bubble */
.placeholder-message .message-content{
  position:relative;
  overflow:hidden;                        /* clip shimmer */
}

/* sweep-light */
.placeholder-message .message-content::before{
  content:'';
  position:absolute; inset:0;
  background:linear-gradient(90deg,
             transparent 0%,
             rgba(255,255,255,.7) 50%,
             transparent 100%);
  transform:translateX(-100%);
  animation: shimmer 1.1s linear infinite;
}

/* keyframes */
@keyframes placeholderArrive{
  to{opacity:1; transform:translateY(0) scale(1);}
}
@keyframes placeholderPulse{
  0%,100%{filter:brightness(1);}
  50%   {filter:brightness(.94);}
}
@keyframes shimmer{
  100%{transform:translateX(100%);}
}

/* honour prefers-reduced-motion */
@media (prefers-reduced-motion:reduce){
  .placeholder-message{
    animation:none;
    opacity:1; transform:none;
  }
  .placeholder-message .message-content::before{display:none;}
}

/* â€” stop everything by default â€” */
.placeholder-message{ 
  animation-play-state: paused;
}

/* â€” as soon as <html> (or <body>) gets .site-ready, let it rip â€” */
.site-ready .placeholder-message{
  animation-play-state: running;
}


/* ===================================
DEVICE SUPPORT
=================================== */
/* For iOS Safari safe areas */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .chat-input-area {
        padding-bottom: calc(var(--sp-md) + env(safe-area-inset-bottom));
    }
}
@media (max-width: 800px) {
    #wrapper {
        flex-direction: column;
        padding: var(--sp-md);
        gap: var(--sp-md);
    }
    
    /* Create a new layout order for mobile */
    #userInfoContainer {
        order: 1;  /* User info panel stays at top */
        width: 100%;
        max-width: none;
        margin-bottom: var(--sp-md);
    }
    
    
    #contentColumn { 
        order: 2;   /* Main content (chat + projects) in middle */
    }
    
    .social-buttons { 
        order: 3;   /* Social buttons after content */
    }
    
    #userList { 
        order: 4;   /* User list at bottom */
    }
    
    /* Restructure left column for mobile - remove flex container behavior */
    .left-column {
        display: contents; /* This makes children participate in parent's flex layout */
    }
    
    /* Style the separated elements */
    .social-buttons {
        width: 100%;
        max-width: 400px;
        margin: var(--sp-md) auto 0;
        display: flex;
        flex-direction: column;
        gap: var(--sp-md);
    }
    
    #userList {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .userInfoPanelWrapper {
        flex-direction: column;
    }
    
    #logContainer {
        width: 320px;
        right: var(--sp-md);
    }
    
    #NftContainer {
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    }
    
    .text-info p:hover {
        transform: translateX(6px);
    }
    
    /* Ensure toggle button positioning works correctly */
    .toggle-user-info-btn {
        position: absolute;
        top: 0%;
        right: var(--sp-md); 
    }
}
 
* Enhanced icon transitions for both buttons */
.toggle-user-info-btn i,
.toggle-log-button i {
    transition: all 0.2s ease;
    font-size: inherit;
    display: block;
}

/* Improved focus states for accessibility */
.toggle-user-info-btn:focus-visible,
.toggle-log-button:focus-visible {
    outline: 2px solid rgba(106, 17, 203, 0.5);
    outline-offset: 2px;
}

/* Special states for when containers are collapsed/expanded */
#userInfoContainer.collapsed .toggle-user-info-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

#logContainer.collapsed ~ .toggle-log-button {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

/* Enhanced positioning for perfect integration */
.toggle-user-info-btn {
    /* Ensure it's properly positioned relative to the user info container */
    transform-origin: center;
}

.toggle-log-button {
    /* Ensure it's properly positioned relative to the log container */
    transform-origin: center;
}



/* ===================================
BEAUTIFUL MOBILE SCREENS (481px - 800px)
Primary mobile experience - coherent with 350px but scaled up
Most visited media query - optimized for phones and small tablets
=================================== */
@media (max-width: 800px) {
    /* ===================================
    GLOBAL LAYOUT ADJUSTMENTS
    =================================== */
    #wrapper {
        padding: var(--sp-md);
        gap: var(--sp-md);
        flex-direction: column;
    }
    
    /* Improve content flow order for mobile - following 350px pattern */
    #userInfoContainer {
        order: 1;  /* User info panel stays at top */
        width: 100%;
        max-width: none;
        margin-bottom: var(--sp-md);
    }
    
    #contentColumn { 
        order: 2;   /* Main content (chat + projects) in middle */
    }
    
    .social-buttons { 
        order: 3;   /* Social buttons after content */
    }
    
    #userList { 
        order: 4;   /* User list at bottom */
    }
    
    /* Make left column children participate in main flex layout */
    .left-column {
        display: contents;
        width: 100%;
    }
    
    /* ===================================
    HEADER OPTIMIZATION
    =================================== */
    .header.active {
        height: min(55vw, 500px); /* Slightly larger than 350px version */
        margin-bottom: var(--sp-md);
        background-size: contain;
        background-position: center;
    }
    
    /* ===================================
    WALLET CONNECTION - MOBILE OPTIMIZED
    =================================== */
    .metamask-container {
        position: static;
        width: 100%;
        text-align: center;
        margin: var(--sp-md) 0;
        padding: 0 var(--sp-md);
    }
    
.metamask-container button {
    position: relative;
    padding: var(--sp-md) var(--sp-lg);
    font-size: var(--fs-callout);
    font-family: var(--ff-button);
    font-weight: bold;
    background: linear-gradient(45deg, transparent 5%, #ff013c 5%);
    border: 0;
    color: white;
    letter-spacing: 0.1em;
    box-shadow: #299efd 6px 0 0 0;
    cursor: pointer;
    transition: var(--tr-fast);
    text-transform: uppercase;
    /* REMOVED line-height, KEPT text-align */
    text-align: center;
}

    
    .metamask-container button:hover {
        transform: translateX(-2px) translateY(-1px);
        box-shadow: #299efd 6px 1px 0 0;
    }
    
/* New hint style */
.disconnect-hint {
    font-size: 0.6em;
    font-weight: 400;
    text-transform: none;
    opacity: 0.8;
    margin-top: 2px;
    letter-spacing: normal;
    font-family: var(--ff-body);
    line-height: 1;
}


/* Style for the connected state */
.metamask-container button.connected {
    background: linear-gradient(45deg, transparent 5%, #4CAF50 5%);
    box-shadow: #2f8532 6px 0 0 0;
    text-align: center;
}


.metamask-container button.connected:hover {
    background: linear-gradient(45deg, transparent 5%, #45a049 5%);
    box-shadow: #2f8532 8px 2px 0 0;
}


/* Responsive adjustments for the switcher */
@media (max-width: 800px) {
    .account-switcher-wrapper {
        align-items: center; /* Center content on mobile */
        text-align: center;
    }
    .account-switcher-select {
        text-align: center;
        max-width: 240px; /* Prevent it from being excessively wide */
    }
}

    /* ===================================
    USER INFO PANEL - MOBILE ELEGANT LAYOUT
    =================================== */
    #userInfoContainer {
        padding: var(--sp-md);
        gap: var(--sp-md);
        border-radius: 16px;
        margin-bottom: var(--sp-md);
        flex-direction: column;  /* SAME AS 350PX */
        text-align: center;      /* SAME AS 350PX */
        
        /* Beautiful gradient background */
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.92) 50%,
            rgba(241, 245, 249, 0.9) 100%
        );
        
        /* Enhanced shadow system */
        box-shadow:
            0 6px 24px rgba(0, 0, 0, 0.08),
            0 2px 12px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
        
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    #userInfoContainer:hover {
        transform: translateY(-3px);
        box-shadow:
            0 12px 36px rgba(106, 17, 203, 0.12),
            0 4px 16px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }
    
    /* Avatar styling for mobile - CENTERED like 350px */
    .avatar-frame {
        width: var(--size-avatar-lg);
        height: var(--size-avatar-lg);
        margin: 0 auto var(--sp-md) auto;  /* CENTERED like 350px */
        border: 3px solid rgba(106, 17, 203, 0.15);
        
        box-shadow: 
            0 6px 16px rgba(106, 17, 203, 0.1),
            0 2px 8px rgba(0, 0, 0, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    
    .avatar-frame:hover {
        transform: scale(1.08);
        border-color: rgba(106, 17, 203, 0.3);
        box-shadow: 
            0 8px 24px rgba(106, 17, 203, 0.2),
            0 4px 12px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }
    
    /* Text info - coherent with 350px but optimized for larger mobile */
    .text-info {
        flex-direction: column;  /* SAME AS 350PX for consistency */
        gap: var(--sp-base);
        width: 100%;
    }
    
    .text-info p {
        padding: var(--sp-base) var(--sp-md);
        font-size: var(--fs-base);  /* Slightly larger than 350px */
        border-radius: 10px;
        
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.85) 0%,
            rgba(248, 250, 252, 0.7) 100%
        );
        
        border: 1px solid rgba(106, 17, 203, 0.08);
        box-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        text-align: center;  /* SAME AS 350PX */
        word-break: break-word;
    }
    
    .text-info p:hover {
        transform: translateY(-2px) translateX(2px);
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.85) 100%
        );
        border-color: rgba(106, 17, 203, 0.2);
        box-shadow: 
            0 4px 16px rgba(106, 17, 203, 0.1),
            0 2px 8px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    
    /* Collapsed state for mobile - CONSISTENT WITH 350PX */
    #userInfoContainer.collapsed {
        padding: var(--sp-md);
        flex-direction: row;   /* Row when collapsed - SAME AS 350PX */
        text-align: left;      /* Left align when collapsed - SAME AS 350PX */
        gap: var(--sp-base);   /* Tighter gap when collapsed */
        align-items: center;
    }
    
    #userInfoContainer.collapsed .avatar-frame {
        width: 48px;
        height: 48px;
        margin: 0;  /* No margin when collapsed */
        flex-shrink: 0;
    }
    
    /* Subtle, integrated toggle - similar to 350px but slightly larger */
    .toggle-user-info-btn {
        position: absolute;
        top: var(--sp-base);
        right: var(--sp-base);
        width: 20px;
        height: 20px;
        
        background: rgba(255, 255, 255, 0.7);
        border: 2px solid rgba(0, 0, 0, 0.15);
        color: #666;
        border-radius: 4px;
        
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        z-index: 10;
        
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 10px;
        opacity: 0.7;
    }
    
    .toggle-user-info-btn:hover {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.2);
        color: #333;
        opacity: 1;
        transform: scale(1.1);
    }
    
    .toggle-user-info-btn:active {
        transform: scale(0.9);
    }
    
    /* Ensure icon changes work properly - don't override JavaScript */
    .toggle-user-info-btn i {
        transition: transform 0.2s ease;
    }
    
    /* Keep toggle visible when collapsed - just style it differently */
    #userInfoContainer.collapsed .toggle-user-info-btn {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.25);
        opacity: 0.9;
    }
    
    /* Make collapsed user info clickable to expand as backup */
    #userInfoContainer.collapsed {
        cursor: pointer;
    }
    
    #userInfoContainer.collapsed:hover {
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.92) 100%
        );
        transform: scale(1.02);
    }
    
    /* ===================================
    SOCIAL BUTTONS - FULL WIDTH LIKE OTHER BLOCKS
    =================================== */
    .social-buttons {
        width: 100%;
        gap: var(--sp-base);
        margin: var(--sp-md) 0;
        
        /* Keep as column like 350px, but with better spacing */
        display: flex;
        flex-direction: column;
        
        /* Ensure full width expansion */
        max-width: none;
        box-sizing: border-box;
    }
    
    .social-btn {
        padding: var(--sp-md);
        border-radius: 12px;
        font-size: var(--fs-base);
        text-align: center;
        justify-content: center;
        min-height: 48px;
        
        /* Enhanced hover effects for mobile */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .social-btn:hover {
        transform: translateY(-3px) scale(1.02);
    }
    
    .social-btn i {
        font-size: var(--fs-callout);
        margin-bottom: 2px;
    }
    
    /* ===================================
    USER LIST - FULL WIDTH LIKE OTHER BLOCKS
    =================================== */
    #userList {
        width: 100%;
        border-radius: 16px;
        background: linear-gradient(145deg, #ffffff, #f8f9fa);
        box-shadow: 
            0 6px 24px rgba(0, 0, 0, 0.06),
            0 2px 12px rgba(0, 0, 0, 0.04);
        padding: var(--sp-md);
        margin: var(--sp-md) 0;
        border: 1px solid rgba(204, 204, 204, 0.2);
        
        /* Ensure full width expansion like other blocks */
        max-width: none;
        box-sizing: border-box;
    }
    
    .user-list h3 {
        font-size: var(--fs-callout);
        margin-bottom: var(--sp-md);
        color: #2c3e50;
    }
    
    .user-search input {
        padding: var(--sp-base) var(--sp-md);
        border-radius: 10px;
        font-size: var(--fs-base);
        width: 100%;
        border: 1px solid rgba(204, 204, 204, 0.3);
    }
    
    .user-avatar-container {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    
    .user-avatar-container img {
        border: 2px solid rgba(255, 255, 255, 0.8);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .user-list li {
        padding: var(--sp-base);
        border-radius: 10px;
        margin-bottom: var(--sp-sm);
        transition: all 0.3s ease;
    }
    
    .user-list li:hover {
        transform: translateX(4px);
        background: rgba(52, 144, 220, 0.08);
        box-shadow: 0 2px 8px rgba(52, 144, 220, 0.15);
    }
    
    .user-name {
        font-size: var(--fs-base);
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* ===================================
    PROJECTS GRID - TWO COLUMN LAYOUT
    =================================== */
    #NftContainer {
        grid-template-columns: 1fr;
        gap: var(--sp-md);
        margin-top: var(--sp-lg);
    }
    
    .info-container {
        min-height: 220px;
        border-radius: 16px;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
    }
    
    .info-container:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
    
    .text-contents {
        min-height: 160px;
        padding: var(--sp-md);
        background: linear-gradient(to top, 
            rgba(0, 0, 0, 0.92) 0%, 
            rgba(0, 0, 0, 0.75) 70%, 
            transparent 100%
        );
    }
    
    .text-contents h3 {
        font-size: var(--fs-h2);
        margin-bottom: var(--sp-base);
        line-height: 1.2;
    }
    
    .text-contents p {
        font-size: var(--fs-base);
        line-height: 1.4;
        margin-bottom: var(--sp-md);
        -webkit-line-clamp: 3;
    }
    
    .project-links {
        gap: var(--sp-base);
        flex-wrap: wrap;
    }
    
    .text-contents a {
        padding: var(--sp-sm) var(--sp-md);
        font-size: var(--fs-base);
        border-radius: 6px;
        white-space: nowrap;
        transition: all 0.2s ease;
    }
    
    /* NFT Promo badges - optimized for mobile */
    .info-container .nft-promo {
        top: -20px;
        right: var(--sp-md);
        padding: var(--sp-base) var(--sp-md);
        font-size: var(--fs-base);
        border-radius: 8px;
        letter-spacing: 0.03em;
        
        box-shadow: 
            0 6px 20px rgba(255, 0, 110, 0.4),
            0 0 30px rgba(255, 0, 110, 0.3);
    }
    
    /* ===================================
    CHAT INTERFACE - MOBILE OPTIMIZED
    =================================== */
    .modern-chat-container {
        border-radius: 16px;
        min-height: 450px;
        height: calc(100vh - 250px);
        max-height: 600px;
        
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    
    .modern-chat-container:hover {
        transform: translateY(-2px);
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }
    
    .chat-header {
        padding: var(--sp-md) var(--sp-lg);
        gap: var(--sp-md);
        border-bottom: 1px solid rgba(232, 232, 232, 0.8);
    }
    
    .ai-avatar {
        width: var(--size-avatar-md);
        height: var(--size-avatar-md);
        border: 2px solid #e8e8e8;
    }
    
    .ai-name {
        font-size: var(--fs-callout);
        margin-bottom: var(--sp-sm);
    }
    
    .ai-status {
        font-size: var(--fs-base);
        color: #666;
    }
    
    .messages-container {
        padding: var(--sp-md);
        gap: var(--sp-md);
        
        /* Enhanced scrollbar for mobile */
        scrollbar-width: thin;
        scrollbar-color: rgba(106, 17, 203, 0.3) transparent;
    }
    
    .ai-message, .user-message {
        max-width: 85%;
        padding: var(--sp-md);
        border-radius: 16px;
        font-size: var(--fs-base);
        line-height: 1.5;
    }
    
    .ai-message::before {
        width: var(--sp-lg);
        height: var(--sp-lg);
        left: calc(-1 * var(--sp-lg) + var(--sp-base));
        top: var(--sp-base);
    }
    
    .user-message {
        border-radius: 16px 16px 4px 16px;
        background: linear-gradient( #2575FC);
        box-shadow: 0 4px 16px rgba(106, 17, 203, 0.3);
    }
    
    .ai-message {
        border-radius: 16px 16px 16px 4px;
        background: rgba(252, 252, 255, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }
    
    .chat-input-area {
        padding: var(--sp-md) var(--sp-lg);
        background: linear-gradient(to top, 
            rgba(255, 255, 255, 0.98) 0%, 
            rgba(255, 255, 255, 0.95) 50%,
            rgba(255, 255, 255, 0.9) 100%
        );
    }
    
    .input-wrapper {
        padding: var(--sp-base) var(--sp-md);
        border-radius: 12px;  /* Less rounded than original */
        gap: var(--sp-base);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);  /* Subtler shadow */
    }
    
    .message-input-modern {
        font-size: var(--fs-base);
        padding: var(--sp-sm);  /* Consistent with 350px approach */
    }
    
    .send-btn-modern {
        width: 36px;   /* Smaller like 350px approach */
        height: 36px;  /* Smaller like 350px approach */
        border-radius: 8px;  /* Less rounded like 350px */
        background: linear-gradient(#2575FC);
        box-shadow: 0 2px 8px rgba(106, 17, 203, 0.3);  /* Subtler shadow */
    }
    
    .send-btn-modern:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(106, 17, 203, 0.4);
    }
    
    .chat-help p {
        font-size: var(--fs-base);
        margin-top: var(--sp-base);
    }
    
    /* ===================================
    LOG CONTAINER - FOLLOWING 350PX PATTERN
    =================================== */
    .toggle-log-button {
        position: absolute;
        right: var(--sp-md);
        top: 80px;
        width: 28px;
        height: 28px;
        
        background: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(0, 0, 0, 0.15);
        color: #666;
        border-radius: 5px;
        
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        z-index: 1001;
        
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        opacity: 0.7;
        font-size: 12px;
    }
    
    .toggle-log-button:hover {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.2);
        color: #333;
        opacity: 1;
        transform: scale(1.1);
    }
    
    .toggle-log-button:active {
        transform: scale(0.9);
    }
    
    /* Ensure icon transitions work properly - UP/DOWN ARROWS */
    .toggle-log-button i {
        transition: transform 0.2s ease;
        font-size: inherit;
        display: block;
    }
    
    /* Icon states for better visual feedback - UP/DOWN ARROWS */
    .toggle-log-button .fa-chevron-down {
        /* When showing down arrow (collapsed state) */
        color: rgba(0, 0, 0, 0.7);
    }
    
    .toggle-log-button .fa-chevron-up {
        /* When showing up arrow (expanded state) */
        color: rgba(0, 0, 0, 0.8);
    }
    
    /* Log container - BIGGER than 350px for primary mobile experience */
    #logContainer {
        position: absolute;
        right: 70px;
        top: 84px;
        width: 380px;  /* BIGGER than 350px (260px) */
        max-width: calc(100vw - 120px);
        font-size: 12px;  /* BIGGER than 350px (11px) */
        border-radius: 10px;  /* BIGGER than 350px (8px) */
        max-height: 180px;  /* BIGGER than 350px (140px) */
        z-index: 1000;
        line-height: 1.3;  /* Better than 350px (1.2) */
        
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(0, 0, 0, 0.15);
        color: #666;
        
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);  /* Better shadow */
        transition: all 0.3s ease;
    }
    
    #logContainer.active {
        padding: var(--sp-base);
        opacity: 1;
    }
    
    #logContainer.collapsed {
        height: 0;
        padding: 0;
        border-width: 0;
        opacity: 0;
        overflow: hidden;
    }
    
    /* ===================================
    LOADING ANIMATIONS - MOBILE OPTIMIZED
    =================================== */
    .hikari-search-loader {
        padding: var(--sp-md);
        min-height: 100px;
        margin: var(--sp-md) 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .search-icon-container {
        height: 50px;
        margin-bottom: var(--sp-md);
    }
    
    .search-icon-animated {
        font-size: var(--fs-h2);
        filter: drop-shadow(0 4px 12px rgba(106, 17, 203, 0.3));
    }
    
    .search-status-text {
        font-size: var(--fs-base);
        color: #666;
        text-align: center;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .typing-indicator {
        padding: var(--sp-base) var(--sp-md);
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .typing-avatar {
        width: 28px;
        height: 28px;
    }
    
    /* ===================================
    MODAL OPTIMIZATIONS - FOLLOWING 350PX APPROACH
    =================================== */
    .user-profile-modal {
        width: 94vw;
        max-width: 380px;  /* Between 350px's 320px and my original 420px */
        padding: var(--sp-md);  /* Same as 350px */
        border-radius: 14px;    /* Between 350px's 12px and my original 16px */
        max-height: 86vh;       /* Between 350px's 85vh and my original 88vh */
        
        background: linear-gradient(135deg, #1a1a2e, #16213e);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
    
    .user-profile-header {
        flex-direction: row;
        align-items: center;
        gap: var(--sp-md);
        text-align: left;
    }
    
    .user-profile-avatar {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }
    
    .user-profile-details {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: var(--sp-md);
    }
    
    .detail-card {
        padding: var(--sp-md);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
    }
    
    .detail-label {
        font-size: var(--fs-base);
        margin-bottom: var(--sp-base);
    }
    
    .detail-value {
         font-size: var(--fs-base);
        word-break: break-word;
    }
    
    .brenda-stats {
        margin-top: var(--sp-md);
        padding: var(--sp-md);
        border-radius: 12px;
    }
    
    .interaction-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--sp-md);
    }
    
    /* ===================================
    AUTHENTICATION OVERLAY
    =================================== */
    .auth-content {
        padding: var(--sp-lg);
        max-width: 380px;
        margin: 0 auto;
    }
    
    .auth-content h2 {
        font-size: var(--fs-h2);
        text-align: center;
        margin-bottom: var(--sp-md);
    }
    
    .auth-description {
        font-size: var(--fs-base);
        text-align: center;
        margin-bottom: var(--sp-lg);
        line-height: 1.6;
    }
    
    .auth-steps {
        gap: var(--sp-md);
        margin-bottom: var(--sp-lg);
    }
    
    .auth-step {
        padding: var(--sp-md);
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: var(--sp-md);
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: var(--fs-base);
        flex-shrink: 0;
    }
    
    .step-text {
        font-size: var(--fs-base);
        line-height: 1.5;
    }
    
    .discord-button {
        padding: var(--sp-md) var(--sp-lg);
        font-size: var(--fs-callout);
        width: 100%;
        justify-content: center;
        border-radius: 12px;
        min-height: 48px;
    }
    
    /* ===================================
    SCROLLBAR ENHANCEMENTS
    =================================== */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 3px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(106, 17, 203, 0.3);
        border-radius: 3px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(106, 17, 203, 0.5);
    }
    
    .messages-container::-webkit-scrollbar {
        width: 4px;
    }
    
    /* ===================================
    UTILITY ADJUSTMENTS
    =================================== */
    /* Ensure proper touch targets */
    button, .social-btn, .user-list li, .toggle-user-info-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Enhanced focus states for touch devices */
    button:focus-visible,
    input:focus-visible,
    .social-btn:focus-visible,
    .toggle-user-info-btn:focus-visible {
        outline: 3px solid rgba(106, 17, 203, 0.5);
        outline-offset: 2px;
    }
    
    /* Improved hover states for touch */
    @media (hover: hover) {
        .social-btn:hover,
        .user-list li:hover,
        .text-info p:hover {
            transform: translateY(-2px);
        }
    }
    
    /* Typography adjustments - PRIMARY MOBILE EXPERIENCE */
    h2 {
        font-size: 28px;  /* Bigger than 350px (22px) for primary mobile experience */
        margin: var(--sp-md) 0;
        text-align: center;  /* Better for mobile */
    }
    
    /* Performance optimizations for primary mobile experience */
    .info-container,
    .modern-chat-container,
    #userInfoContainer {
        will-change: transform;
    }
    
    .info-container:hover,
    .modern-chat-container:hover,
    #userInfoContainer:hover {
        will-change: auto;
    }
    
    /* ===================================
    END OF PRIMARY MOBILE EXPERIENCE (481px - 800px)
    This is the most visited media query - coherent with 350px design
    =================================== */
}



/* ===================================
BEAUTIFUL ULTRA-SMALL SCREENS (350px and below)
Optimized for the smallest mobile devices
=================================== */
@media (max-width: 350px) {
    /* ===================================
    GLOBAL LAYOUT ADJUSTMENTS
    =================================== */
    #wrapper {
        padding: var(--sp-base);
        gap: var(--sp-base);
        flex-direction: column;
    }
    
    /* ===================================
    HEADER OPTIMIZATION
    =================================== */
    .header.active {
        height: 60vw; /* Smaller header for tiny screens */
        margin-bottom: var(--sp-base);
    }
    
    /* ===================================
    WALLET CONNECTION - COMPACT DESIGN
    =================================== */
    .metamask-container {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        text-align: center;
        margin: var(--sp-base) 0;
        order: 1;
    }
    
    .metamask-container button {
        padding: var(--sp-base) var(--sp-md);
        font-size: var(--fs-base);
        width: 100%;
        max-width: 280px;
        border-radius: 8px;
        box-shadow: #299efd 4px 0 0 0;
    }
    
    .metamask-container button:hover {
        transform: translateX(-1px) translateY(-1px);
        box-shadow: #299efd 5px 1px 0 0;
    }
    
    /* ===================================
    USER INFO PANEL - BEAUTIFUL COMPACT LAYOUT
    =================================== */
    #userInfoContainer {
        order: 2;
        padding: var(--sp-md);
        gap: var(--sp-md);
        border-radius: 12px;
        flex-direction: column;
        text-align: center;
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.9) 100%
        );
        box-shadow:
            0 4px 16px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    
    /* Beautiful avatar styling */
    .avatar-frame {
        width: 60px;
        height: 60px;
        margin: 0 auto var(--sp-base);
        border: 3px solid rgba(106, 17, 203, 0.2);
        box-shadow: 
            0 4px 12px rgba(106, 17, 203, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    
    .avatar-frame:hover {
        transform: scale(1.05);
        border-color: rgba(106, 17, 203, 0.4);
        box-shadow: 
            0 6px 20px rgba(106, 17, 203, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }
    
    /* Text info in beautiful grid */
    .text-info {
        flex-direction: column;
        gap: var(--sp-base);
        width: 100%;
    }
    
    .text-info p {
        padding: var(--sp-base) var(--sp-md);
        font-size: var(--fs-small);
        border-radius: 8px;
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.8) 0%,
            rgba(248, 250, 252, 0.6) 100%
        );
        border: 1px solid rgba(106, 17, 203, 0.1);
        transition: all 0.3s ease;
        text-align: center;
        word-break: break-word;
    }
    
    .text-info p:hover {
        transform: translateY(-2px);
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.85) 100%
        );
        border-color: rgba(106, 17, 203, 0.3);
        box-shadow: 0 4px 12px rgba(106, 17, 203, 0.1);
    }
    
    /* Collapsed state optimization */
    #userInfoContainer.collapsed {
        padding: var(--sp-base);
        flex-direction: row;
        text-align: left;
        gap: var(--sp-base);
    }
    
    #userInfoContainer.collapsed .avatar-frame {
        width: 40px;
        height: 40px;
        margin: 0;
    }
    /* Subtle, integrated toggle - part of the user panel */
.toggle-user-info-btn {
    position: absolute;
    top: var(--sp-sm);
    right: var(--sp-sm);
    width: 16px;
    height: 16px;
    
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.15);
    color: #666;
    border-radius: 3px;
    
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 10;
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 8px;
    opacity: 0.7;
}

.toggle-user-info-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.2);
    color: #333;
    opacity: 1;
    transform: scale(1.1);
}

.toggle-user-info-btn:active {
    transform: scale(0.9);
}

/* Ensure icon changes work properly - don't override JavaScript */
.toggle-user-info-btn i {
    transition: transform 0.2s ease;
}

/* Keep toggle visible when collapsed - just style it differently */
#userInfoContainer.collapsed .toggle-user-info-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.25);
    opacity: 0.9;
}

/* Make collapsed user info clickable to expand as backup */
#userInfoContainer.collapsed {
    cursor: pointer;
}

#userInfoContainer.collapsed:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.92) 100%
    );
    transform: scale(1.02);
}
 
    
    /* ===================================
    SOCIAL BUTTONS - COMPACT & BEAUTIFUL
    =================================== */
    .social-buttons {
        order: 3;
        width: 100%;
        gap: var(--sp-base);
        margin: var(--sp-base) 0;
    }
    
    .social-btn {
        padding: var(--sp-base) var(--sp-md);
        border-radius: 8px;
        font-size: var(--fs-small);
        text-align: center;
        justify-content: center;
        min-height: 40px;
    }
    
    .social-btn i {
        font-size: var(--fs-base);
    }
    
    /* ===================================
    USER LIST - OPTIMIZED FOR SMALL SCREENS
    =================================== */
    #userList {
        order: 4;
        width: 100%;
        border-radius: 12px;
        background: linear-gradient(145deg, #ffffff, #f8f9fa);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        padding: 1rem;
        border: 1px solid #d3d1d9;
    }
    
    .user-search input {
        padding: var(--sp-base);
        border-radius: 8px;
        font-size: var(--fs-base);
    }
    
    .user-avatar-container {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .user-list li {
        padding: var(--sp-base);
        border-radius: 8px;
        margin-bottom: 2px;
        border-bottom: 1px solid silver;
    }
    
    .user-list li:hover {
        transform: translateX(2px);
        background: #aee6ff; 
    }
    
    .user-name {
        font-size: var(--fs-small);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* ===================================
    PROJECTS GRID - SINGLE COLUMN BEAUTY
    =================================== */
    #NftContainer {
        order: 5;
        grid-template-columns: 1fr;
        gap: var(--sp-md);
        margin-top: var(--sp-md);
    }
    
    .info-container {
        min-height: 180px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .text-contents {
        min-height: 120px;
        padding: var(--sp-md);
        background: linear-gradient(to top, 
            rgba(0, 0, 0, 0.9) 0%, 
            rgba(0, 0, 0, 0.7) 70%, 
            transparent 100%
        );
    }
    
    .text-contents h3 {
        font-size: var(--fs-callout);
        margin-bottom: var(--sp-base);
        line-height: 1.2;
    }
    
    .text-contents p {
        font-size: var(--fs-small);
        line-height: 1.4;
        margin-bottom: var(--sp-base);
        -webkit-line-clamp: 2;
    }
    
    .project-links {
        gap: var(--sp-sm);
        flex-wrap: wrap;
    }
    
    .text-contents a {
        padding: var(--sp-sm) var(--sp-base);
        font-size: var(--fs-small);
        border-radius: 4px;
        white-space: nowrap;
        display: inline-block;
    }
    
    /* NFT Promo badges - smaller and positioned better */
    .info-container .nft-promo {
        top: -30px;
        right: var(--sp-base);
        padding: var(--sp-sm) var(--sp-base);
        font-size: var(--fs-small);
        border-radius: 6px;
        letter-spacing: 0.02em;
    }
    
    /* ===================================
    CHAT INTERFACE - OPTIMIZED FOR TINY SCREENS
    =================================== */
    .modern-chat-container {
        order: 6;
        border-radius: 12px;
        min-height: 400px;
        height: calc(100vh - 300px);
        max-height: 500px;
    }
    
    .chat-header {
        padding: var(--sp-base) var(--sp-md);
        gap: var(--sp-base);
    }
    
    .ai-avatar {
        width: 36px;
        height: 36px;
    }
    
    .ai-name {
        font-size: var(--fs-base);
        margin-bottom: var(--sp-sm);
    }
    
    .ai-status {
        font-size: var(--fs-small);
    }
    
    .messages-container {
        padding: var(--sp-base);
        gap: var(--sp-base);
    }
    
    .ai-message, .user-message {
        max-width: 90%;
        padding: var(--sp-base) var(--sp-md);
        border-radius: 12px;
        font-size: var(--fs-small);
        line-height: 1.4;
    }
    
    .ai-message::before {
        width: var(--sp-md);
        height: var(--sp-md);
        left: calc(-1 * var(--sp-md) + var(--sp-sm));
        top: var(--sp-sm);
    }
    
    .chat-input-area {
        padding: var(--sp-base) var(--sp-md);
    }
    
    .input-wrapper {
        padding: var(--sp-base);
        border-radius: 12px;
        gap: var(--sp-base);
    }
    
    .message-input-modern {
        font-size: 11px;
        padding: 5px;
    }
    
    .send-btn-modern {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }
    
    .chat-help p {
        font-size: var(--fs-small);
        padding: 0 var(--sp-base);
    }
    
    /* ===================================
    LOG CONTAINER - COMPACT VERSION
    =================================== */
  .toggle-log-button {
        position: absolute;
        right: var(--sp-base);
        top: 50px; 
        width: 24px;        /* Increased from 1rem (16px) to 24px */
        height: 24px;       /* Increased from 1rem (16px) to 24px */
        
        background: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(0, 0, 0, 0.15);
        color: #666;
        border-radius: 4px;  /* Slightly larger radius for bigger button */
        
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        z-index: 1001;
        
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer; 
        opacity: 0.7;
        font-size: 10px;    /* CRITICAL: Specify icon font size */
    }

    .toggle-log-button:hover {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(0, 0, 0, 0.2);
        color: #333;
        opacity: 1;
        transform: scale(1.1);
    }

    .toggle-log-button:active {
        transform: scale(0.9);
    }

    /* Ensure icon transitions work properly */
    .toggle-log-button i {
        transition: transform 0.2s ease;
        font-size: inherit;  /* Use parent's font-size */
        display: block;      /* Ensure icon displays properly */
    }

    /* Log container - adjusted positioning for larger button */
    #logContainer {
        position: absolute;
        right: 60px;        /* Adjusted to account for larger button */
        top: 54px;
        width: 240px;
        max-width: 70vw;
        font-size: 10px;
        border-radius: 6px;
        max-height: 120px;
        z-index: 1000;
        line-height: 1.1;
        
        background: rgba(255, 255, 255, 0.9);  /* Slightly more opaque */
        border: 1px solid rgba(0, 0, 0, 0.15);
        color: #666;
        
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    #logContainer.active {
        padding: var(--sp-sm);
        opacity: 1;
    }

    #logContainer.collapsed {
        height: 0;
        padding: 0;
        border-width: 0;
        opacity: 0;
        overflow: hidden;
    }

h2 {font-size: 22px;}
    /* ===================================
    AUTHENTICATION OVERLAY
    =================================== */
    .auth-content {
        padding: var(--sp-md);
        max-width: 300px;
        margin: 0 auto;
    }
    
    .auth-content h2 {
        font-size: var(--fs-callout);
        text-align: center;
    }
    
    .auth-description {
        font-size: var(--fs-small);
        text-align: center;
        margin-bottom: var(--sp-md);
    }
    
    .auth-steps {
        gap: var(--sp-base);
    }
    
    .auth-step {
        padding: var(--sp-base);
        border-radius: 8px;
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: var(--fs-small);
        flex-shrink: 0;
    }
    
    .step-text {
        font-size: var(--fs-small);
        margin-left: var(--sp-base);
    }
    
    .discord-button {
        padding: var(--sp-base) var(--sp-md);
        font-size: var(--fs-base);
        width: 100%;
        justify-content: center;
        border-radius: 8px;
    }
    
    /* ===================================
    BEAUTIFUL SCROLLBARS FOR TINY SCREENS
    =================================== */
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(106, 17, 203, 0.4);
        border-radius: 2px;
    }
    
    .messages-container::-webkit-scrollbar {
        width: 3px;
    }
    
    /* ===================================
    LOADING ANIMATIONS - COMPACT
    =================================== */
    .hikari-search-loader {
        padding: var(--sp-md);
        min-height: 80px;
    }
    
    .search-icon-container {
        height: 40px;
        margin-bottom: var(--sp-base);
    }
    
    .search-icon-animated {
        font-size: var(--fs-callout);
    }
    
    .search-status-text {
        font-size: var(--fs-small);
    }
    
    .typing-indicator {
        padding: var(--sp-sm) var(--sp-base);
        border-radius: 12px;
    }
    
    .typing-avatar {
        width: 20px;
        height: 20px;
    }
    
    /* ===================================
    MODAL OPTIMIZATIONS
    =================================== */
    .user-profile-modal {
        width: 95vw;
        max-width: 320px;
        padding: var(--sp-md);
        border-radius: 12px;
        max-height: 85vh;
    }
    
    .user-profile-header {
        flex-direction: column;
        text-align: center;
        gap: var(--sp-base);
    }
    
    .user-profile-avatar {
        width: 60px;
        height: 60px;
    }
    
    .user-profile-details {
        grid-template-columns: 1fr;
        gap: var(--sp-base);
    }
    
    .detail-card {
        padding: var(--sp-base);
        border-radius: 8px;
    }
    
    .detail-label {
        font-size: var(--fs-small);
    }
    
    .detail-value {
        font-size: var(--fs-base);word-break: break-word;
    }
    
    /* ===================================
    UTILITY ADJUSTMENTS
    =================================== */
    .lock-icon-modern {
        font-size: var(--fs-callout);
    }
    
    /* Ensure touch targets are accessible */
    button, .social-btn, .user-list li {
        min-height: 40px;
        min-width: 40px;
    }
    
    /* Beautiful focus states for tiny screens */
    button:focus-visible,
    input:focus-visible,
    .social-btn:focus-visible {
        outline: 2px solid #6A11CB;
        outline-offset: 2px;
    }
}

  
/* Shake animation for disabled input */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Rate-limited button styling */
.send-btn-modern.rate-limited {
    background-color: #ff6b6b !important;
    cursor: not-allowed !important;
    opacity: 0.8;
    font-size: 9px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-content: center;
    justify-content: center;
margin: auto;
    text-align: center;
}

.send-btn-modern.rate-limited:hover {
    background-color: #ff5252 !important;
    transform: none !important;
}

/* Countdown icon animation */
.send-btn-modern.rate-limited i {
    animation: pulse 1s ease-in-out infinite; 
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Disabled input styling during rate limit */
.message-input-modern:disabled {
    background-color: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    cursor: not-allowed;
}

/* Optional: Add a rate limit warning banner */
.rate-limit-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
} 

/* --- STYLE: Account List --- */
.account-list-wrapper {
    margin-top: 15px;
    border-top: 1px solid #444;
    padding-top: 10px;
}
.account-list-label {
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 8px;
}
.account-list-label small {
    color: #888;
}
.account-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 120px;
    overflow-y: auto;
}
.account-item {
    display: flex;
    align-items: center;
    padding: 6px 4px;
    font-size: 0.85em;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.account-item.connected {
    background-color: rgba(40, 167, 69, 0.15);
}
.account-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
    color: #999;
}
.account-item.connected i {
    color: #28a745; /* Green for connected */
}
.account-item .account-address {
    font-family: monospace;
    color: #ddd;
}
.account-item .account-status {
    margin-left: auto;
    font-size: 0.9em;
    color: #888;
    background-color: #333;
    padding: 2px 6px;
    border-radius: 10px;
}
.account-item.connected .account-status {
    color: #fff;
    background-color: #28a745;
}

/* --- STYLE: Manage Permissions Button --- */
.link-account-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 8px 12px;
    font-size: 0.9em;
    font-weight: bold;
    color: #eee;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}
.link-account-btn:hover {
    background-color: #4a4a4a;
    border-color: #777;
}
.link-account-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
.link-account-btn i {
    margin-right: 8px;
}


/* ===================================
CHAT SUGGESTIONS
=================================== */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.chat-suggestion-btn {
    background-color: rgba(106, 17, 203, 0.07);
    border: 1px solid rgba(106, 17, 203, 0.2);
    color: #6A11CB;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--fs-small);
    font-family: var(--ff-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none; /* Fix for iOS styling */
    appearance: none;
}

.chat-suggestion-btn:hover {
    background-color: rgba(106, 17, 203, 0.15);
    border-color: rgba(106, 17, 203, 0.4);
    transform: translateY(-2px);
    color: #3d0a7b;
    box-shadow: 0 4px 12px rgba(106, 17, 203, 0.1);
}