/* Lumens WebUI Styles — Modern Glassmorphism Design System */
/* Inspired by dYdX, Jupiter Exchange, premium DeFi trading dashboards */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* Primary gradient colors */
    --bg-primary: #0a0e1a;
    --bg-secondary: rgba(15, 20, 40, 0.7);
    --bg-tertiary: rgba(20, 25, 50, 0.5);

    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.12);

    /* Accent colors */
    --accent-blue: #4f8fff;
    --accent-purple: #8b5cf6;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-cyan: #06b6d4;

    /* Gradient accents */
    --gradient-primary: linear-gradient(135deg, #4f8fff 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);

    /* Text colors */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #475569;

    /* Semantic (backward compat names) */
    --teal: #06b6d4;
    --cyan: #06b6d4;
    --mint: #22c55e;
    --red: #ef4444;
    --sand: #f59e0b;
    --black: #0a0e1a;
    --yellow: #f59e0b;
    --green: #22c55e;

    /* Semantic status aliases (used by JS modules) */
    --danger: #ef4444;
    --warning: #f59e0b;
    --success-color: #22c55e;
    --error-color: #ef4444;

    /* Border */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(79, 143, 255, 0.2);

    /* Derived tokens used in menus */
    --bg-dark: rgba(10, 14, 26, 0.95);
    --bg-card: rgba(255, 255, 255, 0.04);

    /* Layout */
    --sidebar-width: 220px;
    --sidebar-collapsed: 64px;
    --topbar-height: 56px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== BODY ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== ANIMATED GRADIENT BACKGROUND ===== */
.bg-grid-1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(79, 143, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
    animation: atmosphere-drift 20s ease-in-out infinite alternate;
}

.bg-grid-2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 50% 50% at 60% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 70% 40% at 30% 80%, rgba(34, 197, 94, 0.04) 0%, transparent 60%);
    animation: atmosphere-drift-alt 25s ease-in-out infinite alternate;
}

@keyframes atmosphere-drift {
    0% {
        opacity: 0.7;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate(20px, -10px) scale(1.05);
    }
}

@keyframes atmosphere-drift-alt {
    0% {
        opacity: 0.6;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0.9;
        transform: translate(-15px, 15px) scale(1.03);
    }
}

/* ===== UNIFIED TOP BAR ===== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: rgba(10, 14, 26, 0.8);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    gap: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateZ(0);
    will-change: transform;
}

/* Gradient border at bottom of topbar */
.top-bar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 143, 255, 0.3), rgba(139, 92, 246, 0.3), transparent);
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    cursor: default;
}

.logo-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.1);
}

.logo-text {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-brand {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-sub {
    font-size: 0.5rem;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    font-weight: 300;
    margin-top: 2px;
}

/* ===== SEPARATOR ===== */
.separator {
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, transparent, var(--glass-border), transparent);
    flex-shrink: 0;
}

/* ===== DASHBOARD STATS (top bar) ===== */
.dash-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.dash-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 4px 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.dash-stat.mint-stat {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.dash-stat .label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dash-stat .value {
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary);
}

.dash-stat .value.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.dash-stat .value.highlight {
    color: var(--accent-green);
}

.dash-stat .value.badge {
    padding: 2px 8px;
    background: rgba(79, 143, 255, 0.15);
    border-radius: 12px;
    color: var(--accent-blue);
    font-size: 0.7rem;
    border: 1px solid rgba(79, 143, 255, 0.2);
}

/* Dashboard refresh button */
.dash-btn {
    padding: 5px 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.dash-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(79, 143, 255, 0.08);
}

/* Expand button */
.dash-expand-btn {
    padding: 5px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    flex-shrink: 0;
}

.dash-expand-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.dash-expand-btn.expanded {
    background: rgba(79, 143, 255, 0.1);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* Right side controls */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* ===== LAUNCH CONTROL ===== */
.launch-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--accent-blue);
    line-height: 1;
    position: relative;
}

.launch-control:hover {
    background: rgba(79, 143, 255, 0.08);
}

.launch-control .icon {
    font-size: 0.9rem;
    line-height: 1;
}

.launch-control .text {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
}

.launch-control.inactive {
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(79, 143, 255, 0.15);
}

.launch-control.inactive:hover {
    box-shadow: 0 0 20px rgba(79, 143, 255, 0.25);
}

.launch-control.inactive .launch-text {
    color: var(--accent-blue);
}

.launch-control.inactive .launch-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
    animation: status-pulse-blue 2s ease-in-out infinite;
}

.launch-control.active {
    border-color: var(--accent-red);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.launch-control.active:hover {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.launch-control.active .launch-text {
    color: var(--accent-red);
}

.launch-control.active .launch-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
    animation: status-pulse-red 2s ease-in-out infinite;
}

.launch-icon {
    font-size: 0.9rem;
}

.launch-text {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== EXPANDED DASHBOARD PANEL ===== */
.dashboard-expanded {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.92);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 90;
    padding: 20px 24px;
    display: none;
    transform: translateZ(0);
    animation: slideDown 0.3s ease;
}

.dashboard-expanded.visible {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form rows inside dashboard */
.dashboard-expanded .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.dashboard-expanded .form-row .form-group {
    flex: 1;
}

.dashboard-expanded .form-group {
    margin-bottom: 12px;
}

.dashboard-expanded .form-textarea {
    min-height: 200px;
    resize: vertical;
}

/* Balance display card inside dashboard */
.dashboard-expanded .card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.dashboard-expanded .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

/* Balance summary in dashboard */
.balance-summary {
    display: flex;
    gap: 32px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.balance-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.balance-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.balance-value {
    font-size: 1.1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 600;
    color: var(--text-primary);
}

.balance-value.highlight {
    color: var(--accent-green);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 14, 26, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    transform: translateZ(0);
    will-change: transform;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    z-index: 50;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-header:hover {
    background: rgba(79, 143, 255, 0.04);
}

.sidebar-title {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar.collapsed .sidebar-title {
    display: none;
}

.sidebar-toggle {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.sidebar-header:hover .sidebar-toggle {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

/* ===== NAVIGATION (Sidebar) ===== */
.nav-list {
    flex: 1;
    padding: 12px 0;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
    white-space: nowrap;
    margin: 2px 0;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(79, 143, 255, 0.05);
}

.nav-item:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(79, 143, 255, 0.06), transparent);
    pointer-events: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nav-item.active {
    color: var(--accent-blue);
    border-left-color: var(--accent-blue);
    background: linear-gradient(90deg, rgba(79, 143, 255, 0.1), transparent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    box-shadow: 0 0 12px rgba(79, 143, 255, 0.4);
}

.nav-icon {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Collapsed sidebar */
.sidebar.collapsed .nav-label {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-list {
    overflow: visible;
}

/* ===== MAIN CONTENT ===== */
main {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.sidebar.collapsed ~ main {
    margin-left: var(--sidebar-collapsed);
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tools Sub-panels */
.tools-subpanel {
    display: none;
}

.tools-subpanel.active {
    display: block;
}

/* Offense Sub-panels */
.offense-subpanel {
    display: none;
}

.offense-subpanel.active {
    display: block;
}

/* ===== CARDS (Panels) ===== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 20px;
    overflow: visible;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    animation: cardFadeIn 0.4s ease;
}

.card:hover {
    border-color: var(--glass-highlight);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    transition: all 0.25s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79, 143, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

/* Generic input/textarea/select styling */
input, textarea, select {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px) scale(1.02);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(79, 143, 255, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(79, 143, 255, 0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.btn-danger {
    background: var(--gradient-danger);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    border-color: var(--accent-blue);
    background: rgba(79, 143, 255, 0.12);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
}

.btn-icon {
    padding: 6px;
    min-width: 32px;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== DAEMON STATUS ===== */
.daemon-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.daemon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: status-pulse-green 2s ease-in-out infinite;
}

.daemon-dot.disconnected {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
    animation: status-pulse-red 2s ease-in-out infinite;
}

/* ===== STATUS PULSE ANIMATIONS ===== */
@keyframes status-pulse-green {
    0%, 100% { box-shadow: 0 0 4px var(--accent-green); }
    50% { box-shadow: 0 0 12px var(--accent-green), 0 0 20px rgba(34, 197, 94, 0.3); }
}

@keyframes status-pulse-red {
    0%, 100% { box-shadow: 0 0 4px var(--accent-red); }
    50% { box-shadow: 0 0 12px var(--accent-red), 0 0 20px rgba(239, 68, 68, 0.3); }
}

@keyframes status-pulse-blue {
    0%, 100% { box-shadow: 0 0 4px var(--accent-blue); }
    50% { box-shadow: 0 0 12px var(--accent-blue), 0 0 20px rgba(79, 143, 255, 0.3); }
}

@keyframes status-pulse-yellow {
    0%, 100% { box-shadow: 0 0 4px var(--accent-yellow); }
    50% { box-shadow: 0 0 12px var(--accent-yellow), 0 0 20px rgba(245, 158, 11, 0.3); }
}

/* ===== WALLET LIST ===== */
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.wallet-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    align-items: center;
    transition: all 0.2s ease;
}

.wallet-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-highlight);
}

.wallet-item:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.wallet-address {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-balance {
    color: var(--text-secondary);
    white-space: nowrap;
}

.wallet-supply {
    color: var(--accent-green);
    font-weight: 500;
    white-space: nowrap;
}

.wallet-tokens {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ===== QUICK BUTTONS ===== */
.quick-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* ===== PROGRESS ===== */
.progress-container {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 16px;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.progress-stat {
    text-align: center;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.progress-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-green);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.progress-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== RATE STATS ===== */
.rate-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

/* ===== STATUS INDICATORS ===== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-dot.running {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: status-pulse-green 2s ease-in-out infinite;
}

.status-dot.stopped {
    background-color: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
    animation: status-pulse-red 2s ease-in-out infinite;
}

.status-dot.pending {
    background-color: var(--accent-yellow);
    box-shadow: 0 0 8px var(--accent-yellow);
    animation: status-pulse-yellow 2s ease-in-out infinite;
}

.status-dot.completed {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.status-dot.failed {
    background-color: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.status-dot.success {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.status-dot.connected {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.status-dot.disconnected {
    background-color: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
    animation: status-pulse-red 2s ease-in-out infinite;
}

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.875rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-left: 3px solid transparent;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-left: 3px solid var(--accent-green);
    color: var(--accent-green);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 3px solid var(--accent-red);
    color: var(--accent-red);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-left: 3px solid var(--accent-yellow);
    color: var(--accent-yellow);
}

.alert-info {
    background-color: rgba(79, 143, 255, 0.08);
    border: 1px solid rgba(79, 143, 255, 0.2);
    border-left: 3px solid var(--accent-blue);
    color: var(--accent-blue);
}

/* ===== SIMULATION MODE BANNER ===== */
.simulation-banner {
    background-color: rgba(245, 158, 11, 0.1);
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 20px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--accent-yellow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
}

/* ===== FILE INPUT ===== */
.file-input-wrapper {
    position: relative;
    display: inline-block;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-input-label:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(79, 143, 255, 0.06);
}

/* Logo Preview */
.logo-preview {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
    display: none;
}

.logo-preview.visible {
    display: block;
}

/* ===== TOKEN CREATE LAYOUT — Form + Live Preview ===== */
.token-create-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.token-create-form {
    flex: 1;
    min-width: 0;
}

.token-preview-panel {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.token-preview-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: center;
}

.token-preview-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.token-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0.6;
    border-radius: 16px 16px 0 0;
}

.token-preview-card:hover {
    border-color: rgba(79, 143, 255, 0.18);
    box-shadow: 0 8px 32px rgba(79, 143, 255, 0.06);
}

/* Preview header — logo + name/symbol */
.tp-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.tp-logo-wrap {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.tp-logo.visible {
    display: block;
}

.tp-logo.visible + .tp-logo-placeholder {
    display: none;
}

.tp-logo-placeholder {
    font-size: 1.5rem;
    opacity: 0.4;
}

.tp-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tp-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.tp-symbol {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

/* Preview description */
.tp-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.tp-desc.is-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Preview stats row */
.tp-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tp-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tp-stat-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.tp-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Preview social links */
.tp-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    min-height: 24px;
}

.tp-social {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    transition: all 0.2s;
}

.tp-social:hover {
    border-color: rgba(79, 143, 255, 0.2);
    color: var(--text-primary);
    background: rgba(79, 143, 255, 0.06);
}

.tp-social svg {
    opacity: 0.7;
}

/* Chain badge */
.tp-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.tp-chain-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
    animation: tpDotPulse 2s ease-in-out infinite;
}

@keyframes tpDotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
    .token-create-layout {
        flex-direction: column;
    }

    .token-preview-panel {
        width: 100%;
        position: static;
        order: -1;
    }

    .token-preview-card {
        max-width: 320px;
        margin: 0 auto;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dashboard-collapsed-view {
        flex-wrap: wrap;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab {
        white-space: nowrap;
    }

    .sidebar {
        width: var(--sidebar-collapsed);
    }

    .sidebar .nav-label {
        display: none;
    }

    .sidebar .nav-item {
        justify-content: center;
        padding: 12px;
    }

    main {
        margin-left: var(--sidebar-collapsed);
    }

    .dash-stats {
        display: none;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== HIDDEN ===== */
.hidden {
    display: none !important;
}

/* ===== TOOLS TAB STYLES ===== */
.tools-mode.active {
    font-weight: 600;
    color: #fff;
}

/* Offense subtabs */
.offense-subtab.active {
    font-weight: 600;
    color: #fff;
}

/* Tools subtabs */
.tools-subtab.active {
    font-weight: 600;
    color: #fff;
}

/* ===== LOG ENTRY STYLES ===== */
.log-success {
    color: var(--accent-green);
}

.log-error {
    color: var(--accent-red);
}

.log-pending {
    color: var(--accent-yellow);
}

/* ===== DATA TABLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--glass-bg);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(79, 143, 255, 0.04);
}

.data-table td {
    color: var(--text-primary);
}

.data-table .actions-cell {
    display: flex;
    gap: 6px;
}

.data-table .btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.inactive {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.completed {
    background: rgba(79, 143, 255, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(79, 143, 255, 0.2);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== EDITABLE INPUT IN TABLE ===== */
.editable-input {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    width: 100%;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
}

.editable-input:hover {
    border-color: var(--border-color);
}

.editable-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: rgba(255, 255, 255, 0.04);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state-text {
    font-size: 0.875rem;
}

/* ===== HYDRA MODE STYLES ===== */
.hydra-token-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.hydra-token-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-purple);
}

.hydra-token-row.hydra-winner {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--accent-green);
}

.hydra-token-row.hydra-loser {
    opacity: 0.5;
    background: rgba(239, 68, 68, 0.04);
}

.hydra-rank {
    font-weight: 700;
    color: var(--accent-purple);
    min-width: 32px;
    font-size: 0.9rem;
}

.hydra-symbol {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
}

.hydra-mint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hydra-accumulated {
    font-weight: 600;
    color: var(--accent-green);
    min-width: 80px;
    text-align: right;
}

/* Token config row */
.hydra-token-config-row {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.hydra-token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.hydra-token-number {
    font-weight: 600;
    color: var(--accent-purple);
    font-size: 1rem;
}

.hydra-remove-token {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.hydra-logo-preview {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.hydra-ranking-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.hydra-ranking-row:last-child {
    border-bottom: none;
}

.hydra-ranking-row.winner {
    background: rgba(34, 197, 94, 0.08);
    border-radius: var(--radius-sm);
}

.hydra-ranking-position {
    font-weight: 600;
    color: var(--accent-purple);
    min-width: 30px;
}

.hydra-ranking-symbol {
    font-weight: 600;
    min-width: 80px;
}

.hydra-ranking-accumulated {
    color: var(--accent-green);
    min-width: 80px;
}

.hydra-ranking-buys {
    color: var(--text-secondary);
    min-width: 80px;
}

.hydra-ranking-status {
    font-size: 1.25rem;
}

.hydra-log-entry {
    padding: 2px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.hydra-log-entry.error {
    color: var(--accent-red);
}

.hydra-log-entry.success {
    color: var(--accent-green);
}

/* ===== CLEANING ESTIMATES TABLE ===== */
.cleaning-estimates {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cleaning-estimates-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.cleaning-estimates-header i {
    color: var(--accent-cyan);
}

.cleaning-estimates-subtext {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.cleaning-estimates table {
    width: 100%;
    border-collapse: collapse;
}

.cleaning-estimates thead th {
    padding: 10px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

.cleaning-estimates thead th:first-child {
    text-align: left;
}

.cleaning-estimates tbody tr {
    transition: background 0.15s ease;
}

.cleaning-estimates tbody tr:hover {
    background: rgba(79, 143, 255, 0.04);
}

.cleaning-estimates tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.cleaning-estimates tbody td {
    padding: 9px 16px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.cleaning-estimates tbody td:first-child {
    color: var(--text-primary);
    font-weight: 500;
    text-align: left;
}

.cleaning-estimates tbody td:last-child {
    color: var(--accent-green);
    font-weight: 600;
    text-align: right;
}

/* Hydra keypair row (dynamically created) */
.hydra-keypair-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

/* Hydra keys file/filter (from HTML) */
.hydra-keys-file,
.hydra-keys-filter {
    font-family: 'JetBrains Mono', monospace;
}

/* Allocation checkbox row (dynamic) */
.allocation-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.allocation-pct-input {
    width: 80px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.allocation-pct-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* ===== COLLAPSIBLE SECTIONS ===== */
details summary {
    cursor: pointer;
    padding: 8px 0;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.2s ease;
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 8px;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

details[open] summary::before {
    transform: rotate(90deg);
    color: var(--accent-blue);
}

details summary:hover {
    color: var(--accent-blue);
}

details[open] summary {
    color: var(--accent-blue);
}

/* ===== METEORA DLMM ===== */
.meteora-control {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.meteora-control .icon {
    font-size: 1.2rem;
    line-height: 1;
}

.meteora-control.inactive {
    background: transparent;
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
}

.meteora-control.inactive:hover {
    background: rgba(139, 92, 246, 0.08);
}

.meteora-control.active {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
    animation: meteora-pulse 2s ease-in-out infinite;
}

.meteora-control.active:hover {
    background: rgba(139, 92, 246, 0.2);
}

@keyframes meteora-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 18px rgba(139, 92, 246, 0.5); }
}

.meteora-menu {
    position: absolute;
    top: calc(var(--topbar-height) + 8px);
    right: 220px;
    width: 380px;
    background: rgba(10, 14, 26, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 18px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-height: 80vh;
    overflow-y: auto;
    animation: menuSlideDown 0.2s ease;
}

@keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.meteora-menu.hidden {
    display: none;
}

.meteora-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.meteora-status {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meteora-status.inactive {
    background: rgba(79, 143, 255, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(79, 143, 255, 0.2);
}

.meteora-status.active {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.meteora-menu-body .form-group {
    margin-bottom: 12px;
}

.meteora-menu-body label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.meteora-menu-body input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.meteora-menu-body input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.meteora-menu-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.meteora-menu-actions .btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meteora-fees-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 0.85rem;
}

.meteora-fee-value {
    color: var(--accent-purple);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.meteora-positions-list {
    margin-top: 8px;
}

.meteora-position-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.meteora-position-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.meteora-position-item .pos-key {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.meteora-position-item .pos-pct {
    color: var(--accent-blue);
    font-weight: 600;
}

.meteora-position-item .pos-status {
    font-size: 0.7rem;
}

.meteora-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meteora-refresh-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    color: var(--accent-purple);
}

.meteora-refresh-icon:hover {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.4);
}

.meteora-refresh-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.meteora-bottom-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 92, 246, 0.12);
}

.meteora-close-pos-btn {
    padding: 2px 6px !important;
    font-size: 0.7rem !important;
    min-width: 24px;
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.meteora-close-pos-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}

.meteora-close-pos-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== PARROT MODE ===== */
.parrot-control {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.parrot-control .icon {
    font-size: 1.2rem;
    line-height: 1;
}

.parrot-control.inactive {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.parrot-control.inactive:hover {
    background: rgba(6, 182, 212, 0.08);
}

.parrot-control.active {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
    animation: parrot-pulse 2s ease-in-out infinite;
}

.parrot-control.active:hover {
    background: rgba(239, 68, 68, 0.18);
}

@keyframes parrot-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 18px rgba(239, 68, 68, 0.5); }
}

/* Parrot Menu Dropdown */
.parrot-menu {
    position: absolute;
    top: calc(var(--topbar-height) + 8px);
    right: 180px;
    width: 280px;
    background: rgba(10, 14, 26, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 18px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: menuSlideDown 0.2s ease;
}

.parrot-menu.hidden {
    display: none;
}

.parrot-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.parrot-status {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.parrot-status.inactive {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.parrot-status.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.parrot-menu-body .form-group {
    margin-bottom: 12px;
}

.parrot-menu-body label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.parrot-menu-body input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.parrot-menu-body input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.parrot-menu-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.parrot-menu-actions .btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.parrot-menu-actions .btn-primary {
    background: var(--gradient-primary);
    color: #fff;
}

.parrot-menu-actions .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(79, 143, 255, 0.3);
}

.parrot-menu-actions .btn-danger {
    background: var(--gradient-danger);
    color: #fff;
}

.parrot-menu-actions .btn-danger:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

/* ===== SELECTION / FOCUS STYLES ===== */
::selection {
    background: rgba(79, 143, 255, 0.3);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* ===== UTILITY: Monospace for dev pubkeys ===== */
.hydra-dev-pk,
.hydra-mint-pk {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.hydra-remove-keypair {
    cursor: pointer;
    color: var(--accent-red);
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.hydra-remove-keypair:hover {
    opacity: 1;
}

/* ===== INFO TOOLTIPS ===== */
.info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(79, 143, 255, 0.15);
    color: var(--accent-blue);
    font-size: 10px;
    font-weight: 600;
    cursor: help;
    margin-left: 6px;
    position: relative;
    vertical-align: middle;
    transition: all 0.2s;
    font-style: normal;
}

.info-tip:hover {
    background: rgba(79, 143, 255, 0.3);
    transform: scale(1.1);
}

.info-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 20, 40, 0.95);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 280px;
    line-height: 1.4;
    border: 1px solid rgba(79, 143, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.info-tip:hover::after {
    opacity: 1;
}

/* ===== PLATFORM FEE NOTICE ===== */
.platform-fee-notice {
    animation: fadeIn 0.3s ease;
}

/* ===== AUTH OVERLAY ===== */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-logo { font-size: 3rem; margin-bottom: 16px; }
.auth-title { font-size: 2rem; font-weight: 700; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.auth-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }
.auth-error { color: var(--accent-red); font-size: 0.85rem; margin-top: 12px; }

/* Discord Login Button */
.auth-discord-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #5865F2;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.auth-discord-btn:hover {
    background: #4752C4;
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(88, 101, 242, 0.4);
}

.auth-discord-btn:active {
    transform: translateY(0);
}

.auth-discord-btn .discord-icon {
    flex-shrink: 0;
}

/* User Display in Top Bar */
.auth-user-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 8px;
}

.auth-user-display:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-user-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Menu Dropdown */
.auth-user-menu {
    position: fixed;
    z-index: 10001;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fade-in 0.15s ease;
}

.auth-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
}

.auth-menu-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-menu-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-menu-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.auth-menu-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}

.auth-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-red);
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== TUTORIAL OVERLAY ===== */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.tutorial-progress-bar-container { height: 4px; background: rgba(255,255,255,0.05); }
.tutorial-progress-bar { height: 100%; background: var(--gradient-primary); transition: width 0.3s ease; }
.tutorial-icon { font-size: 2.5rem; text-align: center; padding: 24px 0 8px; }
.tutorial-title { text-align: center; font-size: 1.3rem; font-weight: 600; padding: 0 32px; }
.tutorial-content { padding: 16px 32px 24px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }
.tutorial-content ul { margin: 8px 0; padding-left: 20px; }
.tutorial-content li { margin: 6px 0; }
.tutorial-content strong { color: var(--text-primary); }
.tutorial-footer { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px 24px; }
.tutorial-step-counter { color: var(--text-muted); font-size: 0.8rem; }

/* ===== INTERACTIVE TUTORIAL ===== */
.tutorial-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    pointer-events: all;
}

.tutorial-highlight {
    position: relative;
    z-index: 10001 !important;
    box-shadow: 0 0 0 4px var(--accent-blue), 0 0 20px rgba(79, 143, 255, 0.4) !important;
    border-radius: 8px !important;
    animation: tutorial-pulse 1.5s ease-in-out infinite;
}

@keyframes tutorial-pulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--accent-blue), 0 0 20px rgba(79, 143, 255, 0.4); }
    50% { box-shadow: 0 0 0 6px var(--accent-blue), 0 0 30px rgba(79, 143, 255, 0.6); }
}

.tutorial-tooltip {
    position: fixed;
    z-index: 10002;
    background: rgba(15, 20, 40, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(79, 143, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

.tutorial-tooltip-icon { font-size: 2rem; margin-bottom: 8px; }
.tutorial-tooltip-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.tutorial-tooltip-content { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; margin-bottom: 16px; max-height: 50vh; overflow-y: auto; }
.tutorial-tooltip-footer { display: flex; align-items: center; justify-content: space-between; }
.tutorial-tooltip-counter { color: var(--text-muted); font-size: 0.75rem; }

.tutorial-tooltip-progress {
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    margin-bottom: 16px;
}
.tutorial-tooltip-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* ===== CFS CONSENT OVERLAY ===== */
.cfs-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfs-consent-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.cfs-consent-card h2 { margin-bottom: 12px; }
.cfs-consent-card p { color: var(--text-secondary); margin-bottom: 16px; font-size: 0.9rem; }
.cfs-consent-disclaimer { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); border-radius: 10px; padding: 14px; margin-bottom: 20px; font-size: 0.82rem; color: var(--text-secondary); }
.cfs-consent-disclaimer strong { color: var(--accent-red); }
.cfs-consent-disclaimer ul { margin: 8px 0 0; padding-left: 20px; }
.cfs-consent-disclaimer li { margin: 4px 0; }
.cfs-consent-actions { display: flex; gap: 12px; }
.cfs-consent-actions .btn { flex: 1; padding: 10px; }
