/* 🐙 Phantom Wallet Arbs Dashboard - Styles */

:root {
    /* Color Palette - Phantom Purple Theme */
    --bg-primary: #0a0b0f;
    --bg-secondary: #12141c;
    --bg-tertiary: #1a1d28;
    --bg-card: #151821;
    --bg-hover: #1e2130;
    
    --accent-primary: #ab9ff2;
    --accent-secondary: #7c6ce7;
    --accent-glow: rgba(171, 159, 242, 0.15);
    
    --success: #4ade80;
    --success-bg: rgba(74, 222, 128, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.1);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.1);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: #2a2f3e;
    --border-light: #3a4055;
    
    /* Typography */
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px var(--accent-glow);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(171, 159, 242, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(124, 108, 231, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, #0d0e14 100%);
    pointer-events: none;
    z-index: -1;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    animation: modalIn 0.3s ease-out;
}

.modal-content.wide {
    max-width: 800px;
    text-align: left;
}

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

.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.url-example {
    display: block;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-primary);
    margin: 24px 0;
}

.modal-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.mono {
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.manual-auth {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.manual-auth p {
    margin-bottom: 16px;
}

#auth-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    margin-bottom: 16px;
    transition: all 0.2s;
}

#auth-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#auth-input::placeholder {
    color: var(--text-muted);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

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

.modal-content.wide {
    position: relative;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #0a0b0f;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(171, 159, 242, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(171, 159, 242, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--bg-hover);
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 16px rgba(171, 159, 242, 0.5));
}

.logo-text h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.by-line {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.brand-link {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.brand-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* SOL Price Widget */
.sol-price-widget {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: help;
    transition: all 0.2s;
}

.sol-price-widget:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.sol-price-label {
    color: var(--text-muted);
    font-weight: 500;
    font-family: var(--font-display);
}

.sol-price-value {
    color: var(--success);
    font-weight: 700;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--success-bg);
    border-radius: var(--radius-md);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

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

.status-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--success);
}

/* Description Banner */
.description-banner {
    padding: 16px 32px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.description-banner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 900px;
}

/* Stats Section */
.stats-section {
    padding: 24px 32px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.stats-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.stats-block h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
}

.stats-block .stats-tiles {
    margin-top: auto;
}

.stats-total {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--success);
    font-weight: 700;
}

.stats-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.stats-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
    flex-shrink: 0;
}

.stats-block-total {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(171, 159, 242, 0.05) 100%);
    border-color: var(--accent-secondary);
}

.stats-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-tile {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    min-width: 160px;
    flex: 1;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.stat-tile:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
}

.stat-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    min-height: 20px;
}

.stat-tile-symbol {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-primary);
}

.stat-tile-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-align: right;
}

.stat-tile-amount {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    margin-bottom: 4px;
    min-height: 28px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-tile-usd {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--success);
}

.stat-tile-mint {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 4px;
}

.loading-tiles {
    display: flex;
    justify-content: center;
    padding: 20px;
    width: 100%;
}

.stats-empty,
.stats-error {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 16px;
}

.stats-error {
    color: var(--error);
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent-primary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px 2px 0 0;
}

.tab-icon {
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    padding: 32px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* Table Header */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.table-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-input,
.text-input {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.text-input {
    min-width: 200px;
}

.text-input::placeholder {
    color: var(--text-muted);
}

.date-input:focus,
.text-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.date-separator {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Table */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
}

.data-table th {
    background: var(--bg-tertiary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table .mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.loading-row td {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

.loading-row span {
    display: block;
    margin-top: 12px;
}

/* Status Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.badge.error {
    background: var(--error-bg);
    color: var(--error);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Amount Display */
.amount-positive {
    color: var(--success);
    font-family: var(--font-mono);
}

.amount-negative {
    color: var(--error);
    font-family: var(--font-mono);
}

/* Highlight for amounts > $20 */
.amount-highlight {
    font-weight: 900;
    font-size: 1.1em;
    text-shadow: 0 0 8px currentColor;
}

/* Address Display */
.address {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* TX Link */
.tx-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.tx-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Address Highlight on Hover */
.address-hover {
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.address-highlighted {
    background: var(--accent-glow);
    box-shadow: 0 0 8px var(--accent-primary);
    color: var(--text-primary) !important;
}

/* Gains Cell */
.gains-cell {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Text Muted */
.text-muted {
    color: var(--text-muted);
}

/* Timestamp Cell - Clickable */
.timestamp-cell {
    cursor: pointer;
    transition: color 0.2s;
}

.timestamp-cell:hover {
    color: var(--accent-primary);
}

/* View Details Button */
.btn-view {
    padding: 6px 12px;
    background: var(--accent-glow);
    border: 1px solid var(--accent-secondary);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view:hover {
    background: var(--accent-secondary);
    color: var(--bg-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
}

#arb-page-info,
#mint-page-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Charts */
.stats-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.chart-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.stats-table-container {
    max-height: 400px;
    overflow-y: auto;
}

.stats-table-container .data-table {
    border-radius: 0;
}

/* Arb Details Grid */
.arb-details {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.arb-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.arb-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.arb-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.arb-detail-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.chart-container {
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    padding-top: 20px;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    gap: 3px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: all 0.3s;
    position: relative;
}

.chart-bar:hover {
    background: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-glow);
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.chart-bar:hover::after {
    opacity: 1;
}

/* Loader */
.loader {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Gains Modal Content */
#gains-content {
    margin-top: 24px;
}

.gains-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gain-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.gain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.gain-amount {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--success);
}

.gain-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.gain-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    font-size: 0.85rem;
}

.gain-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gain-detail-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.gain-detail-value {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    word-break: break-all;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-block-total {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .header-left {
        width: 100%;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .sol-price-widget {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .logo-icon {
        font-size: 28px;
    }
    
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .by-line {
        font-size: 0.7rem;
    }
    
    .description-banner {
        padding: 12px 16px;
    }
    
    .description-banner p {
        font-size: 0.8rem;
    }
    
    .stats-section {
        padding: 16px;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stats-block-total {
        grid-column: span 1;
    }
    
    .stats-block {
        padding: 14px;
    }
    
    .stats-block h3 {
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
    
    .stats-tiles {
        gap: 8px;
    }
    
    .stat-tile {
        min-width: 100%;
        padding: 12px;
    }
    
    .stat-tile-amount {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .table-header h2 {
        font-size: 1.1rem;
    }
    
    .table-controls {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .text-input {
        min-width: 100%;
    }
    
    .date-input {
        flex: 1;
        min-width: 0;
    }
    
    .table-container {
        overflow-x: auto;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .data-table {
        min-width: 600px;
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
    
    .tx-link {
        font-size: 0.7rem;
    }
    
    .gains-cell {
        font-size: 0.75rem;
    }
    
    .btn-view {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .pagination {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-content {
        padding: 24px 16px;
        margin: 16px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content.wide {
        max-width: 100%;
    }
    
    .arb-detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .gain-item {
        padding: 14px;
    }
    
    .gain-details {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
    
    .logo-text h1 {
        font-size: 0.95rem;
    }
    
    .connection-status {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .stats-section {
        padding: 12px;
    }
    
    .stats-block {
        padding: 12px;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .data-table {
        min-width: 500px;
    }
    
    .arb-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .gain-details {
        grid-template-columns: 1fr;
    }
}

