/* Enhanced Trading Dashboard Styles */

/* Import CSS Variables from main site */
:root {
    /* Colors from main site */
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --secondary: #6366f1;
    --background: #0a0a0f;
    --surface: #1a1a24;
    --surface-light: #252538;
    --text-primary: #ffffff;
    --text-secondary: #a8a8b3;
    --text-muted: #6b7280;
    --border: #2d2d3a;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-surface: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    --gradient-orb: radial-gradient(circle, rgba(0,255,136,0.2) 0%, transparent 70%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.3);
    
    /* Animations */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dashboard-body {
    font-family: var(--font-primary);
    background: var(--background);
    color: var(--text-primary);
    height: 3150px;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Dashboard Container */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.dashboard-header {
    background: var(--gradient-surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) var(--space-lg);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.header-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.brand-logo i {
    color: var(--primary);
    font-size: 1.5rem;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.connection-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--error);
    position: relative;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: var(--success);
}

.status-dot.connecting {
    background: var(--warning);
    animation: pulse 1s infinite;
}

.status-dot.disconnected {
    background: var(--error);
}

.status-dot.active {
    background: var(--primary);
}

.status-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.status-text {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.session-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
}

.session-label {
    color: var(--text-secondary);
}

.session-id {
    color: var(--primary);
    font-weight: var(--font-weight-semibold);
}

.header-controls {
    display: flex;
    gap: var(--space-sm);
}

.control-btn {
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: var(--surface-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: calc(100vh - 80px);
    overflow: hidden;
}

/* Left Control Panel */
.control-panel {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: var(--space-lg);
    overflow-y: auto;
   
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    min-width: 380px;
}

.control-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track {
    background: var(--surface);
}

.control-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Panel Cards */
.panel-card {
    background: var(--gradient-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-width: 0; /* Allow cards to shrink */
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.card-header h3 {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
    flex: 1;
}

.card-header h3 i {
    color: var(--primary);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.card-content {
    padding: var(--space-lg);
}

/* Wallet Connection Card */
.wallet-connect-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--background);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
    min-height: 56px;
    box-sizing: border-box;
}

.wallet-connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.wallet-connect-btn.connected {
    background: var(--success);
}

.wallet-connect-btn.connecting {
    background: var(--warning);
    cursor: not-allowed;
}

.btn-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.btn-title {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.btn-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.wallet-info {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-size: 0.75rem;
}

.wallet-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.wallet-address,
.wallet-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-info .label {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.wallet-info .value {
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    font-size: 0.75rem;
}

.alt-connection {
    text-align: center;
}

.alt-connect-btn {
    width: 100%;
    padding: var(--space-sm);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-xs);
    font-size: 0.75rem;
}

.alt-connect-btn:hover {
    background: var(--primary);
    color: var(--background);
}

.alt-description {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
}

/* Bot Control Card */
.bot-control-card .card-header {
    align-items: flex-start;
}

.bot-status {
    margin-top: var(--space-xs);
}

.status-badge {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
}

.status-badge.stopped {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid var(--error);
}

.status-badge.running {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.status-badge.preview {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.status-badge.stopping {
    background: rgba(245, 158, 11, 0.3);
    color: var(--warning);
    border: 1px solid var(--warning);
    animation: pulse 2s ease-in-out infinite;
}

.control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

/* Buttons */
.btn {
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--background);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

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

.btn-success {
    background: var(--success);
    color: var(--background);
}

.btn-success:hover:not(:disabled) {
    background: #0d9668;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--error);
    color: var(--background);
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-large {
    padding: var(--space-md);
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* Quick Settings */
.quick-settings {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.setting-row {
    margin-bottom: var(--space-md);
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-row label {
    display: block;
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.range-input {
    flex: 1;
    padding: var(--space-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    min-width: 0;
    box-sizing: border-box;
}

.range-separator {
    color: var(--text-secondary);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.setting-input {
    width: 100%;
    padding: var(--space-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    box-sizing: border-box;
}

.range-input:focus,
.setting-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

/* Stats Card */
.stats-card .card-header {
    align-items: flex-start;
}

.stats-period {
    margin-top: var(--space-xs);
}

.period-selector {
    padding: var(--space-xs) var(--space-sm);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.65rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.stat-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.stat-icon.primary {
    background: rgba(0, 255, 136, 0.2);
    color: var(--primary);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.stat-icon.profit {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

/* Chart Card */
.chart-card .card-header {
    align-items: flex-start;
}

.chart-controls {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.chart-btn {
    padding: var(--space-xs) var(--space-sm);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.65rem;
}

.chart-btn.active,
.chart-btn:hover {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

.chart-container {
    height: 120px;
    margin-bottom: var(--space-sm);
}

.chart-summary {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm);
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.summary-item .label {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

.summary-item .value {
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
}

.summary-item .value.positive {
    color: var(--success);
}

.summary-item .value.negative {
    color: var(--error);
}

/* Theme Card */
.theme-selector {
    margin-bottom: var(--space-sm);
}

.theme-selector label {
    display: block;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.theme-select {
    width: 100%;
    padding: var(--space-xs);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
}

.interface-settings {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.setting-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-toggle label {
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-light);
    border: 1px solid var(--border);
    transition: var(--transition-fast);
    border-radius: 20px;
}

.switch:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-secondary);
    transition: var(--transition-fast);
    border-radius: 50%;
}

input:checked + .switch {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked + .switch:before {
    transform: translateX(16px);
    background-color: var(--background);
}

/* Trading Panel */
.trading-panel {
    background: var(--background);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

.header-title {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.header-title h2 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-title h2 i {
    color: var(--primary);
}

.monitoring-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.monitoring-status .status-dot {
    width: 8px;
    height: 8px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.filter-controls {
    display: flex;
    gap: var(--space-sm);
}

.filter-btn {
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

.refresh-btn {
    width: 40px;
    height: 40px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
    transform: rotate(180deg);
}

/* Token List Container */
.token-list-container {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

/* Preview Mode */
.preview-mode {
    background: var(--gradient-surface);
    border: 1px solid var(--warning);
    border-radius: var(--radius-lg);
    margin: var(--space-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.preview-icon {
    width: 60px;
    height: 60px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--warning);
}

.preview-content h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.preview-content p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Token List Header */
.token-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-col {
    text-align: center;
}

.header-col:first-child {
    text-align: left;
}

/* Token List */
.token-list {
    display: flex;
    flex-direction: column;
}

.token-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-fast);
    animation: slideInFromBottom 0.3s ease;
}

.token-item:hover {
    background: var(--surface);
}

.token-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.token-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    color: var(--background);
    position: relative;
    overflow: hidden;
}

.token-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.token-icon-fallback,
.token-icon-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: var(--font-weight-bold);
    color: var(--background);
}

.real-token-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    animation: pulse 2s infinite;
    border: 1px solid var(--background);
}

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

.token-details {
    display: flex;
    flex-direction: column;
}

.token-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.token-symbol {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.token-address {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.token-time,
.token-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.token-status {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-badge.seen {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-secondary);
}

.status-badge.bought {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-badge.sold {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.token-profit {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-semibold);
}

.token-profit.positive {
    color: var(--success);
}

.token-profit.negative {
    color: var(--error);
}

.token-success-rate {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.token-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.action-btn {
    width: 32px;
    height: 32px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.view:hover {
    background: var(--primary);
    color: var(--background);
    border-color: var(--primary);
}

.action-btn.sell:hover {
    background: var(--error);
    color: var(--background);
    border-color: var(--error);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-content h4 {
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.loading-content p {
    color: var(--text-secondary);
}

/* Modals */
.wallet-modal,
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.wallet-modal.active,
.settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--gradient-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-content.large {
    max-width: 700px;
}

.wallet-modal.active .modal-content,
.settings-modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.modal-header h3 i {
    color: var(--primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--error);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
}

/* Wallet Options */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 100%;
    text-align: left;
}

.wallet-option:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.05);
    transform: translateY(-2px);
}

.wallet-option .wallet-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--background);
}

.wallet-icon.phantom {
    background: linear-gradient(135deg, #ab9ff2 0%, #7970ea 100%);
}

.wallet-icon.solflare {
    background: linear-gradient(135deg, #fc8e44 0%, #f75c03 100%);
}

.wallet-icon.sollet {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
}

.wallet-option .wallet-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wallet-option .wallet-name {
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.wallet-option .wallet-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.wallet-option .wallet-status {
    color: var(--text-secondary);
}

/* Settings Modal */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}

.tab-btn {
    flex: 1;
    padding: var(--space-md);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-weight: var(--font-weight-medium);
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.setting-group.toggle {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    grid-column: 1 / -1;
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.setting-group label {
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.setting-group label i {
    color: var(--primary);
}

.setting-group input,
.setting-group select {
    padding: var(--space-md);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.setting-group input:focus,
.setting-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.setting-group small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

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

/* Responsive Design */
@media (max-width: 1400px) {
    .main-grid {
        grid-template-columns: 360px 1fr;
    }
    
    .control-panel {
        min-width: 360px;
        padding: var(--space-md);
        gap: var(--space-md);
    }
}

@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 340px 1fr;
    }
    
    .control-panel {
        min-width: 340px;
        padding: var(--space-md);
        gap: var(--space-sm);
    }
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 320px 1fr;
    }
    
    .control-panel {
        min-width: 320px;
    }
    
    .token-list-header,
    .token-item {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        font-size: 0.875rem;
    }
    
    .token-success-rate,
    .token-actions,
    .header-col:nth-child(6),
    .header-col:nth-child(7) {
        display: none;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        grid-template-columns: 1fr auto;
        gap: var(--space-sm);
        padding: var(--space-md);
        align-items: center;
    }
    
    .header-brand {
        flex: 1;
        align-items: flex-start;
    }
    
    .connection-status {
        display: none;
    }
    
    .header-controls {
        display: flex;
        flex-wrap: nowrap;
        gap: var(--space-xs);
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .control-panel {
        order: 2;
        border-right: none;
        border-top: 1px solid var(--border);
        max-height: none;
        padding: var(--space-md);
        gap: var(--space-md);
        min-width: unset;
    }
    
    .trading-panel {
        order: 1;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
        padding: var(--space-md);
    }
    
    .header-title {
        justify-content: center;
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
    
    .header-title h2 {
        font-size: 1.125rem;
    }
    
    .monitoring-status {
        justify-content: center;
    }
    
    .header-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filter-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .token-list-header,
    .token-item {
        grid-template-columns: 2fr 1fr 1fr;
        padding: var(--space-sm);
        font-size: 0.8rem;
    }
    
    .token-amount,
    .token-success-rate,
    .token-actions,
    .header-col:nth-child(4),
    .header-col:nth-child(6),
    .header-col:nth-child(7) {
        display: none;
    }
    
    .control-buttons {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }
    
    .stat-item {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    
    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }
    
    .stat-value {
        font-size: 0.875rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .chart-container {
        height: 100px;
    }
    
    .modal-content {
        width: 95%;
        margin: var(--space-sm);
    }
    
    .modal-header,
    .modal-body {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: var(--space-sm);
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .header-brand {
        align-items: center;
    }
    
    .brand-logo {
        font-size: 1.125rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .header-controls {
        justify-content: center;
        margin-top: var(--space-sm);
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .token-list-header,
    .token-item {
        grid-template-columns: 2fr 1fr;
        font-size: 0.8rem;
        padding: var(--space-sm) var(--space-xs);
    }
    
    .token-status,
    .header-col:nth-child(3) {
        display: none;
    }
    
    .wallet-option {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
        padding: var(--space-lg);
    }
    
    .wallet-option .wallet-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .panel-header {
        padding: var(--space-sm);
    }
    
    .header-title h2 {
        font-size: 1rem;
    }
    
    .filter-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.8rem;
    }
    
    .control-panel {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    
    .card-header {
        padding: var(--space-md);
    }
    
    .card-content {
        padding: var(--space-md);
    }
    
    .wallet-connect-btn {
        min-height: 48px;
        padding: var(--space-md);
        font-size: 0.8rem;
    }
    
    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .quick-settings {
        padding: var(--space-md);
    }
    
    .range-input,
    .setting-input {
        padding: var(--space-sm);
        font-size: 0.8rem;
    }
}

/* Theme Variations */
.theme1 {
    --primary: #00ff88;
    --secondary: #6366f1;
}

.theme2 {
    --primary: #39ff14;
    --secondary: #00ff41;
    --background: #0d1117;
    --surface: #161b22;
}

.theme3 {
    --primary: #8b5cf6;
    --secondary: #a855f7;
    --background: #0f0a1a;
    --surface: #1e1b3a;
}

.theme4 {
    --primary: #fbbf24;
    --secondary: #f59e0b;
    --background: #1a1400;
    --surface: #2d2817;
}

.theme5 {
    --primary: #ef4444;
    --secondary: #dc2626;
    --background: #1a0a0a;
    --surface: #2d1b1b;
}

.theme6 {
    --primary: #06b6d4;
    --secondary: #0891b2;
    --background: #0a1419;
    --surface: #1b2d35;
}

.theme7 {
    --primary: #10b981;
    --secondary: #059669;
    --background: #0a1914;
    --surface: #1b352d;
}

.theme8 {
    --primary: #f97316;
    --secondary: #ea580c;
    --background: #1a0f0a;
    --surface: #2d1f1b;
}

/* ======== FINAL FIXES FOR LEFT CONTROL PANEL ======== */

/* Normalize box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Ensure body does not cause overflow */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Layout container */
.dashboard-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Main grid layout */
.main-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 360px 1fr;
    min-height: 0;
    height: calc(100vh - 80px);
    overflow: hidden;
    max-width: 100vw;
}

/* Scrollable and flexible left panel */
.control-panel {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
}

/* Ensure inner cards do not collapse */
.panel-card {
    flex-shrink: 0;
}

/* Limit any rogue elements from causing horizontal overflow */
body {
    overflow-x: hidden;
}

/* Force token list and internal blocks to wrap instead of overflowing */
.token-list,
.token-item,
.panel-content,
.card-content {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Adjust min-widths on smaller viewports */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 280px 1fr;
    }

    .control-panel {
        min-width: 280px;
    }
}

@media (max-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr; /* убираем левую панель в колонку */
    grid-template-rows: auto auto; /* панель и основной контент по вертикали */
    height: auto; /* убрать фиксированную высоту */
  }

  .control-panel {
    order: 2; /* опускаем вниз или вверх, как тебе нужно */
    width: 100%;
    min-width: unset;
    border-right: none;
    border-top: 1px solid var(--border);
    max-height: 300px; /* ограничим высоту, если много контента */
    overflow-y: auto;
  }

  .trading-panel {
    order: 1; /* основной контент — сверху */
  }
}


/* ======== REAL TOKEN STYLES FROM PUMPPORTAL ======== */

/* Token badges for distinguishing real vs simulated tokens */
.live-badge {
    background: var(--error) !important;
    color: white !important;
    font-size: 6px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 10px;
    padding: 1px 3px;
    position: absolute;
    top: -3px;
    right: -3px;
    z-index: 10;
    animation: pulse 2s infinite;
    border: 1px solid var(--background);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.sim-token-badge {
    background: var(--warning) !important;
    color: var(--background) !important;
    font-size: 6px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 10px;
    padding: 1px 3px;
    position: absolute;
    top: -3px;
    right: -3px;
    z-index: 10;
    border: 1px solid var(--background);
    opacity: 0.8;
}

/* Enhanced token icon styles for images */
.token-icon {
    position: relative;
    overflow: visible;
}

.token-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    transition: all var(--transition-fast);
}

.token-image:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.token-icon-fallback {
    background: var(--gradient-primary);
    color: var(--background);
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
}

/* Enhanced token details for real token data */
.token-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.token-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.token-symbol {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
}

.token-address {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 4px;
    border-radius: 3px;
    display: inline-block;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status badge enhancements for real token data */
.status-badge.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid var(--error);
    animation: pulse 2s infinite;
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* PumpPortal connection status */
.monitoring-status .status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.monitoring-status .status-dot.error {
    background: var(--error);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Real-time data indicators */
.token-item[data-is-real="true"] {
    border-left: 3px solid var(--primary);
    background: rgba(0, 255, 136, 0.02);
}

.token-item[data-is-real="true"]:hover {
    background: rgba(0, 255, 136, 0.05);
    border-left-color: var(--success);
}

/* Ultra-smooth token animations with better debouncing */
.token-item {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(0);
    opacity: 1;
    will-change: transform, opacity;
}

.token-item.new-token {
    animation: ultraSmoothSlideIn 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.token-item.updating {
    animation: subtlePulse 0.4s ease-in-out;
}

.token-status {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.token-profit {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Ultra-smooth slide-in animation */
@keyframes ultraSmoothSlideIn {
    0% {
        transform: translateY(-30px) scale(0.92);
        opacity: 0;
    }
    60% {
        transform: translateY(3px) scale(1.01);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Subtle pulse for updates */
@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.005);
    }
}

/* Status-based token highlighting */
.token-item[data-status="analyzing"] {
    border-left-color: var(--primary);
    background: rgba(0, 255, 136, 0.03);
}

.token-item[data-status="buying"] {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.03);
    animation: buyingPulse 2s infinite;
}

.token-item[data-status="bought"] {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.03);
}

.token-item[data-status="selling"] {
    border-left-color: var(--error);
    background: rgba(239, 68, 68, 0.03);
    animation: sellingPulse 1.5s infinite;
}

.token-item[data-status="sold"] {
    border-left-color: var(--text-muted);
    background: rgba(107, 114, 128, 0.02);
    opacity: 0.8;
}

.token-item[data-status="honeypot"],
.token-item[data-status="rug_pull"] {
    border-left-color: var(--error);
    background: rgba(239, 68, 68, 0.05);
    animation: dangerPulse 3s infinite;
}

/* Status animations */
@keyframes buyingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0);
    }
}

@keyframes sellingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

@keyframes dangerPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Reduced stagger delays for smoother flow */
.token-item:nth-child(1) { animation-delay: 0ms; }
.token-item:nth-child(2) { animation-delay: 150ms; }
.token-item:nth-child(3) { animation-delay: 300ms; }
.token-item:nth-child(4) { animation-delay: 450ms; }
.token-item:nth-child(5) { animation-delay: 600ms; }

/* Smooth loading indicator */
.loading-indicator {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.loading-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.loading-indicator.hide {
    opacity: 0;
    transform: translateY(-10px);
}

/* Metadata tooltip styles */
.token-name[title]:hover {
    cursor: help;
    text-decoration: underline dotted;
}

/* Loading states for token images */
.token-image[src=""] {
    display: none;
}

.token-icon-fallback {
    display: flex;
}

/* PumpPortal connection indicators */
.pumpfun-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.pumpfun-status.connected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.pumpfun-status.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.pumpfun-status-text {
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

.pumpfun-status.connected .pumpfun-status-text {
    color: var(--success);
}

.pumpfun-status.error .pumpfun-status-text {
    color: var(--error);
}

/* Enhanced notification positioning to prevent overlap */
.notification {
    position: fixed;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    max-width: 350px;
    backdrop-filter: blur(20px);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Preview mode styling */
.preview-mode-active .token-item {
    border-left: 3px solid var(--warning) !important;
    background: rgba(245, 158, 11, 0.05);
}

.preview-mode-active .token-item::after {
    content: "PREVIEW";
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--warning);
    color: var(--background);
    font-size: 8px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 5;
}

/* Enhanced connection status indicators */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: var(--space-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.status-dot.connecting {
    background: var(--warning);
    animation: pulse-connecting 2s infinite;
}

.status-dot.wallet-required {
    background: var(--warning);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    animation: pulse-wallet-required 2.5s infinite;
}

.status-dot.ready {
    background: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-dot.preview {
    background: var(--primary);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.status-dot.trading {
    background: var(--error);
    animation: pulse-trading 1.5s infinite;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.7);
}

.status-dot.preview-active {
    background: var(--primary);
    animation: pulse-preview 2s infinite;
}

@keyframes pulse-wallet-required {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

@keyframes pulse-connecting {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

@keyframes pulse-trading {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

@keyframes pulse-preview {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(0, 255, 136, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    }
}
.wallet-connect-btn {
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.wallet-connect-btn.connecting {
    background: var(--warning);
    color: var(--background);
}

.wallet-connect-btn.connecting::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

.wallet-connect-btn.connected {
    background: var(--success);
    color: var(--background);
    border-color: var(--success);
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.notification.success {
    border-left: 4px solid var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.notification.error {
    border-left: 4px solid var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.notification.info {
    border-left: 4px solid var(--primary);
    background: rgba(0, 255, 136, 0.1);
}

.notification.warning {
    border-left: 4px solid var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.4;
    flex: 1;
}

.notification-message {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
}

.notification-close:hover {
    background: var(--error);
    color: var(--background);
}

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

/* Enhanced empty state for real tokens */
.empty-state.waiting-for-tokens {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    margin: var(--space-lg);
}

.empty-state.waiting-for-tokens .empty-icon {
    background: var(--gradient-primary);
    color: var(--background);
    animation: pulse 2s infinite;
}

/* Token metadata styles */
.token-metadata {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
    font-size: 0.75rem;
}

.token-metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.token-metadata-label {
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.token-metadata-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

/* Real-time price display */
.token-price {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-semibold);
    font-size: 0.875rem;
}

.token-price.loading {
    color: var(--text-muted);
}

.token-price.loaded {
    color: var(--primary);
}

/* Enhanced loading indicator for PumpPortal */
.pumpportal-loading {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin: var(--space-lg);
}

.pumpportal-loading .spinner {
    width: 20px;
    height: 20px;
}

.pumpportal-loading-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}