/* Modern Header Navigation CSS - Enhanced UX & Accessibility */

/* CRITICAL FIX: Font Rendering Issues - Prevent Text Overlapping */
* {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    font-feature-settings: "kern" 1 !important;
    font-kerning: normal !important;
}

/* CRITICAL FIX: Prevent text-shadow conflicts */
.navbar .logo,
.mobile-nav-item,
.mobile-menu-header h3,
.mobile-user-info h4,
.nav-menu a {
    text-shadow: none !important;
    -webkit-text-shadow: none !important;
    -moz-text-shadow: none !important;
}

/* CRITICAL FIX: Ensure proper font stacking */
body, html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

:root {
    --primary-green: #10B981;
    --primary-green-dark: #059669;
    --primary-green-light: #D1FAE5;
    --primary-yellow: #F59E0B;
    --primary-yellow-dark: #D97706;
    --primary-yellow-light: #FEF3C7;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Skip Link for Accessibility - REMOVED */
/* Skip link functionality has been removed as requested */

/* Disconnect Popup Styles */
.disconnect-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.disconnect-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.disconnect-popup-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

.disconnect-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.disconnect-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.disconnect-popup-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.disconnect-popup-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.disconnect-popup-body {
    padding: 20px 24px;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 16px;
}

.wallet-info i {
    font-size: 20px;
    color: var(--primary-green);
}

.wallet-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wallet-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.wallet-address {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.disconnect-popup-body p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.5;
}

.disconnect-popup-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--gray-200);
    justify-content: flex-end;
}

.disconnect-popup-footer button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.disconnect-popup-footer .btn-secondary {
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
}

.disconnect-popup-footer .btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.disconnect-popup-footer .btn-danger {
    border: 1px solid #dc2626;
    background: #dc2626;
    color: white;
}

.disconnect-popup-footer .btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

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

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 0 !important; /* Remove margin to eliminate gap */
}

/* Body padding to compensate for fixed navbar */
body {
    padding-top: 0 !important; /* Removed padding to eliminate gap */
    margin: 0 !important;
}

/* Enhanced Navbar Layout - Centered Navigation */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.875rem 1.75rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.navbar:hover {
    box-shadow: var(--shadow-md);
}

/* Left Section: Logo */
.navbar-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.navbar .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.375rem;
    color: var(--gray-900);
    transition: transform var(--transition-fast);
}

.navbar .logo:hover {
    transform: scale(1.05);
}

.navbar .logo img {
    height: 36px;
    width: auto;
    /* Removed filter to show green logo properly */
    transition: filter var(--transition-fast);
}

.navbar .logo:hover img {
    /* Removed filter to show green logo properly on hover */
    opacity: 0.8;
}

/* Center Section: Navigation Menu */
.navbar-center {
    display: block !important;
    align-items: center;
    justify-content: center;
}

.navbar-center .nav-menu {
    display: none !important; /* Hide completely */
    align-items: center;
    gap: 1rem;
    background: var(--gray-50);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.navbar-center .nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--gray-600);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-center .nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.navbar-center .nav-menu a:hover::before,
.navbar-center .nav-menu a.active::before {
    opacity: 1;
}

.navbar-center .nav-menu a:hover,
.navbar-center .nav-menu a.active {
    color: white;
    transform: translateY(-1px);
}

.navbar-center .nav-menu a i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.navbar-center .nav-menu a:hover i,
.navbar-center .nav-menu a.active i {
    transform: scale(1.1);
}

/* Right Section: Auth Buttons */
.navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Enhanced Mobile Menu Toggle - IMPROVED PROPORTIONS */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 9999;
    position: relative;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
}

.mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.mobile-menu-toggle .hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile-specific hamburger animation */
@media (max-width: 768px) {
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px) !important;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px) !important;
    }
}

/* Enhanced Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Enhanced Mobile Menu Drawer - IMPROVED POSITIONING & PROPORTIONS */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* FIXED: Ensure only one close button is visible */
.mobile-menu-drawer .mobile-menu-close:not(:first-of-type) {
    display: none !important;
}

/* FIXED: Ensure close button is always visible and properly positioned */
.mobile-menu-drawer .mobile-menu-close:first-of-type {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
    position: relative;
    z-index: 10001;
}

.mobile-menu-drawer.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.mobile-menu-close:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Enhanced Navigation Menu - IMPROVED PROPORTIONS */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem; /* REDUCED from 0.75rem 1rem */
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    font-size: 0.95rem; /* ADDED for better proportion */
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left var(--transition-slow);
}

.nav-menu a:hover::before {
    left: 100%;
}

.nav-menu a:hover {
    background: var(--gray-50);
    color: var(--primary-green);
    transform: translateY(-1px);
}

.nav-menu a.active {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.nav-menu a.active:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
}

.nav-menu a i {
    font-size: 1rem; /* REDUCED from 1.1rem */
    transition: transform var(--transition-fast);
}

.nav-menu a:hover i {
    transform: scale(1.1);
}

/* Mobile Navigation Menu - IMPROVED STYLING & POSITIONING */
.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    flex: 1;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 600;
    transition: all 0.3s ease;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
    transform: translateX(5px);
}

.mobile-nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Header Actions */
.navbar .header-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem; /* REDUCED from 1rem */
}

/* Enhanced Connect Button - IMPROVED PROPORTIONS */
.navbar .connect-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem; /* REDUCED from 0.75rem 1.5rem */
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem; /* ADDED for better proportion */
}

.navbar .connect-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 var(--transition-slow);
}

.navbar .connect-btn:hover::before {
    left: 100%;
}

.navbar .connect-btn:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.navbar .connect-btn:focus {
    outline: 2px solid var(--primary-green-dark);
    outline-offset: 2px;
}

.navbar .connect-btn.connected {
    background: var(--gray-600);
    cursor: default;
}

.navbar .connect-btn.connected:hover {
    background: var(--gray-600);
    transform: none;
    box-shadow: none;
}

.navbar .connect-btn i {
    font-size: 0.9rem; /* REDUCED from 1rem */
    transition: transform var(--transition-fast);
}

.navbar .connect-btn:hover i {
    transform: scale(1.1);
}

/* Loading Spinner - IMPROVED PROPORTIONS */
.loading-spinner {
    display: none;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 14px; /* REDUCED from 16px */
    height: 14px; /* REDUCED from 16px */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced User Profile - IMPROVED PROPORTIONS */
.navbar .user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.navbar .user-profile:hover {
    background: var(--gray-50);
}

.navbar .user-profile:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar .username {
    font-weight: 500;
    color: var(--gray-700);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem; /* ADDED for better proportion */
}

.navbar .user-avatar {
    width: 28px; /* FURTHER REDUCED from 36px */
    height: 28px; /* FURTHER REDUCED from 36px */
    background: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem; /* FURTHER REDUCED from 1rem */
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.navbar .user-avatar:hover {
    transform: scale(1.05);
    border-color: var(--primary-green-dark);
}

/* Enhanced User Dropdown - IMPROVED PROPORTIONS */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 260px; /* REDUCED from 280px */
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1000;
    border: 1px solid var(--gray-200);
    margin-top: 0.5rem;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 1.25rem; /* REDUCED from 1.5rem */
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 12px 12px 0 0;
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    font-size: 0.95rem; /* ADDED for better proportion */
}

.user-dropdown-email {
    font-size: 0.8rem; /* REDUCED from 0.875rem */
    color: var(--gray-600);
}

.user-dropdown-menu {
    padding: 0.5rem;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem; /* REDUCED from 0.75rem 1rem */
    text-decoration: none;
    color: var(--gray-700);
    border-radius: 8px;
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem; /* ADDED for better proportion */
}

.user-dropdown-item:hover {
    background: var(--gray-50);
    color: var(--primary-green);
    transform: translateX(4px);
}

.user-dropdown-item.logout {
    color: var(--gray-600);
}

.user-dropdown-item.logout:hover {
    background: #FEF2F2;
    color: #DC2626;
}

.user-dropdown-item i {
    font-size: 0.9rem; /* REDUCED from 1rem */
    width: 18px; /* REDUCED from 20px */
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 0;
}

/* Mobile User Section - IMPROVED POSITIONING & STYLING */
.mobile-user-section {
    margin-top: auto;
    padding: 1.25rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 0 0 12px 0; /* Added rounded corners on bottom right */
    margin: 0 0.75rem 0.75rem 0.75rem; /* Added margin for better spacing */
}

.mobile-connect-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 0.875rem;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2); /* Added shadow */
}

.mobile-connect-btn:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px); /* Enhanced hover effect */
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); /* Enhanced shadow on hover */
}

.mobile-user-profile {
    background: var(--white);
    border-radius: 12px;
    padding: 0.875rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Enhanced shadow */
    border: 1px solid var(--gray-200); /* Added subtle border */
}

.mobile-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.875rem; /* REDUCED from 1rem */
}

.mobile-username {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.95rem; /* ADDED for better proportion */
}

.mobile-user-avatar {
    width: 32px; /* FURTHER REDUCED from 40px */
    height: 32px; /* FURTHER REDUCED from 40px */
    background: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem; /* FURTHER REDUCED from 1.1rem */
}

.mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-user-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem;
    text-decoration: none;
    color: var(--gray-700);
    border-radius: 8px;
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0.125rem 0; /* Added vertical margin */
}

.mobile-user-action:hover {
    background: var(--gray-50);
    color: var(--primary-green);
    transform: translateX(4px); /* Added slide effect */
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15); /* Added subtle shadow */
}

.mobile-user-action.logout:hover {
    background: #FEF2F2;
    color: #DC2626;
    transform: translateX(4px); /* Added slide effect */
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15); /* Added red shadow for logout */
}

.mobile-user-action i {
    font-size: 0.9rem; /* REDUCED from 1rem */
    width: 18px; /* REDUCED from 20px */
    text-align: center;
}
.nav-menu a:hover {
    color: #089d6e !important;
    border: 2px solid #08a070;
}
.nav-menu a.active:hover {
    color: #e6e6e6 !important;
}
.navbar .header-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    justify-content: flex-end;
}

/* Responsive Design - FIXED MOBILE VIEW - IMPROVED PROPORTIONS */
@media (max-width: 768px) {
    .navbar {
        grid-template-columns: 1fr auto;
        padding: 0.75rem 1rem;
        margin-top: -25px !important;
    }

    /* FIXED: Remove gap above header menu on mobile */
    .main-container {
        margin-top: 0; /* Remove margin to eliminate gap */
    }

    .navbar-center {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .navbar-right {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
    }

    .nav-menu {
        display: none !important;
    }

    .navbar .header-actions {
        gap: 0.5rem;
    }

    .navbar .username {
        display: none;
    }

    .navbar .connect-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }

    .navbar .connect-btn i {
        font-size: 0.8rem;
    }

    .user-dropdown {
        width: 240px;
        right: -1rem;
    }

    /* IMPROVED: Mobile menu positioning - UNIFIED */
    .mobile-menu-drawer {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        left: auto !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: var(--white) !important;
        box-shadow: var(--shadow-xl) !important;
        z-index: 10000 !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        transform: none !important;
    }

    .mobile-menu-drawer.active {
        right: 0 !important;
        left: auto !important;
        transform: none !important;
    }

    /* FIXED: Ensure overlay covers entire screen - UNIFIED */
    .mobile-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.6) !important;
        z-index: 9998 !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }

    .mobile-menu-overlay.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* FIXED: Prevent body scroll when menu is open - UNIFIED */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* FIXED: Header actions spacing - UNIFIED */
    .header-actions {
        margin-right: -30px;
    }

    /* FIXED: User dropdown positioning - UNIFIED */
    .user-dropdown.show {
        opacity: 1 !important;
        visibility: visible !important;
        position: absolute !important;
        left: unset !important;
        width: 280px !important;
        right: -70px !important;
        display: block;
        top: 60px !important;
        max-width: calc(100vw - 2rem) !important;
    }

    /* FIXED: Mobile user section - UNIFIED */
    .mobile-user-section {
        display: none;
    }

    .mobile-menu-toggle,
    .mobile-menu-close,
    .mobile-nav-item,
    .mobile-user-action {
        min-height: 40px !important;
        min-width: 40px !important;
    }

    .navbar .user-profile {
        margin-left: 100px;
    }

    #connectWalletBtn {
        position: absolute;
    }
    button.mobile-menu-toggle {
        position: absolute !important;
        right: 10px;
    }
    .header-actions {
        position: absolute;
        right: 90px;
    }
    /* FIXED: Ensure mobile menu close button is visible and consistent */
    .mobile-menu-close,
    button.mobile-menu-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none !important;
        border: none !important;
        font-size: 1.5rem !important;
        color: var(--gray-600) !important;
        cursor: pointer !important;
        padding: 0.5rem !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
        min-width: 44px !important;
        min-height: 44px !important;
        width: 44px !important;
        height: 44px !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 10001 !important;
    }

    .mobile-menu-close:hover,
    button.mobile-menu-close:hover {
        background: var(--gray-100) !important;
        color: var(--gray-800) !important;
    }

    .mobile-menu-close:focus,
    button.mobile-menu-close:focus {
        outline: 2px solid var(--primary-green) !important;
        outline-offset: 2px !important;
    }

    /* FIXED: Ensure mobile menu header is properly styled */
    .mobile-menu-header {
        display: flex !important;
        justify-content: flex-end !important;
        padding: 1rem !important;
        border-bottom: 1px solid var(--gray-200) !important;
        background: var(--white) !important;
        position: relative !important;
        z-index: 10002 !important;
    }

    /* FIXED: Hide any duplicate mobile menu elements */
    .mobile-menu-drawer + .mobile-menu-drawer,
    .mobile-menu-close + .mobile-menu-close,
    .mobile-menu-toggle + .mobile-menu-toggle {
        display: none !important;
    }

    /* FIXED: Ensure only one mobile menu drawer is active */
.mobile-menu-drawer:not(:first-of-type) {
    display: none !important;
}

/* FIXED: Ensure mobile menu drawer is visible when active */
div#mobileMenuDrawer.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
    right: 0 !important;
    left: auto !important;
}
    .navbar {
        grid-template-columns: 1fr auto !important;
        padding: 0.75rem 1rem !important;
        position: relative !important;
        margin-top: 0 !important;
    }
    #connectWalletBtn {
        position: absolute !important;
        right: 60px;
    }
    nav.navbar {
        margin-top: 0;
    }
    .user-dropdown.show {
        opacity: 1 !important;
        visibility: visible !important;
        position: absolute !important;
        left: unset !important;
        width: 280px !important;
        right: -50px !important;
        display: block;
        top: 50px !important;
        max-width: calc(100vw - 2rem) !important;
    }
    .user-dropdown-header
 {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 12px 12px 0 0;
    line-height: 1.6;
}
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.625rem 0.875rem;
    }

    /* FIXED: Remove gap on smaller mobile screens */
    .main-container {
        margin-top: 0; /* Remove margin to eliminate gap */
    }

    .mobile-menu-drawer {
        width: 280px;
    }

    .mobile-nav-item {
        padding: 0.875rem;
        font-size: 0.875rem;
    }

    .mobile-auth-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }
}

/* Enhanced Connect Button Visibility */
.navbar.show-connect .connect-btn {
    display: flex;
}

.navbar:not(.show-connect) .connect-btn {
    display: none;
}

/* Focus Management */
.navbar *:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .navbar {
        border-bottom: 2px solid var(--gray-900);
    }

    .nav-menu a {
        border: 1px solid transparent;
    }

    .nav-menu a:hover {
        border-color: var(--primary-green);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .navbar,
    .nav-menu a,
    .navbar .connect-btn,
    .navbar .user-profile,
    .user-dropdown,
    .mobile-menu-drawer,
    .mobile-menu-overlay {
        transition: none;
    }

    .nav-menu a::before,
    .navbar .connect-btn::before {
        display: none;
    }
}

/* Print Styles */
@media print {
    .navbar {
        position: static;
        box-shadow: none;
        border-bottom: 1px solid var(--gray-300);
    }

    .mobile-menu-toggle,
    .mobile-menu-overlay,
    .mobile-menu-drawer,
    .navbar .connect-btn {
        display: none !important;
    }
}

/* Enhanced Auth Buttons - Beautiful Design */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    justify-content: flex-end;
    width: 100%;
}

.btn-login,
.btn-register {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
}

/* Login Button - Primary Style */
.btn-login {
    background: linear-gradient(135deg, #0ca876 0%, #059166 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-login::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.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Register Button - Secondary Style */
.btn-register {
    background: linear-gradient(135deg, #eda722 0%, #dab43f 100%);
    color: white;
    box-shadow: 0 4px 15px rgb(255 255 255 / 40%);
}



.btn-register::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.5s;
}

.btn-register:hover::before {
    left: 100%;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.6);
    color: white;
}

.btn-register:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

/* Button Icons */
.btn-login i,
.btn-register i {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

.btn-login:hover i,
.btn-register:hover i {
    transform: scale(1.1);
}

/* Focus States for Accessibility */
.btn-login:focus,
.btn-register:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3), 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-register:focus {
    box-shadow: 0 0 0 3px rgba(240, 147, 251, 0.3), 0 4px 15px rgba(240, 147, 251, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-buttons {
        gap: 0.75rem;
    }

    .btn-login,
    .btn-register {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
        min-height: 40px;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .auth-buttons {
        gap: 0.5rem;
    }

    .btn-login,
    .btn-register {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        min-height: 36px;
        min-width: 36px;
    }
}

/* Animation for button entrance */
@keyframes buttonSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-login,
.btn-register {
    animation: buttonSlideIn 0.6s ease-out;
}

.btn-register {
    animation-delay: 0.1s;
}

/* Hover effect with glow */
.btn-login:hover,
.btn-register:hover {
    filter: brightness(1.1);
}

/* Active state */
.btn-login:active,
.btn-register:active {
    filter: brightness(0.9);
}

.mobile-auth-section {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-login-btn {
    background: linear-gradient(135deg, #0ca876 0%, #059166 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mobile-register-btn {
    background: linear-gradient(135deg, #eda722 0%, #dab43f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.mobile-auth-btn:hover {
    transform: translateY(-2px);
    color: white;
}

.mobile-login-btn:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.mobile-register-btn:hover {
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-buttons {
        gap: 0.75rem;
    }

    .btn-login,
    .btn-register {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
        min-height: 40px;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .auth-buttons {
        gap: 0.5rem;
    }

    .btn-login,
    .btn-register {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        min-height: 36px;
        min-width: 36px;
    }
}

/* Animation for mobile menu */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.mobile-menu-drawer.active {
    animation: slideInRight 0.3s ease-out;
}

/* Force mobile menu toggle visibility on mobile - ENHANCED */
@media (max-width: 768px) {
    /* FIXED: Ensure mobile menu toggle is always visible */
    .mobile-menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 10001 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        background: transparent !important;
        border: none !important;
        padding: 0.5rem !important;
        margin: 0 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        flex-direction: column !important;
        justify-content: space-around !important;
        align-items: center !important;
        border-radius: 4px !important;
        transition: all 0.3s ease !important;
    }

    /* FIXED: Ensure hamburger lines are visible */
    .mobile-menu-toggle .hamburger-line {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 20px !important;
        height: 3px !important;
        background: var(--gray-700) !important;
        border-radius: 2px !important;
        margin: 2px 0 !important;
        transition: all 0.3s ease !important;
        transform-origin: center !important;
    }

    /* FIXED: Ensure mobile menu drawer is properly positioned */
    .mobile-menu-drawer {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        left: auto !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: var(--white) !important;
        box-shadow: var(--shadow-xl) !important;
        z-index: 10000 !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        transform: none !important;
    }

    .mobile-menu-drawer.active {
        right: 0 !important;
        left: auto !important;
        transform: none !important;
    }

    /* FIXED: Ensure mobile menu close button is always visible */
    .mobile-menu-close,
    .mobile-menu-drawer .mobile-menu-close {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: none !important;
        border: none !important;
        font-size: 1.5rem !important;
        color: var(--gray-600) !important;
        cursor: pointer !important;
        padding: 0.5rem !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 10001 !important;
    }

    .mobile-menu-close:hover,
    .mobile-menu-drawer .mobile-menu-close:hover {
        background: var(--gray-100) !important;
        color: var(--gray-800) !important;
    }

    .mobile-menu-close:focus,
    .mobile-menu-drawer .mobile-menu-close:focus {
        outline: 2px solid var(--primary-green) !important;
        outline-offset: 2px !important;
    }

    /* FIXED: Ensure mobile menu header is properly styled */
    .mobile-menu-header {
        display: flex !important;
        justify-content: flex-end !important;
        padding: 1rem !important;
        border-bottom: 1px solid var(--gray-200) !important;
        background: var(--white) !important;
        position: relative !important;
        z-index: 10002 !important;
    }

    .mobile-menu-toggle .hamburger-line {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 3px !important;
        background: var(--gray-700) !important;
        border-radius: 2px !important;
        margin: 2px 0 !important;
        transition: all 0.3s ease !important;
    }

    /* Ensure the toggle button is clickable */
    .mobile-menu-toggle:active {
        transform: scale(0.95) !important;
    }

    .mobile-menu-toggle:hover {
        background: var(--gray-100) !important;
        border-radius: 8px !important;
    }

    /* Make sure the button has proper touch target */
    .mobile-menu-toggle::before {
        content: '' !important;
        position: absolute !important;
        top: -10px !important;
        left: -10px !important;
        right: -10px !important;
        bottom: -10px !important;
        z-index: -1 !important;
    }

    /* Ensure navbar layout is correct */
    .navbar {
        grid-template-columns: 1fr auto !important;
        padding: 0.75rem 1rem !important;
        position: relative !important;
    }

    /* Hide desktop navigation */
    .navbar-center {
        display: none !important;
    }

    .navbar-right {
        display: none !important;
    }

    .nav-menu {
        display: none !important;
    }

    /* Ensure mobile menu drawer is properly positioned */
    .mobile-menu-drawer {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        left: auto !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: var(--white) !important;
        box-shadow: var(--shadow-xl) !important;
        z-index: 10000 !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        transform: none !important;
    }

    .mobile-menu-drawer.active {
        right: 0 !important;
        left: auto !important;
        transform: none !important;
    }

    /* Ensure overlay covers entire screen */
    .mobile-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.6) !important;
        z-index: 9998 !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }

    .mobile-menu-overlay.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    .navbar .logo img {
        height: 36px;
        width: auto;
        /* Removed filter to show green logo properly on mobile */
        transition: filter var(--transition-fast);
        height: 32px !important;
    }
}

.user-dropdown-referral, .mobile-referral-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
}
.user-dropdown-referral .ref-label, .mobile-referral-row .ref-label {
  font-size: 0.82rem;
  color: var(--gray-600);
  min-width: 80px;
}
.user-dropdown-referral .ref-code, .mobile-referral-row .ref-code {
  background: #fff;
  border: 1px dashed var(--gray-300);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--gray-800);
}
.copy-referral-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #fff;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  transition: all .2s ease;
}
.copy-referral-btn:hover { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-800); }
.copy-referral-btn:active { transform: scale(0.98); }
.copy-referral-btn i { font-size: 0.9rem; }

/* Wallet Address Styling - Stacked Layout to Prevent Overlapping */
.user-dropdown-wallet, .mobile-wallet-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-top: 10px !important;
  padding: 10px 12px !important;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  border: 1px solid #0ea5e9 !important;
  border-radius: 10px !important;
  align-items: stretch !important;
}

.user-dropdown-wallet .wallet-label, .mobile-wallet-row .wallet-label {
  font-size: 0.75rem !important;
  color: #0369a1 !important;
  font-weight: 500 !important;
  text-align: left !important;
  margin-bottom: 2px !important;
  display: block !important;
}

.user-dropdown-wallet .wallet-code, .mobile-wallet-row .wallet-code {
  background: #fff !important;
  border: 1px dashed #0ea5e9 !important;
  border-radius: 999px !important;
  padding: 4px 10px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace !important;
  font-size: 0.82rem !important;
  color: #0c4a6e !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 0 !important;
}

.user-dropdown-wallet .wallet-address, .mobile-wallet-row .wallet-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace !important;
  font-size: 0.82rem !important;
  color: #0c4a6e !important;
  flex: 1 !important;
}

.user-dropdown-wallet .wallet-code:hover, .mobile-wallet-row .wallet-code:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #075985;
}

.copy-wallet-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  background: #fff !important;
  border: 1px solid #0ea5e9 !important;
  border-radius: 6px !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  color: #0ea5e9 !important;
  flex-shrink: 0 !important;
}

.copy-wallet-btn:hover { 
  background: #f0f9ff; 
  border-color: #0284c7; 
  color: #075985; 
}

.copy-wallet-btn:active { 
  transform: scale(0.98); 
}

.copy-wallet-btn i { 
  font-size: 0.9rem; 
}

/* Referral URL Info */
.referral-url-info, .mobile-referral-url-info {
    margin-top: 8px;
    padding: 6px 8px;
    background: var(--gray-100);
    border-radius: 6px;
    border-left: 3px solid var(--gray-300);
}

.referral-url-text {
    color: var(--gray-600);
    font-size: 0.75rem;
    line-height: 1.3;
    word-break: break-all;
}

.env-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 6px;
    text-transform: uppercase;
}

.env-badge.staging {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.env-badge.production {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}



/* Tooltip */
.copy-referral-btn[data-tip], .copy-wallet-btn[data-tip] { position: relative; }
.copy-referral-btn[data-tip]:hover::after, .copy-wallet-btn[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: -34px;
  right: 0;
  background: var(--gray-800);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.copy-referral-btn[data-tip]:hover::before, .copy-wallet-btn[data-tip]:hover::before {
  content: '';
  position: absolute;
  top: -8px; right: 8px;
  border: 6px solid transparent;
  border-top-color: var(--gray-800);
}

/* ===== RESPONSIVE DESIGN FOR CONNECT WALLET BUTTON ===== */
@media (max-width: 480px) {
    button.tw-connect-wallet.css-1u6pr3v {
        padding: 6px 0px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
        min-width: 70px !important;
        background: #374151 !important;
        color: #fff !important;
        margin-right: 13px;
    }
    
    /* Connected Wallet Button - Mobile Optimized */
    button.tw-connected-wallet.css-uhf223 {
        padding: 4px 6px !important;
        height: 40px !important;
        min-width: 40px !important;
        background: #374151 !important;
        border: 1px solid #4b5563 !important;
        border-radius: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        margin-right: 13px !important;
        margin-left: auto !important;
        transition: all 0.2s ease !important;
        position: relative !important;
        flex-shrink: 0 !important;
    }
    
    /* Hide text content on very small screens, show only avatar */
    @media (max-width: 360px) {
        button.tw-connected-wallet.css-uhf223 {
            padding: 4px !important;
            min-width: 40px !important;
            width: 40px !important;
            height: 40px !important;
            justify-content: center !important;
            align-items: center !important;
        }
        
        button.tw-connected-wallet.css-uhf223 .css-cauv8d:last-child {
            display: none !important;
        }
        
        button.tw-connected-wallet.css-uhf223 .css-cauv8d:first-child {
            margin: 0 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
    }
    
    /* Avatar styling */
    button.tw-connected-wallet.css-uhf223 .css-cauv8d:first-child {
        flex-shrink: 0 !important;
        height: 32px !important;
        width: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    button.tw-connected-wallet.css-uhf223 .tw-connected-wallet__account_avatar {
        height: 32px !important;
        width: 32px !important;
        border-radius: 50% !important;
        display: block !important;
        margin: 0 !important;
    }
    
    /* Text content styling */
    button.tw-connected-wallet.css-uhf223 .css-cauv8d:last-child {
        min-width: 0 !important;
        flex: 1 !important;
    }
    
    button.tw-connected-wallet.css-uhf223 .tw-connected-wallet__address {
        font-size: 0.7rem !important;
        font-weight: 500 !important;
        color: #fff !important;
        line-height: 1.2 !important;
    }
    
    button.tw-connected-wallet.css-uhf223 .tw-connected-wallet__balance {
        font-size: 0.6rem !important;
        color: #9ca3af !important;
        line-height: 1 !important;
    }
    
    /* Hover effect */
    button.tw-connected-wallet.css-uhf223:hover {
        background: #4b5563 !important;
        border-color: #6b7280 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }
}


/* Mobile Responsive for Wallet */
@media (max-width: 480px) {
    .mobile-wallet-row {
        padding: 8px 10px;
        gap: 4px;
    }
    
    .mobile-wallet-row .wallet-label {
        font-size: 0.7rem;
    }
    
    .mobile-wallet-row .wallet-code {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .copy-wallet-btn {
        width: 22px;
        height: 22px;
    }
}

/* Custom wallet button styling - Mobile only */
@media (max-width: 768px) {
    button.tw-connected-wallet.css-uhf223 {
        width: 115px !important;
        padding: 0px !important;
        min-width: auto !important;
        margin-right: 10px !important;
    }
}
