@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+Pro:wght@400;600&display=swap');

/* Toast Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Enhanced Button Styles with Water Ripple Effects */
.btn, button[class*="btn"], 
#capture-photo, #verify-qr, #export-qr, 
#snap-photo, #save-photo, #cancel-camera, #close-kyc {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover, button[class*="btn"]:hover,
#capture-photo:hover, #verify-qr:hover, #export-qr:hover,
#snap-photo:hover, #save-photo:hover, #cancel-camera:hover, #close-kyc:hover {
    filter: brightness(1.15) saturate(1.3) drop-shadow(0 0 15px rgba(59,130,246,0.5));
    transform: translateY(-2px);
}

.btn:active, button[class*="btn"]:active,
#capture-photo:active, #verify-qr:active, #export-qr:active,
#snap-photo:active, #save-photo:active, #cancel-camera:active, #close-kyc:active {
    transform: translateY(1px) scale(0.98);
    filter: brightness(0.95);
    transition: all 0.1s ease;
}

.btn:focus, button[class*="btn"]:focus,
#capture-photo:focus, #verify-qr:focus, #export-qr:focus,
#snap-photo:focus, #save-photo:focus, #cancel-camera:focus, #close-kyc:focus {
    outline: 3px solid rgba(59, 130, 246, 0.6);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Water Ripple Animation */
@keyframes waterRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    25% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(2);
        opacity: 0.6;
    }
    75% {
        transform: scale(3);
        opacity: 0.3;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: waterRipple 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(135,206,250,0.6) 30%, rgba(70,130,180,0.4) 50%, transparent 80%);
    box-shadow: 0 0 20px rgba(135,206,250,0.5);
    z-index: 1;
}

/* General body styles for improved text legibility */
body {
    margin: 0;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
    font-size: 1rem; /* Base font size for scalability */
    line-height: 1.5; /* Improved line spacing */
    color: #ffffff; /* White text for dark ocean background */
    background: transparent; /* Transparent background to show ocean render */
    -webkit-font-smoothing: antialiased; /* Smoother font rendering */
    text-rendering: optimizeLegibility; /* Optimize for readability */
}

/* Headings for better visibility */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Serif Pro', Georgia, serif;
    letter-spacing: 0.5px; /* Professional spacing */
    text-shadow: none; /* Remove glow effects */
    margin-bottom: 0.75rem;
}

/* Enhanced KYC Passport Modal Styles */
.modal.kyc-enhanced {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal.kyc-enhanced .modal-content {
    animation: kycModalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

@keyframes kycModalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Enhanced Security Badges */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.security-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.security-high {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.security-medium {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.security-low {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Enhanced Progress Bars */
.verification-progress {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
    margin: 16px 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: #e9ecef;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997, #17a2b8);
    height: 100%;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 4px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Verification Stages Grid */
.verification-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.stage-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.stage-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.stage-verified {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-color: #c3e6cb;
}

.stage-pending {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-color: #ffeaa7;
}

.stage-failed {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #f5c6cb;
}

/* Enhanced Button Styles for KYC */
.btn.kyc-enhanced {
    background: linear-gradient(135deg, #2c5282, #2a4365);
    color: #ffffff;
    padding: 12px 24px;
    border: 1px solid #2c5282;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn.kyc-enhanced::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 ease;
}

.btn.kyc-enhanced:hover {
    background: linear-gradient(135deg, #2a4365, #1a365d);
    border-color: #2a4365;
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
    transform: translateY(-2px);
}

.btn.kyc-enhanced:hover::before {
    left: 100%;
}

.btn.kyc-enhanced:active {
    transform: translateY(-1px);
}

/* Security Audit Log Styles */
#security-log {
    max-height: 120px;
    overflow-y: auto;
    font-size: 0.75rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.4;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

#security-log::-webkit-scrollbar {
    width: 4px;
}

#security-log::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

#security-log::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

#security-log::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

h1 {
    font-size: 2rem; /* Larger for prominence */
    font-weight: 600;
    color: #2c5282; /* Professional government blue */
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c5282;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c5282;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c5282;
}

h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c5282;
}

/* Blob Controls Specific Styles */
#blob-controls {
    font-size: 0.9rem;
}

#blob-controls h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    border-bottom: 2px solid #00aaff;
    padding-bottom: 5px;
}

#blob-controls #selectionStatus {
    background: rgba(255, 255, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 0, 0.3);
    border-radius: 5px;
    padding: 8px;
    margin: 8px 0;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

#blob-controls #selectionStatus:hover {
    background: rgba(255, 255, 0, 0.25) !important;
    border-color: rgba(255, 255, 0, 0.5);
}

#blob-controls #selectedBlobName {
    font-weight: bold;
    color: #ffff00;
    text-shadow: 0 0 3px rgba(255, 255, 0, 0.5);
}

#blob-controls #selectedBlobInfo {
    font-size: 0.8rem !important;
    color: #cccccc !important;
    line-height: 1.3;
}

#blob-controls label {
    display: block;
    margin: 5px 0 2px 0;
    font-size: 0.85rem;
    color: #ffffff;
}

#blob-controls input[type="range"] {
    width: 100%;
    margin: 2px 0 5px 0;
}

#blob-controls input[type="color"] {
    width: 50px;
    height: 25px;
    border: 1px solid #444;
    border-radius: 3px;
    cursor: pointer;
}

#blob-controls button {
    background: rgba(0, 170, 255, 0.8);
    border: 1px solid #00aaff;
    color: white;
    padding: 5px 10px;
    margin: 2px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

#blob-controls button:hover {
    background: rgba(0, 170, 255, 1);
    box-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
}

#blob-controls button:active {
    transform: scale(0.98);
}

/* Selection feedback for canvas interactions */
canvas {
    cursor: crosshair;
}

canvas:active {
    cursor: grab;
}

h6 {
    font-size: 1rem;
    font-weight: 700;
    color: #00aaff;
}

.spinner, #loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85); /* Slightly darker for contrast */
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    z-index: 9999; /* Very high z-index to ensure it shows above everything */
    pointer-events: none;
    font-size: 1.1rem; /* Larger text for readability */
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.spinner.hidden, #loading-spinner.hidden {
    display: none !important;
    visibility: hidden;
}

.toast {
    display: none !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2c5282;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
}

.back-button, .navigate-button, .plot-status button {
    background: #2c5282;
    color: #ffffff;
    padding: 12px 24px;
    border: 1px solid #2c5282;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1200;
    pointer-events: auto;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Main Action Buttons - Perfect Consistent Styling */
#sample-plot, #kyc-passport {
    background: linear-gradient(135deg, #1a365d, #2c5282) !important;
    color: #ffffff !important;
    padding: 14px 20px;
    border: 2px solid #1a365d;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1200;
    width: 100%;
}

/* Add shimmer effect to main action buttons */
#sample-plot::before, #kyc-passport::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 ease;
}

#sample-plot:hover, #kyc-passport:hover {
    background: linear-gradient(135deg, #0f172a, #1e40af) !important;
    border-color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.4);
}

#sample-plot:hover::before, #kyc-passport:hover::before {
    left: 100%;
}

#sample-plot:active, #kyc-passport:active {
    transform: translateY(-1px);
}

.back-button:hover, .navigate-button:hover, .plot-status button:hover {
    background: #2a4365;
    border-color: #2a4365;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 1100;
    line-height: 1.4;
}

.tooltip.hidden {
    display: none;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 20, 40, 0.92);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 16px;
    z-index: 1000;
    pointer-events: auto;
    white-space: normal;
    text-align: center;
    font-size: 0.85rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    letter-spacing: 0.5px;
}

#header * {
    color: #ffffff;
}

#header h1 {
    color: #ffffff !important;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Header Toggle Buttons for Minimized Sidebars */
.header-toggle-btn {
    display: none; /* Hidden by default, shown via JS when sidebars minimized */
    background: linear-gradient(135deg, #2c5282, #1e3a8a);
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin: 0 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 60px;
    z-index: 1000;
}

#header-blob-toggle {
    left: 20px;
}

#header-plot-toggle {
    left: 140px; /* Position next to blob button */
}

.header-toggle-btn:hover {
    background: linear-gradient(135deg, #1e3a8a, #2c5282);
    transform: translateY(-50%) translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.header-toggle-btn:active {
    transform: translateY(-50%) translateY(0);
}

/* User ID and ESG Credits Styling */
#user-id-display, #esg-credits-display {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 4px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0.5px;
}

#user-id-display {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #dcfce7 !important;
}

/* Clickable User ID Styling - Home Link */
.clickable-user-id {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.clickable-user-id .home-icon {
    font-size: 1em;
    transition: transform 0.3s ease;
}

.clickable-user-id:hover {
    background: rgba(59, 130, 246, 0.35) !important;
    border: 1px solid rgba(59, 130, 246, 0.7) !important;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.clickable-user-id:hover .home-icon {
    transform: scale(1.15);
}

.home-link-section {
    position: relative;
}

.home-link-section::after {
    content: '← Home';
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65em;
    color: rgba(147, 197, 253, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.home-link-section:hover::after {
    opacity: 1;
}

#esg-credits-display {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fef3c7 !important;
}

#user-id-display:empty::before {
    content: "Loading...";
    opacity: 0.7;
}

#esg-credits-display:empty::before {
    content: "...";
    opacity: 0.7;
}

/* Central Control Panel - Passport Style */
#central-control-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, 90vw);
    max-height: calc(100vh - 60px);
    background: linear-gradient(160deg, rgba(15,22,40,0.92) 0%, rgba(22,32,53,0.90) 40%, rgba(26,39,68,0.88) 100%);
    border: 1px solid rgba(100, 140, 220, 0.22);
    border-radius: 24px;
    padding: 0;
    padding-bottom: 44px; /* Space for footer */
    z-index: 1500;
    pointer-events: auto;
    box-shadow: 
        0 25px 80px rgba(0,0,0,0.6),
        0 0 0 1px rgba(100, 140, 220, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.06);
    backdrop-filter: blur(24px);
    color: #e2e8f0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(100,140,220,0.2) transparent;
}

/* Subtle ambient glow background */
#central-control-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Custom scrollbar for panel */
#central-control-panel::-webkit-scrollbar {
    width: 4px;
}
#central-control-panel::-webkit-scrollbar-track {
    background: transparent;
}
#central-control-panel::-webkit-scrollbar-thumb {
    background: rgba(100,140,220,0.2);
    border-radius: 4px;
}
#central-control-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(100,140,220,0.35);
}

/* Logo / Brand Section */
#central-control-panel h2 {
    margin: 0;
    background: linear-gradient(160deg, rgba(15,22,40,0.6) 0%, rgba(22,32,53,0.4) 100%);
    color: #ffffff !important;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0;
    font-weight: 700;
    padding: 16px 0 12px 0;
    border-bottom: 1px solid rgba(100, 140, 220, 0.12);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 100px;
}

/* Marine Citizen Logo */
#central-control-panel h2::before {
    content: '';
    width: 90px;
    height: 90px;
    background-image: url('/source/passport/marine-citizen-logo-white.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.25));
    margin: 0 auto;
}

/* Fallback for logo */
@supports not (background-image: url('/source/passport/marine-citizen-logo-white.svg')) {
    #central-control-panel h2::before {
        background-image: url('/source/passport/marine-citizen-logo-white-512.png');
    }
}

#central-control-panel p,
#central-control-panel span:not(button span),
#central-control-panel div:not(.button-grid):not(.control-panel-button) {
    color: #cbd5e1 !important;
    position: relative;
    z-index: 1;
}

/* Ensure buttons have white text */
#central-control-panel button,
#central-control-panel .control-panel-button,
#central-control-panel #sample-plot,
#central-control-panel #kyc-passport,
#central-control-panel #wallet-toggle-btn {
    color: #ffffff !important;
}

#central-control-panel h2 {
    color: #ffffff !important;
}

#central-control-panel h3 {
    color: #94a3b8 !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.7rem;
}

/* Control Sections */
.control-section {
    margin: 0;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(100, 140, 220, 0.08);
    background: transparent;
    position: relative;
}

.control-section:last-child {
    border-bottom: none;
}

/* Footer strip */
#central-control-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: linear-gradient(160deg, rgba(15,22,40,0.95) 0%, rgba(22,32,53,0.9) 100%);
    border-top: 1px solid rgba(100, 140, 220, 0.1);
    z-index: 2;
    border-radius: 0 0 20px 20px;
}

/* Footer branding */
.control-section:last-child::after {
    content: '🌊 MARINE CITIZEN • DEPT. OF OCEAN AFFAIRS';
    position: absolute;
    bottom: -44px;
    left: 0;
    right: 0;
    height: 44px;
    background: transparent;
    color: rgba(148, 163, 184, 0.5);
    font-size: 0.55rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 3;
}

.control-section h3 {
    margin: 0 0 14px 0;
    color: #94a3b8 !important;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Inter', sans-serif;
    text-align: left;
    padding-bottom: 0;
    border-bottom: none;
}

/* Button Grid */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

/* Modern Panel Button */
.control-panel-button {
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0 !important;
    padding: 14px 16px;
    border: 1px solid rgba(100, 140, 220, 0.12);
    border-radius: 14px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.25s ease;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.control-panel-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 14px;
}

.control-panel-button:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(100, 140, 220, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.control-panel-button:hover::before {
    opacity: 1;
}

.control-panel-button:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.09);
}

/* Button Icons */
.control-panel-button .button-icon {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 6px;
    filter: none;
}

.control-panel-button .button-text {
    display: block;
    font-size: 0.75rem;
    opacity: 0.85;
    line-height: 1.3;
}

/* Satcom Button */
.satcom-button {
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    grid-column: 1 / -1;
}

.satcom-button:hover {
    background: rgba(59, 130, 246, 0.14) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15) !important;
}

.satcom-button .button-icon {
    font-size: 1.6rem;
}

/* Action Buttons */
.action-button {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04) !important;
    position: relative;
    overflow: hidden;
    min-height: 80px;
}

.action-button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

#dashboard {
    position: relative;
    z-index: 1;
}

/* Wallet Box */
#wallet-box {
    background: rgba(255, 255, 255, 0.03);
    color: #e2e8f0 !important;
    padding: 0;
    border: 1px solid rgba(100, 140, 220, 0.1);
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

/* Remove watermark for dark theme */
#wallet-box::before {
    display: none;
}

#wallet-box p,
#wallet-box span:not(button span),
#wallet-box h3,
#wallet-box h4,
#wallet-box h5 {
    color: #cbd5e1 !important;
    position: relative;
    z-index: 1;
}

#wallet-box button,
#wallet-box #wallet-toggle-btn {
    color: #ffffff !important;
}




/* Enhanced Header Styles */
.header-container {
    background: transparent;
    padding: 0;
    border-radius: none;
    margin: 0 auto;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    max-width: 100%;
    position: relative;
}

/* Single-row compact header layout */
.header-single-row .user-info {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
}

.header-single-row .user-section {
    flex-direction: row;
    gap: 4px;
    min-width: auto;
}

.header-single-row .user-section .label {
    font-size: 0.6rem;
}

.header-single-row .user-section .value {
    font-size: 0.8rem;
}

.header-title {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    color: #00aaff;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.simple-header .header-title {
    margin-bottom: 0;
    font-size: 1.1rem;
    color: #cbd5e1;
    text-shadow: 0 0 12px rgba(100, 140, 220, 0.2);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.simple-header {
    text-align: center;
    padding: 12px 16px;
}

.user-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.user-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 55px;
}

.user-section .label {
    font-size: 0.65rem;
    color: #94a3b8 !important;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.user-section .value {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
}

.esg-amount {
    color: #10b981 !important;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.wallet-esg-amount {
    color: #f59e0b !important;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    font-weight: bold;
}

.available-esg-amount {
    color: #00ff88 !important;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
    animation: pulse-available 3s infinite;
}

.marine-debris-amount {
    color: #ff6b35 !important;
    text-shadow: 0 0 8px rgba(255, 107, 53, 0.6);
    animation: pulse-debris 2s infinite;
    font-weight: bold;
    transform-origin: center center;
}

/* ── Last-10 debris urgency classes ── */
.marine-debris-amount.debris-urgent {
    color: #ff3300 !important;
    font-weight: 900;
    animation: pulse-debris-urgent 0.8s infinite;
    display: inline-block;
}
.marine-debris-amount.debris-critical {
    color: #ff0000 !important;
    font-weight: 900;
    animation: pulse-debris-critical 0.5s infinite;
    display: inline-block;
}

@keyframes pulse-available {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-debris {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 8px rgba(255, 107, 53, 0.6);
    }
    50% { 
        opacity: 0.8; 
        text-shadow: 0 0 12px rgba(255, 107, 53, 0.8);
    }
}

@keyframes pulse-debris-urgent {
    0%, 100% {
        transform: var(--debris-scale, scale(1));
        text-shadow: 0 0 18px rgba(255, 50, 0, 0.9), 0 0 40px rgba(255, 50, 0, 0.5);
    }
    50% {
        transform: var(--debris-scale-peak, scale(1.15));
        text-shadow: 0 0 30px rgba(255, 50, 0, 1), 0 0 60px rgba(255, 50, 0, 0.7);
    }
}

@keyframes pulse-debris-critical {
    0%, 100% {
        transform: var(--debris-scale, scale(1));
        text-shadow: 0 0 25px rgba(255, 0, 0, 1), 0 0 50px rgba(255, 0, 0, 0.6), 0 0 80px rgba(255, 0, 0, 0.3);
        color: #ff0000;
    }
    50% {
        transform: var(--debris-scale-peak, scale(1.25));
        text-shadow: 0 0 40px rgba(255, 0, 0, 1), 0 0 70px rgba(255, 0, 0, 0.8), 0 0 100px rgba(255, 0, 0, 0.4);
        color: #ff4400;
    }
}

.mc-amount {
    color: #f59e0b !important;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.mining-status {
    border-left: 2px solid #00aaff;
    padding-left: 10px;
    margin-left: 10px;
}

/* ── Reset Timer in header ── */
.reset-timer-section {
    border-left: 2px solid #f59e0b;
    padding-left: 10px;
    margin-left: 10px;
}

.reset-timer {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    color: #f59e0b;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.status-mining {
    color: #ff9900 !important;
    animation: pulse-mining 2s infinite;
}

.status-ready {
    color: #10b981 !important;
}

@keyframes pulse-mining {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@media (max-width: 768px) {
    .user-info {
        justify-content: center;
        gap: 10px;
    }
    
    .user-section {
        min-width: 60px;
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    /* Mobile-responsive central control panel */
    #central-control-panel {
        position: fixed;
        left: 50%;
        top: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: calc(100vw - 16px);
        height: auto;
        max-height: calc(100vh - 16px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        border-radius: 16px;
        z-index: 2000;
    }
    
    /* Compact logo for mobile */
    #central-control-panel h2 {
        min-height: 120px;
        padding: 16px 0 12px 0;
    }
    
    #central-control-panel h2::before {
        width: 100px;
        height: 100px;
    }
    
    /* Touch-friendly sections */
    .control-section {
        padding: 14px 16px;
    }
    
    /* Touch-friendly buttons */
    .control-panel-button {
        min-height: 56px;
        font-size: 0.85rem;
        padding: 14px 16px;
    }
    
    .button-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .control-section:last-child {
        padding-bottom: 60px;
    }
    
    #central-control-panel::after {
        display: none;
    }
    
    .control-section:last-child::after {
        display: none;
    }
}

/* Wallet Container */
.wallet-container {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    max-width: none;
    max-height: none;
    overflow: visible;
    position: relative;
    z-index: 1;
    backdrop-filter: none;
    border: none;
    color: #e2e8f0 !important;
    font-family: 'Inter', sans-serif;
}

.wallet-container p,
.wallet-container span:not(button span),
.wallet-container h3,
.wallet-container h4,
.wallet-container h5,
.wallet-container li {
    color: #cbd5e1 !important;
    position: relative;
    z-index: 1;
}

.wallet-container button {
    color: #ffffff !important;
}

.wallet-container h1, .wallet-container h2, .wallet-container h3, .wallet-container h4, .wallet-container h5, .wallet-container h6 {
    color: #94a3b8 !important;
    font-family: 'Inter', sans-serif;
}

/* Wallet Header */
.wallet-container h3 {
    font-size: 0.85rem;
    margin: 0 0 0 0;
    color: #e2e8f0 !important;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    padding: 14px 16px 10px;
    background: transparent;
    border-bottom: 1px solid rgba(100, 140, 220, 0.08);
}

/* Wallet Content */
.wallet-container p {
    font-size: 0.8rem;
    margin: 6px 16px;
    color: #94a3b8 !important;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

/* Balance Display */
.wallet-container p:first-of-type {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border: 1px solid rgba(100, 140, 220, 0.08);
    border-radius: 10px;
    margin: 10px 16px;
    font-weight: 500;
    text-align: center;
    font-family: 'Inter', monospace;
    color: #cbd5e1 !important;
}

/* Wallet action buttons */
.wallet-actions button {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #e2e8f0 !important;
    padding: 10px 14px;
    border: 1px solid rgba(100, 140, 220, 0.12);
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 3px;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.wallet-actions button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(100, 140, 220, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Wallet Toggle Button */
#wallet-toggle-btn {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd !important;
    padding: 10px 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    width: calc(100% - 32px);
    margin: 8px 16px 14px 16px;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

#wallet-toggle-btn::before {
    display: none;
}

#wallet-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

#wallet-toggle-btn:hover::before {
    display: none;
}

/* Wallet Expanded Details */
#wallet-expanded {
    max-height: 350px;
    height: auto;
    overflow-y: scroll;
    overflow-x: hidden;
    margin: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0;
    border-top: 1px solid rgba(100, 140, 220, 0.08);
    scrollbar-width: thin;
    scrollbar-color: rgba(100,140,220,0.15) transparent;
    display: block;
}

/* Custom scrollbar for webkit browsers */
#wallet-expanded::-webkit-scrollbar {
    width: 4px;
}

#wallet-expanded::-webkit-scrollbar-track {
    background: transparent;
}

#wallet-expanded::-webkit-scrollbar-thumb {
    background: rgba(100,140,220,0.15);
    border-radius: 4px;
}

#wallet-expanded::-webkit-scrollbar-thumb:hover {
    background: rgba(100,140,220,0.3);
}

#wallet-expanded * {
    color: #cbd5e1 !important;
    position: relative;
    z-index: 1;
}

#wallet-expanded h1, #wallet-expanded h2, #wallet-expanded h3, #wallet-expanded h4, #wallet-expanded h5, #wallet-expanded h6 {
    color: #e2e8f0 !important;
    font-family: 'Inter', sans-serif;
}

/* Official Document Subheadings */
#wallet-expanded h4 {
    font-size: 1rem;
    margin: 0 0 16px 0;
    color: #e2e8f0 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(100, 140, 220, 0.15);
}

/* ═══ Wallet Card — Compartmentalized Sections ═══ */
.wallet-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(100, 140, 220, 0.15);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0 0 12px 0;
    position: relative;
    transition: border-color 0.2s ease;
}

.wallet-card:hover {
    border-color: rgba(100, 140, 220, 0.28);
}

/* Card section titles */
.wallet-card__title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 12px 0 !important;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(100, 140, 220, 0.1);
    color: #94a3b8 !important;
}

/* ── Receive Funds Card (GREEN) ── */
.wallet-card--receive {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08), inset 0 1px 0 rgba(52, 211, 153, 0.06);
}

.wallet-card--receive:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 6px 28px rgba(16, 185, 129, 0.12), inset 0 1px 0 rgba(52, 211, 153, 0.08);
}

.wallet-card__title--receive {
    color: #34d399 !important;
    border-bottom-color: rgba(16, 185, 129, 0.2) !important;
}

/* ── Balance Overview Card — Console Wallet Style ── */
.wallet-card--balance {
    background: linear-gradient(145deg, rgba(10, 18, 36, 0.95) 0%, rgba(15, 25, 50, 0.9) 50%, rgba(8, 14, 30, 0.95) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 20px rgba(59, 130, 246, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wallet-card--balance::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), rgba(139, 92, 246, 0.4), transparent);
}

.wallet-card--balance::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.wallet-card--balance:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow:
        0 0 30px rgba(59, 130, 246, 0.12),
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wallet-card__title--balance {
    color: #60a5fa !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2) !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem !important;
    letter-spacing: 1.5px;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
}

.balance-title-icon {
    font-size: 1rem;
}

.balance-live-badge {
    margin-left: auto;
    font-size: 0.6rem !important;
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    font-weight: 600;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Balance Details Grid */
.balance-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Balance Row */
.balance-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 12px;
    padding: 14px 16px;
    border-radius: 12px;
    position: relative;
    transition: all 0.25s ease;
}

.balance-item--money {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.balance-item--money:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.06) 100%);
}

.balance-item--credits {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(109, 40, 217, 0.04) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.balance-item--credits:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(109, 40, 217, 0.06) 100%);
}

.balance-label {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    letter-spacing: 0.3px;
}

.balance-sublabel {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.68rem !important;
    color: #64748b !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.balance-value {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    font-family: 'Inter', 'SF Mono', 'Fira Code', monospace !important;
    color: #f1f5f9 !important;
    letter-spacing: -0.5px;
}

.balance-item--money .balance-value {
    color: #34d399 !important;
}

.balance-item--credits .balance-value {
    color: #a78bfa !important;
}

.balance-unit {
    grid-column: 3;
    grid-row: 1 / 3;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Deposit Card ── */
.wallet-card--deposit {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(217, 119, 6, 0.04) 100%);
    border-color: rgba(245, 158, 11, 0.25);
}

.wallet-card--deposit:hover {
    border-color: rgba(245, 158, 11, 0.4);
}

.wallet-card__title--deposit {
    color: #fbbf24 !important;
    border-bottom-color: rgba(245, 158, 11, 0.15) !important;
}

/* ── Withdrawal Partners Card ── */
.wallet-card--withdrawal {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(109, 40, 217, 0.04) 100%);
    border-color: rgba(139, 92, 246, 0.25);
}

.wallet-card--withdrawal:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.wallet-card__title--withdrawal {
    color: #a78bfa !important;
    border-bottom-color: rgba(139, 92, 246, 0.15) !important;
}

/* ── Transactions Card ── */
.wallet-card--transactions {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.06) 0%, rgba(71, 85, 105, 0.04) 100%);
    border-color: rgba(100, 116, 139, 0.25);
}

.wallet-card--transactions:hover {
    border-color: rgba(100, 116, 139, 0.4);
}

.wallet-card__title--transactions {
    color: #94a3b8 !important;
    border-bottom-color: rgba(100, 116, 139, 0.15) !important;
}

/* View Transactions Button */
.view-transactions-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.15) 0%, rgba(71, 85, 105, 0.1) 100%);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-transactions-btn:hover {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.25) 0%, rgba(71, 85, 105, 0.18) 100%);
    border-color: rgba(100, 116, 139, 0.5);
    color: #fff;
}

/* ── Transactions Popup Modal ── */
.tx-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.tx-popup-content {
    background: linear-gradient(145deg, #0d1b2a, #1b2d4a);
    border-radius: 16px;
    max-width: 600px;
    width: 92%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    color: #e0e6ed;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tx-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tx-popup-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #fff;
}

.tx-popup-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tx-download-btn {
    padding: 6px 14px;
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 6px;
    color: #34d399;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tx-download-btn:hover {
    background: rgba(52, 211, 153, 0.25);
    border-color: rgba(52, 211, 153, 0.5);
}

.tx-close-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #94a3b8;
    line-height: 1;
    padding: 0 4px;
}

.tx-close-btn:hover {
    color: #fff;
}

.tx-popup-body {
    overflow-y: auto;
    padding: 0;
    flex: 1;
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tx-table thead {
    position: sticky;
    top: 0;
    background: #0d1b2a;
    z-index: 1;
}

.tx-table th {
    padding: 10px 12px;
    text-align: left;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tx-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
}

.tx-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tx-cell-amount.tx-positive {
    color: #34d399;
}

.tx-cell-amount.tx-negative {
    color: #f87171;
}

.tx-popup-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: #64748b;
}

/* Remove margin from elements now inside cards */
.wallet-card .balance-details {
    margin: 0;
}

.wallet-card .deposit-section {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.wallet-card .withdrawal-selection {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.wallet-card #transactions-list {
    margin: 0;
}

/* Deposit Section Styles */
.deposit-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 140, 220, 0.12);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0 15px 0;
    text-align: center;
}

.deposit-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    min-width: 120px;
}

.deposit-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

/* ── Receive Funds Section ────────────────────────────── */
.receive-section {
    margin: 0 0 12px 0;
}

.receive-toggle-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: #ffffff !important;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}

.receive-toggle-btn:hover {
    background: linear-gradient(135deg, #047857, #059669) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.rf-card {
    margin-top: 10px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.rf-label {
    font-size: 0.6rem !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b !important;
    margin-bottom: 4px;
    font-weight: 600;
}

.rf-address {
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(100, 140, 220, 0.1);
}

.rf-number {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem !important;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #34d399 !important;
    user-select: all;
    padding: 8px 0 2px;
}

.rf-link-row {
    margin-bottom: 12px;
}

.rf-link {
    font-family: monospace;
    font-size: 0.68rem !important;
    color: #93c5fd !important;
    word-break: break-all;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.rf-ref-row {
    margin-bottom: 12px;
}

.rf-ref-input {
    width: 100%;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(100, 140, 220, 0.18) !important;
    border-radius: 8px;
    color: #e2e8f0 !important;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.rf-ref-input::placeholder {
    color: #475569;
}

.rf-ref-input:focus {
    border-color: rgba(59, 130, 246, 0.4) !important;
}

.rf-actions {
    display: flex;
    gap: 8px;
}

.rf-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.rf-btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.rf-btn-primary:hover {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.rf-btn-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
}

.rf-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

/* Purchase Marine Dollar Modal Styles */
.tier-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.tier-modal-content {
    background: #ffffff;
    color: #1a202c;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Force all text inside the modal to be dark */
.tier-modal-content,
.tier-modal-content *:not(.modal-close) {
    color: #1a202c;
}

.tier-modal h3 {
    color: #1a365d;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.tier-modal-content .purchase-subtitle {
    text-align: center;
    color: #64748b !important;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.tier-modal-content .purchase-subtitle strong {
    color: #1a365d !important;
}

.tier-modal-content label {
    font-weight: 600;
    color: #1a202c !important;
    display: block;
    margin-bottom: 4px;
}

.tier-modal-content input[type="number"] {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.1rem;
    outline: none;
    transition: border 0.2s;
    width: 100%;
    box-sizing: border-box;
    background: #f8fafc;
    color: #1a202c !important;
}

.tier-modal-content input[type="number"]:focus {
    border-color: #10b981;
}

.tier-modal-content input[type="number"]::placeholder {
    color: #94a3b8;
}

.purchase-md-preview {
    text-align: center;
    color: #10b981 !important;
    font-weight: 700;
    font-size: 1.2rem;
    min-height: 1.6em;
    padding: 8px 0;
}

.purchase-quick-amounts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 8px 0;
}

.quick-amt-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc !important;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a202c !important;
    transition: all 0.2s;
}

.quick-amt-btn:hover {
    border-color: #10b981;
    background: #ecfdf5 !important;
    color: #065f46 !important;
}

.purchase-confirm-btn {
    padding: 14px;
    background: #10b981 !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 100%;
}

.purchase-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.purchase-confirm-btn:not(:disabled):hover {
    background: #059669 !important;
}

.purchase-footer-note {
    text-align: center;
    color: #94a3b8 !important;
    font-size: 0.8rem;
    margin-top: 4px;
}

.tier-options {
    display: grid;
    gap: 12px;
}

.tier-option {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tier-option:hover {
    border-color: #10b981;
    background: #ecfdf5;
    transform: translateY(-2px);
}

.tier-info {
    display: flex;
    flex-direction: column;
}

.tier-name {
    font-weight: 600;
    color: #1a202c;
    font-size: 1rem;
}

.tier-description {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 4px;
}

.tier-price {
    font-weight: 700;
    color: #10b981;
    font-size: 1.1rem;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

.modal-close:hover {
    color: #1f2937;
}

.currency-selection p {
    font-weight: 600;
    margin: 0 0 10px 0 !important;
    text-align: center;
    color: #e2e8f0 !important;
}

.currency-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* Withdrawal Selection Styles */
.withdrawal-selection {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 140, 220, 0.12);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0 15px 0;
}

.withdrawal-selection p {
    font-weight: 600;
    margin: 0 0 10px 0 !important;
    text-align: center;
    color: #e2e8f0 !important;
}

.withdrawal-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.withdrawal-partner-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(100, 140, 220, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

.withdrawal-partner-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.withdrawal-partner-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.withdrawal-partner-btn.selected {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.crypto-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.withdrawal-partner-btn:hover .crypto-image {
    transform: rotate(5deg) scale(1.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.withdrawal-partner-btn:active .crypto-image {
    transform: rotate(2deg) scale(1.08);
}

/* Specific glow effects for each crypto on hover */
.withdrawal-partner-btn[data-partner="zec"]:hover .crypto-image {
    box-shadow: 0 8px 25px rgba(244, 185, 66, 0.6);
}

.withdrawal-partner-btn[data-partner="bitcoin"]:hover .crypto-image {
    box-shadow: 0 8px 25px rgba(247, 147, 26, 0.6);
}

.withdrawal-partner-btn[data-partner="wlfi"]:hover .crypto-image {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
}

.currency-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(100, 140, 220, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.currency-option:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.currency-option.selected {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.15);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.currency-option img {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
}

.crypto-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    color: white;
}

.zec-logo {
    background: linear-gradient(135deg, #f4b942, #f39800);
}

.bitcoin-logo {
    background: linear-gradient(135deg, #f7931a, #ff9500);
}

.wlfi-logo {
    background: linear-gradient(135deg, #4a90e2, #357abd);
}

.currency-option span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0 !important;
}

.balance-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 140, 220, 0.12);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 12px 12px 12px;
}

.balance-section p {
    margin: 5px 0 !important;
    font-weight: 600;
    text-align: center;
    font-family: 'Inter', monospace;
    color: #e2e8f0 !important;
}

.balance-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0;
}

.balance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid rgba(100, 140, 220, 0.1);
    text-align: center;
    gap: 4px;
}

.balance-item--money {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.1) 0%, rgba(16, 185, 129, 0.06) 100%);
    border-color: rgba(52, 211, 153, 0.3);
}

.balance-item--credits {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(59, 130, 246, 0.06) 100%);
    border-color: rgba(96, 165, 250, 0.3);
}

.balance-label {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #e2e8f0 !important;
}

.balance-sublabel {
    font-size: 0.62rem !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.balance-item--money .balance-sublabel {
    color: #6ee7b7 !important;
}

.balance-item--credits .balance-sublabel {
    color: #93c5fd !important;
}

.balance-value {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    font-family: 'Inter', monospace;
    line-height: 1.2;
}

.balance-unit {
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    letter-spacing: 1px;
    opacity: 0.6;
}

.balance-details p {
    margin: 10px 0 !important;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(100, 140, 220, 0.08);
}

/* Marine Dollar value highlight */
#mc-balance-detail {
    color: #34d399 !important;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Inter', monospace;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
}

/* ESG Credits value highlight */
#esg-balance-detail {
    color: #60a5fa !important;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Inter', monospace;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.3);
}

#wallet-expanded h5 {
    font-size: 0.9rem;
    margin: 16px 0 8px 0;
    color: #93c5fd !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Official Document Lists */
#exchanges-list, #transactions-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

#exchanges-list li, #transactions-list li {
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
    border: 1px solid rgba(100, 140, 220, 0.12);
    border-radius: 4px;
    margin: 6px 0;
    font-size: 0.8rem;
    color: #cbd5e1 !important;
    font-family: 'Inter', sans-serif;
    position: relative;
}

#exchanges-list li::before, #transactions-list li::before {
    content: '📋';
    position: absolute;
    left: 8px;
    opacity: 0.6;
}

#exchanges-list li, #transactions-list li {
    padding-left: 32px;
}

/* Official Wallet Actions Grid */
.wallet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(100, 140, 220, 0.15);
}

/* Government Action Buttons */
.wallet-actions button {
    background: linear-gradient(135deg, #1a365d, #2c5282);
    color: #ffffff !important;
    padding: 10px 12px;
    border: 2px solid #1a365d;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.3);
}

.wallet-actions button:nth-child(1) { /* Send Funds — RED */
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border-color: #b91c1c;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.wallet-actions button:nth-child(1):hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    border-color: #991b1b;
}

.wallet-actions button:nth-child(2) { /* Full History — BLACK & WHITE */
    background: linear-gradient(135deg, #1e1e1e, #333333);
    border-color: #444444;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    color: #ffffff !important;
}

.wallet-actions button:nth-child(2):hover {
    background: linear-gradient(135deg, #333333, #4a4a4a);
    border-color: #555555;
}

.wallet-actions button:nth-child(3) { /* Close */
    background: linear-gradient(135deg, #64748b, #475569);
    border-color: #475569;
    box-shadow: 0 2px 8px rgba(71, 85, 105, 0.3);
    grid-column: 1 / -1;
}

.wallet-actions button:nth-child(3):hover {
    background: linear-gradient(135deg, #475569, #64748b);
    border-color: #334155;
}

/* Official Login Prompt */
#wallet-login-prompt {
    background: rgba(220, 38, 38, 0.08);
    padding: 20px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    text-align: center;
    margin: 16px 12px 12px 12px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

#wallet-login-prompt * {
    color: #e2e8f0 !important;
}

#wallet-login-prompt p {
    font-size: 0.85rem;
    margin: 0 0 12px;
    color: #fca5a5 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Official Login Button */
#wallet-login-prompt button {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff !important;
    padding: 12px 20px;
    border: 2px solid #b91c1c;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

#wallet-login-prompt button:hover {
    background: linear-gradient(135d, #b91c1c, #dc2626);
    border-color: #991b1b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(185, 28, 28, 0.4);
}

/* Plot Status Bottom Panel - Right Side */
#plot-status {
    position: fixed !important;
    top: auto !important;
    bottom: 40px !important;
    right: 20px !important;
    left: auto !important;
    width: 40%;
    max-width: 400px;
    height: auto;
    max-height: 50vh;
    background: transparent;
    color: #ffffff !important;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    z-index: 10000;
    pointer-events: auto;
    font-family: 'Inter', sans-serif;
    box-shadow: none;
    border-top: none;
    border-radius: none;
    backdrop-filter: none;
}

/* Plot Status Bottom Panel - Left Side */
#plot-status.left {
    right: auto !important;
    left: 20px !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#plot-status * {
    color: #ffffff !important;
}

#plot-status h1, #plot-status h2, #plot-status h3, #plot-status h4, #plot-status h5, #plot-status h6 {
    color: #63b3ed !important;
}

#plot-status.minimized {
    position: fixed !important;
    bottom: 40px !important;
    right: 20px !important;
    top: auto !important; /* Override any inherited top positioning */
    width: 200px !important;
    height: 60px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: none !important;
    overflow: visible !important;
}

#plot-status.minimized .plot-content {
    display: none !important;
}

#plot-status.minimized .toggle-btn {
    display: block !important;
}

#plot-status .toggle-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: transparent;
    border: 1px solid #2c5282;
    color: #2c5282;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10001;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: none;
}

#plot-status .toggle-btn:hover {
    background: rgba(44, 82, 130, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Toggle button positioning for left side bottom panel */
#plot-status.left .toggle-btn {
    left: 15px;
    right: auto;
}

#plot-status .side-switch-btn {
    position: absolute;
    top: 50px;
    left: 10px;
    background: rgba(44, 82, 130, 0.8);
    border: 1px solid #2c5282;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    display: none;
    transition: all 0.2s ease;
}

#plot-status .side-switch-btn:hover {
    background: rgba(42, 67, 101, 0.9);
    transform: translateY(-1px);
}

/* Side switch button positioning for left side */
#plot-status.left .side-switch-btn {
    left: auto;
    right: 10px;
}

/* Plot Status Minimized Left Side */
#plot-status.minimized.left {
    position: fixed !important;
    bottom: 0 !important;
    left: 20px !important;
    right: auto !important;
    top: auto !important;
}

#plot-status.minimized .side-switch-btn {
    display: block;
}

#plot-status .plot-content {
    padding: 20px;
    display: block;
    max-height: 45vh;
    overflow-y: auto;
}

/* Ensure content padding works for left side too */
#plot-status.left .plot-content {
    padding: 20px;
}

#plot-status .section-header {
    background: rgba(44, 82, 130, 0.1);
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(44, 82, 130, 0.2);
    transition: background 0.2s;
    font-size: 1rem;
    font-weight: 600;
    color: #2c5282;
    text-shadow: none;
}

#plot-status .section-header:hover {
    background: rgba(44, 82, 130, 0.15);
}

#plot-status .section-content {
    padding: 16px;
    display: none;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}

#plot-status .section-content.visible {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

#plot-status button {
    margin: 6px;
    width: auto;
    min-width: 120px;
    padding: 8px 12px;
    background: #2c5282;
    border: 1px solid #2c5282;
    color: #ffffff !important;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}

#plot-status button:hover {
    background: #2a4365;
    border-color: #2a4365;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

#plot-status button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(44, 82, 130, 0.2);
}

/* Input fields in plot-status */
#plot-status input, #plot-status select, #plot-status textarea {
    width: auto;
    min-width: 100px;
    max-width: 200px;
    padding: 8px;
    margin: 0 10px 8px 0;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #2d3748;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

#plot-status label {
    margin: 0 5px 0 0;
    white-space: nowrap;
    font-size: 0.9rem;
    color: #2d3748 !important;
}

#plot-status input:focus, #plot-status select:focus, #plot-status textarea:focus {
    outline: none;
    border-color: #2c5282;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

/* Table styling in plot-status */
#plot-status table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#plot-status th, #plot-status td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

#plot-status th {
    background: #f8fafc;
    font-weight: 600;
    color: #2c5282;
    font-size: 0.9rem;
}

#plot-status td {
    font-size: 0.9rem;
    color: #2d3748;
}

#plot-status tr:hover {
    background: #f8fafc;
}

/* Status indicators */
#plot-status .status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

#plot-status .status-online {
    background: #dcfce7;
    color: #166534;
}

#plot-status .status-offline {
    background: #fee2e2;
    color: #991b1b;
}

#plot-status .status-mining {
    background: #fef3c7;
    color: #92400e;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.status-approved {
    background: #28a745;
}

.status-pending {
    background: #ffc107;
}

.status-low {
    background: #dc3545;
}

/* Custom scrollbar for plot-status */
#plot-status::-webkit-scrollbar {
    width: 8px;
}

#plot-status::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 4px;
}

#plot-status::-webkit-scrollbar-thumb {
    background: rgba(44, 82, 130, 0.6);
    border-radius: 4px;
    transition: background 0.2s ease;
}

#plot-status::-webkit-scrollbar-thumb:hover {
    background: rgba(44, 82, 130, 0.8);
}

/* =================================================================== */
/* BLOB CONTROLS SIDEBAR (LEFT SIDE) */
/* =================================================================== */

#blob-controls-sidebar {
    position: fixed;
    left: 0;
    top: 40px;
    width: 300px;
    height: calc(100vh - 40px);
    background: transparent;
    color: #e2e8f0 !important;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    z-index: 9999;
    pointer-events: auto;
    font-family: 'Inter', sans-serif;
    box-shadow: none;
    border-right: none;
    backdrop-filter: none;
}

#blob-controls-sidebar * {
    color: #e2e8f0 !important;
}

#blob-controls-sidebar h1, #blob-controls-sidebar h2, #blob-controls-sidebar h3, #blob-controls-sidebar h4, #blob-controls-sidebar h5, #blob-controls-sidebar h6 {
    color: #63b3ed !important;
}

#blob-controls-sidebar.minimized {
    width: 60px !important;
    height: 60px !important;
    border: none !important;
    border-right: none !important;
    border-left: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    background: transparent !important;
}

#blob-controls-sidebar.minimized .blob-content {
    display: none !important;
}

#blob-controls-sidebar.minimized .toggle-btn {
    display: block !important;
    position: fixed !important;
    top: 10px !important;
    left: 10px !important;
    margin: 0 !important;
}

#blob-controls-sidebar .toggle-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(56, 178, 172, 0.9);
    border: 1px solid #38b2ac;
    color: #ffffff;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s ease;
}

#blob-controls-sidebar .toggle-btn:hover {
    background: rgba(56, 178, 172, 1);
    transform: translateY(-1px);
}

#blob-controls-sidebar .blob-content {
    padding: 60px 15px 20px 15px;
}

#blob-controls-sidebar .blob-content h3 {
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
    color: #63b3ed !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Blob Roster Styles */
.blob-list-container {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 5px;
    margin-top: 10px;
}

.blob-list-empty {
    padding: 20px;
    text-align: center;
    color: #718096 !important;
    font-style: italic;
}

.blob-list-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.blob-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.blob-list-item.selected {
    background: rgba(66, 153, 225, 0.2);
    border-color: #4299e1;
}

.blob-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.blob-info {
    flex: 1;
}

.blob-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.blob-name {
    font-weight: 600;
    font-size: 13px;
    color: #e2e8f0 !important;
}

.blob-level-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #2d3748;
    color: #fbbf24 !important;
    font-weight: bold;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.blob-xp-container {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.blob-xp-bar {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #63b3ed);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.blob-stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #a0aec0 !important;
    margin-top: 2px;
}

/* Blob Controls Collapsible Sections */
#blob-controls-sidebar .collapsible {
    margin-bottom: 15px;
    background: rgba(45, 55, 72, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#blob-controls-sidebar .collapsible-header {
    background: rgba(56, 178, 172, 0.2);
    color: #63b3ed !important;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 15px;
    margin: 0;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#blob-controls-sidebar .collapsible-header:hover {
    background: rgba(56, 178, 172, 0.3);
    transform: translateY(-1px);
}

#blob-controls-sidebar .collapsible-content {
    padding: 15px;
    display: none;
    background: rgba(26, 32, 44, 0.5);
    border-radius: 0 0 8px 8px;
}

#blob-controls-sidebar .collapsible-content.visible {
    display: block;
}

/* Grok Satcom Button - Prominent Styling */
#blob-controls-sidebar .grok-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#blob-controls-sidebar .grok-satcom-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0077ff 0%, #00c6ff 100%);
    border: 2px solid rgba(0, 198, 255, 0.5);
    color: #ffffff !important;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 119, 255, 0.4);
    text-transform: uppercase;
}

#blob-controls-sidebar .grok-satcom-btn:hover {
    background: linear-gradient(135deg, #00c6ff 0%, #0077ff 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 198, 255, 0.5);
}

#blob-controls-sidebar .grok-satcom-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 119, 255, 0.3);
}

/* Blob Action Buttons */
#blob-controls-sidebar button {
    width: 100%;
    padding: 10px 15px;
    margin: 5px 0;
    background: rgba(56, 178, 172, 0.8);
    border: 1px solid #38b2ac;
    color: #ffffff !important;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#blob-controls-sidebar button:hover {
    background: rgba(56, 178, 172, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 178, 172, 0.3);
}

#blob-controls-sidebar button:active {
    transform: translateY(0);
}

/* Mining Buttons Specific Styling */
#blob-controls-sidebar .mining-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid #10b981;
    color: #ffffff !important;
}

#blob-controls-sidebar .mining-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: #ffffff !important;
}

/* Blob Status Display */
#blob-controls-sidebar .blob-status-display {
    background: rgba(26, 32, 44, 0.8);
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Statistics Display */
#blob-controls-sidebar .collapsible-content p {
    margin: 8px 0;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#blob-controls-sidebar .collapsible-content span {
    font-weight: 600;
    color: #63b3ed !important;
}

/* Blob Controls Scrollbar */
#blob-controls-sidebar::-webkit-scrollbar {
    width: 6px;
}

#blob-controls-sidebar::-webkit-scrollbar-track {
    background: rgba(26, 32, 44, 0.3);
    border-radius: 4px;
}

#blob-controls-sidebar::-webkit-scrollbar-thumb {
    background: rgba(56, 178, 172, 0.6);
    border-radius: 4px;
    transition: background 0.2s ease;
}

#blob-controls-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 178, 172, 0.8);
}

/* =================================================================== */
/* IMPROVED BLOB MENU - Mobile & Desktop Optimized                     */
/* =================================================================== */

/* Blob Header — Redesigned */
#blob-controls-sidebar .blob-header {
    padding: 0 0 10px 0;
    border-bottom: 1px solid rgba(99, 179, 237, 0.15);
    margin-bottom: 12px;
}

#blob-controls-sidebar .blob-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

#blob-controls-sidebar .blob-header-title .blob-title-icon {
    font-size: 22px;
    line-height: 1;
}

#blob-controls-sidebar .blob-header-title h3 {
    flex: 1;
    text-align: left;
    font-weight: 700;
    font-size: 16px;
    margin: 0;
    color: #63b3ed !important;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

#blob-controls-sidebar .blob-close-btn {
    background: none !important;
    border: none !important;
    color: #718096 !important;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px !important;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}

#blob-controls-sidebar .blob-close-btn:hover {
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: none !important;
    box-shadow: none !important;
}

#blob-controls-sidebar .blob-stats-bar {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

#blob-controls-sidebar .stat-chip {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#blob-controls-sidebar .stat-chip .stat-icon {
    font-size: 14px;
    line-height: 1;
}

#blob-controls-sidebar .stat-chip .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0 !important;
    line-height: 1;
}

#blob-controls-sidebar .stat-chip .stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096 !important;
    font-weight: 500;
}

/* Quick Actions Bar */
#blob-controls-sidebar .blob-quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

#blob-controls-sidebar .blob-action-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#blob-controls-sidebar .blob-action-btn.mission {
    flex: 1;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 204, 106, 0.08));
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88 !important;
}

#blob-controls-sidebar .blob-action-btn.mission:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.25), rgba(0, 204, 106, 0.15));
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 255, 136, 0.15);
}

#blob-controls-sidebar .blob-action-btn.refresh {
    background: rgba(74, 85, 104, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0 !important;
    padding: 8px 12px;
}

#blob-controls-sidebar .blob-action-btn.refresh:hover {
    background: rgba(74, 85, 104, 0.7);
    transform: translateY(-1px);
}

#blob-controls-sidebar .blob-action-btn.buy {
    width: 100%;
    background: linear-gradient(135deg, #38b2ac, #2c7a7b);
    color: #fff !important;
    margin-top: 8px;
    padding: 10px 16px;
    font-size: 13px;
}

#blob-controls-sidebar .blob-action-btn.buy:hover {
    background: linear-gradient(135deg, #4fd1c5, #38b2ac);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 178, 172, 0.4);
}

/* Blob Sections */
#blob-controls-sidebar .blob-section {
    margin-bottom: 12px;
    background: rgba(45, 55, 72, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

#blob-controls-sidebar .blob-section-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    margin: 0;
    background: rgba(56, 178, 172, 0.12);
    color: #63b3ed !important;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 8px;
}

#blob-controls-sidebar .blob-section-header .section-title {
    flex: 1;
}

#blob-controls-sidebar .blob-section-header .section-chevron {
    font-size: 12px;
    color: #718096 !important;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

#blob-controls-sidebar .blob-section-content.visible ~ .blob-section-header .section-chevron,
#blob-controls-sidebar .blob-section-header.expanded .section-chevron {
    transform: rotate(180deg);
}

#blob-controls-sidebar .blob-section-header:hover {
    background: rgba(56, 178, 172, 0.25);
}

#blob-controls-sidebar .blob-fleet-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fbbf24, #d69e2e);
    color: #1a202c !important;
    font-weight: 700;
}

#blob-controls-sidebar .blob-section-content {
    padding: 12px;
    display: none;
    background: rgba(26, 32, 44, 0.4);
}

#blob-controls-sidebar .blob-section-content.visible {
    display: block;
}

/* Empty Blob State */
#blob-controls-sidebar .blob-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    text-align: center;
    color: #718096 !important;
}

#blob-controls-sidebar .blob-list-empty .empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

#blob-controls-sidebar .blob-list-empty span {
    font-size: 13px;
    margin-bottom: 4px;
}

#blob-controls-sidebar .blob-list-empty small {
    font-size: 11px;
    opacity: 0.7;
}

/* Blob Shop */
#blob-controls-sidebar .blob-shop-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}

#blob-controls-sidebar .shop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#blob-controls-sidebar .shop-label {
    color: #a0aec0 !important;
    font-weight: 500;
}

#blob-controls-sidebar .shop-value {
    color: #48bb78 !important;
    font-weight: 700;
}

#blob-controls-sidebar .shop-hint {
    font-size: 11px;
    color: #fbbf24 !important;
    text-align: center;
    padding: 6px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 4px;
    margin-bottom: 8px;
}

#blob-controls-sidebar .blob-shop-container {
    max-height: 150px;
    overflow-y: auto;
}

/* =================================================================== */
/* PLOT STATUS SIDEBAR REMOVED                                          */
/* =================================================================== */

/* Force plot status to right side and remove left positioning */
#plot-status {
    right: 0 !important;
    left: auto !important;
}

#plot-status.left {
    right: 0 !important;
    left: auto !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
}

/* Update plot status toggle button positioning */
#plot-status .toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
}

/* Blob Controls Bottom Panel */
#blob-controls {
    position: fixed;
    bottom: 0;
    left: 20px;
    width: 40%;
    max-width: 400px;
    height: auto;
    max-height: 40vh;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748 !important;
    overflow-y: auto;
    z-index: 9999;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px 12px 0 0;
    backdrop-filter: blur(12px);
}

/* Unified Blob UI Bottom Panel */
#unified-blob-ui {
    position: fixed;
    bottom: 40px;
    left: 20px;
    width: 40%;
    max-width: 400px;
    height: auto;
    max-height: 45vh;
    background: rgba(26, 32, 44, 0.95);
    color: #e2e8f0;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    z-index: 9998;
    pointer-events: auto;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
    backdrop-filter: blur(12px);
}

#unified-blob-ui.minimized {
    position: fixed !important;
    bottom: 40px !important;
    left: 20px !important;
    top: auto !important;
    width: 200px !important;
    height: 60px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: none !important;
    overflow: visible !important;
}

#unified-blob-ui.minimized .blob-content {
    display: none !important;
}

#unified-blob-ui * {
    color: #e2e8f0 !important;
}

#unified-blob-ui .toggle-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: 1px solid #38b2ac;
    color: #38b2ac;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s ease;
    box-shadow: none;
}

#unified-blob-ui.minimized .toggle-btn {
    display: block !important;
    position: absolute;
    top: 15px;
    right: 15px;
}

#unified-blob-ui .toggle-btn:hover {
    background: rgba(56, 178, 172, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#unified-blob-ui .section-header {
    background: rgba(56, 178, 172, 0.2);
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
    font-size: 1rem;
    font-weight: 600;
    color: #63b3ed !important;
    text-shadow: none;
}

#unified-blob-ui .section-header:hover {
    background: rgba(56, 178, 172, 0.3);
}

#unified-blob-ui .section-content {
    padding: 16px;
    display: none;
    background: rgba(26, 32, 44, 0.5);
    font-size: 0.95rem;
    line-height: 1.5;
}

#unified-blob-ui .section-content.visible {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
}

#unified-blob-ui button {
    margin: 6px;
    width: auto;
    min-width: 120px;
    padding: 10px 15px;
    background: rgba(56, 178, 172, 0.8);
    border: 1px solid #38b2ac;
    color: #ffffff !important;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
}

#unified-blob-ui button:hover {
    background: rgba(56, 178, 172, 1);
    border-color: #38b2ac;
}

#unified-blob-ui input[type="color"], #unified-blob-ui input[type="range"] {
    width: auto;
    min-width: 100px;
    max-width: 200px;
    padding: 6px;
    margin: 0 10px 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

#unified-blob-ui label {
    margin: 0 5px 0 0;
    white-space: nowrap;
    font-size: 0.9rem;
    color: #e2e8f0 !important;
}

#unified-blob-ui input:focus {
    outline: none;
    border-color: #38b2ac;
    box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
}

/* Blob Roster Styles */
.blob-list-container {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 5px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.blob-list-empty {
    padding: 20px;
    text-align: center;
    color: #718096 !important;
    font-style: italic;
}

.blob-list-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.blob-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.blob-list-item.selected {
    background: rgba(66, 153, 225, 0.2);
    border-color: #4299e1;
}

.blob-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.blob-info {
    flex: 1;
}

.blob-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.blob-name {
    font-weight: 600;
    font-size: 13px;
    color: #e2e8f0 !important;
}

.blob-level-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #2d3748;
    color: #fbbf24 !important;
    font-weight: bold;
}

.blob-xp-container {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.blob-xp-bar {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #63b3ed);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.blob-stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #a0aec0 !important;
    margin-top: 2px;
}

#blob-controls * {
    color: #2d3748 !important;
}

#blob-controls h1, #blob-controls h2, #blob-controls h3, #blob-controls h4, #blob-controls h5, #blob-controls h6 {
    color: #2c5282 !important;
}

#blob-controls.minimized {
    width: 180px;
    height: 60px;
    background: transparent;
    border-radius: none;
    box-shadow: none;
}

#blob-controls.minimized .blob-content {
    display: none;
}

#blob-controls .blob-content {
    padding: 20px;
    display: block;
    max-height: 35vh;
    overflow-y: auto;
}

/* Horizontal layout for bottom panel */
#blob-controls .section-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#blob-controls .toggle-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: 1px solid #2c5282;
    color: #2c5282;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10001;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: none;
}

#blob-controls .toggle-btn:hover {
    background: rgba(44, 82, 130, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#blob-controls .section-header {
    background: rgba(44, 82, 130, 0.1);
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(44, 82, 130, 0.2);
    transition: background 0.2s;
    font-size: 1rem;
    font-weight: 600;
    color: #2c5282;
    text-shadow: none;
}

#blob-controls .section-header:hover {
    background: rgba(44, 82, 130, 0.15);
}

#blob-controls .section-content {
    padding: 16px;
    display: none;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Horizontal layout for bottom panel */
#blob-controls .section-content.visible {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#blob-controls select, #blob-controls input, #blob-controls textarea {
    width: auto;
    min-width: 100px;
    max-width: 200px;
    padding: 8px;
    margin-bottom: 0;
    margin-right: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #2d3748;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

#blob-controls label {
    margin: 0 5px 0 0;
    white-space: nowrap;
    font-size: 0.9rem;
    color: #2c5282 !important;
}

#blob-controls select:focus, #blob-controls input:focus, #blob-controls textarea:focus {
    outline: none;
    border-color: #2c5282;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

#blob-controls button {
    margin: 6px;
    width: auto;
    min-width: 120px;
    padding: 10px 15px;
    background: #2c5282;
    border: 1px solid #2c5282;
    color: #ffffff !important;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#blob-controls button:hover {
    background: #2a4365;
    border-color: #2a4365;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

#blob-controls button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(44, 82, 130, 0.2);
}

/* Custom scrollbar for blob-controls to match plot-status */
#blob-controls::-webkit-scrollbar {
    width: 8px;
}

#blob-controls::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 4px;
}

#blob-controls::-webkit-scrollbar-thumb {
    background: rgba(44, 82, 130, 0.6);
    border-radius: 4px;
    transition: background 0.2s ease;
}

#blob-controls::-webkit-scrollbar-thumb:hover {
    background: rgba(44, 82, 130, 0.8);
}

/* Add side switch capability for blob-controls if needed */
#blob-controls .side-switch-btn {
    position: absolute;
    top: 50px;
    right: 10px;
    background: rgba(44, 82, 130, 0.8);
    border: 1px solid #2c5282;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    display: none;
    transition: all 0.2s ease;
}

#blob-controls .side-switch-btn:hover {
    background: rgba(42, 67, 101, 0.9);
    transform: translateY(-1px);
}

/* When blob-controls is on right side */
#blob-controls.right {
    left: auto;
    right: 0;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

#blob-controls.right .toggle-btn {
    right: auto;
    left: 10px;
}

#blob-controls.right .side-switch-btn {
    right: auto;
    left: 10px;
}

#ui-menu-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #0077ff;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
    font-size: 22px;
}

#ui-menu-button:hover {
    background: #0055cc;
}

/* User ID Box - Official Passport Badge Style */
#user-id-box {
    width: 160px;
    height: 80px;
    background: linear-gradient(135deg, #1a365d, #2d4a87);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Source Serif Pro', serif;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 3px solid #2d4a87;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255,255,255,0.2);
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1200;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

/* Government Seal Pattern */
#user-id-box::before {
    content: '🛡️';
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 0.9rem;
    opacity: 0.7;
    z-index: 1;
}

/* Official Badge Text */
#user-id-text {
    position: relative;
    z-index: 2;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

@keyframes rotateEarth {
    from { background-position: 0% center; }
    to { background-position: 200% center; }
}

#info-panel {
    display: none;
}

#info-panel * {
    color: #94a3b8 !important;
}

#info-panel p {
    margin: 3px 0;
    color: #94a3b8 !important;
    font-size: 0.72rem;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto;
    background: transparent; /* Transparent to show ocean render */
}

.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 100000; /* Higher than auth-overlay (9999) and all other UI elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 20, 40, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #1e3a8a;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 20px,
            rgba(30, 58, 138, 0.02) 20px,
            rgba(30, 58, 138, 0.02) 40px
        ),
        url('/source/caustics.jpg') no-repeat center center/cover;
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

.modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: hologramShimmer 6s infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes hologramShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.close {
    color: #ffffff;
    float: right;
    font-size: 30px; /* Larger for visibility */
    font-weight: bold;
    cursor: pointer;
    text-shadow: none;
    z-index: 10;
}

.close:hover {
    color: #00aaff;
}

#kyc-profile, #kyc-status {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    color: #001433;
}

#kyc-profile p, #kyc-status p {
    margin: 10px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem; /* Larger for readability */
    line-height: 1.5;
}

#kyc-profile h3, #kyc-status h3 {
    color: #001433;
    font-size: 1.4rem; /* Larger for prominence */
    font-weight: 700;
    text-shadow: none;
}

#qrcode {
    margin: 15px auto;
    text-align: center;
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    display: inline-block;
}

#qrcode canvas {
    max-width: 200px;
    max-height: 200px;
}

#close-kyc {
    background: linear-gradient(45deg, #0077b6, #00aaff);
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    z-index: 10;
}

#close-kyc:hover {
    background: linear-gradient(45deg, #005f8c, #0088cc);
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input, button {
    padding: 10px;
    font-size: 1rem;
}

input {
    background-color: #ffffff;
    color: #2d3748 !important;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

input:focus {
    outline: none;
    border-color: #2c5282;
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

input::placeholder {
    color: #a0aec0 !important;
}

button {
    background-color: #2c5282;
    color: #ffffff !important;
    border: 1px solid #2c5282;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

button:hover {
    background-color: #2a4365;
    border-color: #2a4365;
}

/* Override global white-button text for purchase modal */
.tier-modal-content .quick-amt-btn {
    background: #f8fafc !important;
    color: #1a202c !important;
    border-color: #e2e8f0;
}
.tier-modal-content .quick-amt-btn:hover {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border-color: #10b981;
}
.tier-modal-content .purchase-confirm-btn {
    background: #10b981 !important;
    color: #ffffff !important;
}
.tier-modal-content .purchase-confirm-btn:not(:disabled):hover {
    background: #059669 !important;
}
.tier-modal-content .modal-close {
    background: none !important;
    color: #6b7280 !important;
    border: none !important;
}
.tier-modal-content .modal-close:hover {
    color: #1f2937 !important;
}

#signup-message, #login-message {
    margin-top: 12px;
    font-size: 1rem;
    line-height: 1.5;
}

/* Comprehensive Dark Blue Button Text Fix */
button[style*="background-color: #2c5282"],
button[style*="background: #2c5282"],
button[style*="background-color:#2c5282"],
button[style*="background:#2c5282"],
.btn-dark-blue,
button.dark-blue {
    color: #ffffff !important;
}

/* Additional specific button text color fixes */
#plot-status button,
#blob-controls button,
#blob-controls-sidebar button,
button[class*="mining"],
button[class*="plot"],
button[class*="allocate"],
button[class*="refresh"] {
    color: #ffffff !important;
}

/* Force white text on any button with dark blue background gradients */
button[style*="linear-gradient"][style*="#1e3a8a"],
button[style*="linear-gradient"][style*="#2c5282"],
button[style*="linear-gradient"][style*="#1a365d"] {
    color: #ffffff !important;
}

@media (max-width: 600px) {
    body {
        font-size: 0.9rem; /* Slightly smaller for mobile */
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 1rem;
    }

    h5 {
        font-size: 0.95rem;
    }

    h6 {
        font-size: 0.9rem;
    }

    .modal-content {
        width: 95%;
        padding: 18px;
    }

    #kyc-profile p, #kyc-status p {
        font-size: 1rem;
    }

    #kyc-profile h3, #kyc-status h3 {
        font-size: 1.2rem;
    }

    #qrcode {
        width: 180px !important;
        height: 180px !important;
    }

    #qrcode canvas {
        max-width: 180px;
        max-height: 180px;
    }

    #close-kyc {
        font-size: 1rem;
        padding: 12px;
    }

    #plot-status, #blob-controls {
        width: 250px; /* Slightly narrower for mobile */
    }

    #plot-status.minimized, #blob-controls.minimized {
        width: 50px;
    }

    .wallet-container {
        margin: 4px;
        padding: 10px;
        max-width: 100%;
        max-height: 70vh;
        background: transparent;
    }

    #wallet-expanded {
        max-height: 40vh;
    }

    .wallet-container h3 {
        font-size: 0.95rem;
    }

    .wallet-container p {
        font-size: 0.8rem;
    }

    #wallet-toggle-btn, .wallet-actions button, #wallet-login-prompt button {
        font-size: 0.8rem;
        padding: 8px 14px;
        min-height: 40px;
    }

    .wallet-actions {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .wallet-actions button {
        flex: none;
    }

    /* Unified Auth Button Styling */
    .auth-button {
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
        border-radius: 8px !important;
        width: auto !important;
        min-width: 60px !important;
        font-weight: 500 !important;
        transition: all 0.2s ease !important;
        font-family: 'Inter', sans-serif !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        z-index: 2000 !important;
        position: relative !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
    
    .auth-button:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    }

    /* Auth Container */
    #auth-container {
        position: fixed !important;
        top: 12px !important;
        left: 12px !important;
        z-index: 2000 !important;
        display: flex !important;
        align-items: center !important;
        pointer-events: auto !important;
    }

    /* Login Button Specific Styling */
    .login-button {
        background: rgba(59, 130, 246, 0.15) !important;
        color: #93c5fd !important;
        border: 1px solid rgba(59, 130, 246, 0.25) !important;
    }

    .login-button:hover {
        background: rgba(59, 130, 246, 0.25) !important;
        border-color: rgba(59, 130, 246, 0.4) !important;
    }

    /* Logout Button Specific Styling */
    .logout-button {
        background: rgba(239, 68, 68, 0.12) !important;
        color: #fca5a5 !important;
        border: 1px solid rgba(239, 68, 68, 0.2) !important;
    }

    .logout-button:hover {
        background: rgba(239, 68, 68, 0.2) !important;
        border-color: rgba(239, 68, 68, 0.35) !important;
    }

    /* Mobile adjustments for central control panel */
    #central-control-panel {
        left: 6px;
        right: 6px;
        top: 6px;
        bottom: 6px;
        width: auto;
        max-width: none;
        padding: 12px;
        transform: none;
        border-radius: 14px;
    }

    #central-control-panel h2 {
        min-height: 90px;
        font-size: 1rem;
    }

    #central-control-panel h2::before {
        width: 70px;
        height: 70px;
    }

    .control-section h3 {
        font-size: 0.65rem;
    }

    .button-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .control-panel-button {
        font-size: 0.8rem;
        padding: 12px 10px;
        min-height: 52px;
    }

    #info-panel {
        left: 6px;
        bottom: 6px;
        font-size: 0.7rem;
        padding: 8px 12px;
        border-radius: 10px;
    }

    /* Mobile: Ensure glass buttons maintain light text */
    button,
    .btn,
    .control-panel-button,
    #plot-status button,
    #blob-controls button,
    #blob-controls-sidebar button {
        color: #e2e8f0 !important;
    }
}

/* =================================================================== */
/* FINAL DARK BLUE BUTTON TEXT COLOR FIX */
/* =================================================================== */

/* Ultimate override to ensure ALL dark blue buttons have white text */
button[style*="#2c5282"],
button[style*="#1e3a8a"], 
button[style*="#1a365d"],
button[style*="#2a4365"],
.btn[style*="#2c5282"],
.btn[style*="#1e3a8a"],
.btn[style*="#1a365d"],
button:not([style*="color"]) {
    color: #ffffff !important;
}

/* Specific targeting for plot status and blob control buttons */
#plot-status button,
#plot-status .btn,
#blob-controls button,
#blob-controls .btn,
#blob-controls-sidebar button,
#blob-controls-sidebar .btn,
.plot-status button,
.blob-controls button,
button[data-action*="allocate"],
button[data-action*="refresh"],
button[data-action*="plot"],
button[data-action*="mining"],
.mining-btn,
.plot-btn,
.allocate-btn,
.refresh-btn {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* Force white text on buttons with these specific classes or IDs */
#allocate-plot,
#refresh-data,
button[id*="allocate"],
button[id*="refresh"],
button[class*="allocate"],
button[class*="refresh"],
button[class*="plot"],
button[class*="mining"] {
    color: #ffffff !important;
}

/* =================================================================== */
/* HEADER OWNERSHIP INDICATOR SYSTEM - Integrated into header */
/* =================================================================== */

/* Ownership section in header */
.ownership-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

/* Owner mode - Green theme */
.ownership-section.owner {
    background: linear-gradient(135deg, rgba(0, 80, 40, 0.6) 0%, rgba(0, 50, 25, 0.8) 100%);
    border: 1px solid rgba(0, 255, 136, 0.5);
}

/* Visitor mode - Blue theme */
.ownership-section.visitor {
    background: linear-gradient(135deg, rgba(0, 60, 100, 0.5) 0%, rgba(0, 40, 80, 0.7) 100%);
    border: 1px solid rgba(0, 170, 255, 0.4);
}

/* Unclaimed/For Sale mode - Purple/Magenta theme */
.ownership-section.unclaimed {
    background: linear-gradient(135deg, rgba(80, 40, 100, 0.6) 0%, rgba(60, 30, 80, 0.8) 100%);
    border: 1px solid rgba(255, 102, 255, 0.5);
}

/* Reserved mode - Yellow theme */
.ownership-section.reserved {
    background: linear-gradient(135deg, rgba(100, 80, 20, 0.6) 0%, rgba(80, 60, 10, 0.8) 100%);
    border: 1px solid rgba(255, 204, 0, 0.5);
}

/* Ownership icon in header */
.ownership-header-icon {
    font-size: 18px;
    margin-right: 4px;
}

/* Ownership badge in header */
.ownership-header-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
}

.ownership-header-badge.owner {
    background: rgba(0, 255, 136, 0.25);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.6);
}

.ownership-header-badge.visitor {
    background: rgba(0, 170, 255, 0.2);
    color: #66ccff;
    border: 1px solid rgba(0, 170, 255, 0.5);
}

.ownership-header-badge.unclaimed {
    background: rgba(255, 102, 255, 0.2);
    color: #ff88ff;
    border: 1px solid rgba(255, 102, 255, 0.5);
}

.ownership-header-badge.forsale {
    background: rgba(255, 102, 255, 0.25);
    color: #ff66ff;
    border: 1px solid rgba(255, 102, 255, 0.6);
}

/* ── For Sale Price Tag (inline in header) ── */
.forsale-price-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    margin-left: 6px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 165, 0, 0.2));
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.6);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
    letter-spacing: 0.3px;
    animation: forsale-price-glow 2s ease-in-out infinite alternate;
    white-space: nowrap;
}

.forsale-price-tag.hidden {
    display: none;
}

.forsale-price-currency {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.forsale-price-loading {
    font-size: 10px;
    font-style: italic;
    opacity: 0.6;
}

@keyframes forsale-price-glow {
    from { box-shadow: 0 0 4px rgba(255, 215, 0, 0.2); }
    to   { box-shadow: 0 0 12px rgba(255, 215, 0, 0.5); }
}

.ownership-header-badge.reserved {
    background: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
    border: 1px solid rgba(255, 204, 0, 0.5);
}

/* Header claim/purchase button */
.header-claim-btn {
    background: linear-gradient(135deg, #ff66ff, #cc44cc);
    border: none;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 8px;
    white-space: nowrap;
}

.header-claim-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 102, 255, 0.4);
    filter: brightness(1.1);
}

.header-claim-btn.claim {
    background: linear-gradient(135deg, #8855ff, #6633cc);
}

.header-claim-btn.claim:hover {
    box-shadow: 0 3px 10px rgba(136, 85, 255, 0.4);
}

.header-claim-btn.purchase {
    background: linear-gradient(135deg, #ff66ff, #cc44cc);
}

.header-claim-btn.verifying {
    background: linear-gradient(135deg, #666, #444);
    cursor: wait;
    pointer-events: none;
}

.header-claim-btn.success {
    background: linear-gradient(135deg, #00cc66, #00aa44);
    color: #fff;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 204, 102, 0.6);
}

.header-claim-btn.unavailable {
    background: linear-gradient(135deg, #cc3333, #aa2222);
    color: #fff;
    pointer-events: none;
}

.header-claim-btn.hidden {
    display: none;
}

/* Header map link */
.header-map-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.header-map-link:hover {
    color: #00aaff;
    background: rgba(0, 170, 255, 0.15);
    transform: scale(1.1);
}

/* Header Buy M$ Button */
.header-buy-btn {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    padding: 6px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-buy-btn:hover {
    background: rgba(16, 185, 129, 0.22) !important;
    color: #6ee7b7 !important;
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.header-buy-btn:active {
    transform: scale(0.97);
}

/* Ensure simple header can space title + button */
.simple-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Category badges that match world-map colors */
.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge.assigned {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
}

.category-badge.reserved {
    background: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
    border: 1px solid #ffcc00;
}

.category-badge.forsale {
    background: rgba(255, 102, 255, 0.2);
    color: #ff66ff;
    border: 1px solid #ff66ff;
}

.category-badge.preview {
    background: rgba(136, 85, 255, 0.2);
    color: #aa88ff;
    border: 1px solid #8855ff;
}

.category-badge.land {
    background: rgba(100, 80, 50, 0.3);
    color: #c9a66b;
    border: 1px solid #8b7355;
}

.category-badge.eez {
    background: rgba(100, 150, 200, 0.2);
    color: #88bbdd;
    border: 1px solid #6699bb;
}

/* Mobile responsive for header ownership */
@media (max-width: 768px) {
    .ownership-section {
        flex-wrap: wrap;
        justify-content: center;
        padding: 6px 8px;
    }
    
    .ownership-header-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .header-claim-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .header-map-link {
        font-size: 14px;
    }
}

/* Mobile responsive for Plot and Blob bottom controls */
@media (max-width: 768px) {
    /* Plot Status - move higher on mobile */
    #plot-status {
        bottom: 80px !important;
        right: 10px !important;
        left: auto !important;
        width: 45% !important;
        max-width: 180px !important;
        max-height: 40vh !important;
    }
    
    #plot-status.minimized {
        bottom: 80px !important;
        right: 10px !important;
        width: auto !important;
        height: auto !important;
    }
    
    #plot-status.minimized .toggle-btn {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
    
    #plot-status .toggle-btn {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
    
    #plot-status.left {
        left: 10px !important;
        right: auto !important;
    }
    
    #plot-status.minimized.left {
        left: 10px !important;
        right: auto !important;
    }
    
    /* Blob Controls Sidebar - adjust for mobile */
    #blob-controls-sidebar.minimized {
        top: auto !important;
        bottom: 80px !important;
        left: 10px !important;
        width: auto !important;
        height: auto !important;
    }
    
    #blob-controls-sidebar.minimized .toggle-btn {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
    
    /* Unified Blob UI - move higher on mobile */
    #unified-blob-ui {
        bottom: 80px !important;
        left: 10px !important;
        width: 45% !important;
        max-width: 180px !important;
        max-height: 40vh !important;
    }
    
    #unified-blob-ui.minimized {
        bottom: 80px !important;
        left: 10px !important;
        width: auto !important;
        height: auto !important;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
    #plot-status {
        bottom: 70px !important;
        right: 8px !important;
        max-width: 150px !important;
    }
    
    #plot-status.minimized {
        bottom: 70px !important;
    }
    
    #plot-status .toggle-btn {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    
    #blob-controls-sidebar.minimized {
        bottom: 70px !important;
        left: 8px !important;
    }
    
    #blob-controls-sidebar.minimized .toggle-btn {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    
    #unified-blob-ui {
        bottom: 70px !important;
        left: 8px !important;
        max-width: 150px !important;
    }
    
    #unified-blob-ui.minimized {
        bottom: 70px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   CORPORATE VIEW SWITCHER & COMPANY SELECTOR STYLES
   ═══════════════════════════════════════════════════════════════ */

/* Header top row for view switcher + company selector */
.header-top-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
    margin-right: 10px;
    vertical-align: middle;
}

/* Header actions row (simple header) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* View Switcher Toggle */
.view-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.view-btn {
    padding: 5px 14px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 18px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.view-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

/* Business view active button override */
.view-btn.active[data-view="business"] {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4);
}

/* Company Selector */
.company-selector-container {
    position: relative;
}

.company-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 28px 5px 10px;
    border-radius: 16px;
    cursor: pointer;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23f59e0b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.company-select:hover {
    border-color: rgba(245, 158, 11, 0.6);
    background-color: rgba(245, 158, 11, 0.18);
}

.company-select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.company-select option {
    background: #1a1a2e;
    color: #f59e0b;
}

.company-selector-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
}

.start-company-link {
    color: #f59e0b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 3px 10px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.start-company-link:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
}

.no-companies, .loading-companies {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* Body class overrides for business view */
body.business-view .header-container {
    border-bottom: 2px solid rgba(245, 158, 11, 0.2);
}

body.business-view .header-title {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

body.citizen-view .header-title {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Hide citizen-specific elements in business view */
body.business-view .citizen-only {
    display: none !important;
}

/* Hide business-specific elements in citizen view */
body.citizen-view .business-only {
    display: none !important;
}

/* Responsive: stack view switcher on small screens */
@media (max-width: 600px) {
    .header-top-row {
        flex-direction: column;
        gap: 6px;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .view-btn {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
    
    .company-select {
        font-size: 0.65rem;
        max-width: 150px;
    }
}

/* Company Wallet Panel */
.company-wallet-panel .cw-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #f59e0b;
}

.company-wallet-panel .cw-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.company-wallet-panel .cw-label {
    color: rgba(255, 255, 255, 0.6);
}

.company-wallet-panel .cw-transfer-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.company-wallet-panel .cw-input {
    width: 80px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
}

.company-wallet-panel .cw-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.company-wallet-panel .cw-btn-to {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.company-wallet-panel .cw-btn-from {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.company-wallet-panel .cw-btn:hover {
    transform: scale(1.03);
    filter: brightness(1.2);
}

.company-wallet-panel .cw-status {
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    text-align: center;
}

.company-wallet-panel .cw-status.success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.company-wallet-panel .cw-status.error {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

/* Corporate property table rows */
.corporate-row td {
    color: #f59e0b !important;
}

.corporate-row td:first-child {
    font-weight: 600;
}

/* ── Corporate View Action Buttons ── */

/* Rent-for-company button (allocation-visual + plot-status) */
.header-claim-btn.rent-company,
button.rent-company,
.rent-company {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #000 !important;
    border: 1px solid rgba(245, 158, 11, 0.6) !important;
    font-weight: 700;
    text-shadow: none !important;
}

.header-claim-btn.rent-company:hover,
button.rent-company:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

/* Rent button in world-map category badge */
.rent-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #000 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    font-weight: 600;
}

.rent-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Corporate ownership badge (allocation-visual rented state) */
.ownership-header-badge.corporate {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    color: #000;
    border: 1px solid rgba(245, 158, 11, 0.5);
    font-weight: 700;
}

/* Business-view body: gold accent for key interactive elements */
body.business-view .claim-parcel-btn,
body.business-view #allocate-plot-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    border: 1px solid rgba(245, 158, 11, 0.5);
    font-weight: 600;
}

body.business-view .claim-parcel-btn:hover,
body.business-view #allocate-plot-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

/* Company property indicator glow on rented parcels */
body.business-view .ownership-header {
    border-color: rgba(245, 158, 11, 0.3);
}

body.business-view .ownership-header.rented {
    border-left: 3px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(0,0,0,0) 100%);
}

/* Pulse animation for user status indicator */
@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}