/* ============================================
   TOKEN VEINS INTELLIGENCE
   Clean Modern Dark Theme
   ============================================ */

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

:root {
    /* Midnight Gradient Palette */
    --bg-primary: #0a0a14;
    --bg-secondary: #111827;
    --bg-card: #111827;
    --bg-card-hover: #1a1f35;
    --bg-stat: #0f1629;

    --border: rgba(139, 92, 246, 0.12);
    --border-hover: rgba(139, 92, 246, 0.25);
    --border-gradient: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(59,130,246,0.15));
    --border-gradient-hover: linear-gradient(135deg, rgba(139,92,246,0.5), rgba(59,130,246,0.3));

    --text-primary: #e8e8f0;
    --text-secondary: #9ca3af;
    --text-muted: #4b5563;
    --text-heading: #c4b5fd;

    /* Accent Colors */
    --accent: #8b5cf6;
    --accent-secondary: #6366f1;
    --accent-blue: #3b82f6;
    --accent-light: #a78bfa;
    --positive: #10b981;
    --negative: #ef4444;
    --warning: #f59e0b;

    /* RGB decomposed (for rgba() opacity variants) */
    --positive-rgb: 16, 185, 129;
    --negative-rgb: 239, 68, 68;
    --accent-rgb: 139, 92, 246;
    --accent-blue-rgb: 59, 130, 246;
    --warning-rgb: 245, 158, 11;

    /* Legacy aliases (for existing CSS that references these) */
    --cyan: #8b5cf6;
    --purple: #8b5cf6;
    --green: #10b981;
    --red: #ef4444;
    --orange: #f59e0b;

    /* Component tokens */
    --badge-bg: rgba(139, 92, 246, 0.12);
    --badge-color: #a78bfa;
    --btn-bg: rgba(139, 92, 246, 0.15);
    --btn-border: rgba(139, 92, 246, 0.3);
    --btn-bg-hover: rgba(139, 92, 246, 0.25);
    --card-glow: 0 0 20px rgba(139, 92, 246, 0.05);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition: 0.2s ease;
}

/* ============================================
   BASE
   ============================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Midnight gradient background with purple glow spots */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at 15% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 70%),
        var(--bg-primary);
}

/* Hide extra effects */
.bg-noise,
.grid-lines,
.particles-container,
.cursor-glow {
    display: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   HEADER
   ============================================ */

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

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

.logo-icon {
    font-size: 28px;
    color: var(--accent);
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
}

/* Header Navigation */
.header-nav {
    display: flex;
    gap: var(--space-lg);
    margin-left: var(--space-xl);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
    padding: var(--space-sm) 0;
    position: relative;
}

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

.nav-link.active {
    color: var(--accent);
}

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

@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
}

/* ============================================
   SEARCH
   ============================================ */

.search-container {
    display: flex;
    gap: var(--space-sm);
    flex: 1;
    max-width: 550px;
    margin: 0 var(--space-xl);
}

.search-container input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px var(--space-md);
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.search-container input:focus {
    border-color: var(--accent);
    background: var(--bg-secondary);
}

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

.search-container button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px var(--space-lg);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.search-container button:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.search-container button:active {
    transform: translateY(0);
}

/* ============================================
   STATUS
   ============================================ */

.header-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 12px;
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.online {
    background: var(--green);
}

.status-dot.offline {
    background: var(--red);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    padding: var(--space-2xl);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   WELCOME STATE
   ============================================ */

.welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.welcome-icon {
    font-size: 64px;
    color: var(--accent);
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

.welcome-state h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.welcome-state > p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: var(--space-2xl);
}

/* ============================================
   FEATURE CARDS
   ============================================ */

.welcome-features {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: default;
}

.feature:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.feature-icon {
    font-size: 20px;
}

/* ============================================
   LOADING STATE
   ============================================ */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: var(--space-lg);
}

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

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

.loading-state p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================
   TOKEN ANALYSIS
   ============================================ */

.token-analysis {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.token-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

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

.token-symbol {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.token-name {
    font-size: 15px;
    color: var(--text-secondary);
}

.token-mint {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'SF Mono', monospace;
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    display: inline-block;
    cursor: pointer;
    transition: var(--transition);
}

.token-mint:hover {
    color: var(--cyan);
}

.token-price-box {
    text-align: right;
}

.price-value {
    font-size: 32px;
    font-weight: 700;
}

.price-change {
    font-size: 16px;
    color: var(--green);
    font-weight: 600;
}

.price-change.negative {
    color: var(--red);
}

/* ============================================
   PLACEHOLDER SECTION
   ============================================ */

.placeholder-section {
    padding: var(--space-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.placeholder-section h2 {
    font-size: 22px;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
}

.placeholder-section p {
    color: var(--text-secondary);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

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

.card-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.card-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: var(--badge-bg);
    color: var(--badge-color);
    font-weight: 600;
}

.card-badge.live {
    background: rgba(16, 185, 129, 0.12);
    color: var(--positive);
}

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

/* ============================================
   STATS
   ============================================ */

.stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat:hover {
    border-color: var(--border-hover);
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
}

.stat-value.success { color: var(--positive); }
.stat-value.danger { color: var(--negative); }
.stat-value.warning { color: var(--warning); }
.stat-value.accent { color: var(--accent); }

/* ============================================
   GRIDS
   ============================================ */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

/* ============================================
   TV DESIGN SYSTEM — Unified Card Components
   ============================================ */

/* Card with gradient border */
.tv-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    position: relative;
    box-shadow: var(--card-glow);
    transition: border-color var(--transition);
}

.tv-card:hover {
    border-color: var(--border-hover);
}

/* Card header */
.tv-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Section title */
.tv-card-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-heading);
}

/* Badge */
.tv-badge {
    background: var(--badge-bg);
    color: var(--badge-color);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.tv-badge.positive {
    background: rgba(16, 185, 129, 0.12);
    color: var(--positive);
}

.tv-badge.negative {
    background: rgba(239, 68, 68, 0.12);
    color: var(--negative);
}

.tv-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

/* Button */
.tv-btn {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: var(--accent-light);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.tv-btn:hover {
    background: var(--btn-bg-hover);
}

.tv-btn-right {
    margin-left: auto;
}

.tv-btn.positive {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--positive);
}

.tv-btn.positive:hover {
    background: rgba(16, 185, 129, 0.25);
}

.tv-btn.negative {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--negative);
}

.tv-btn.negative:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Stat card */
.tv-stat-card {
    background: var(--bg-stat);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.tv-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.tv-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Stat value color modifiers */
.tv-stat-value.positive { color: var(--positive); }
.tv-stat-value.negative { color: var(--negative); }
.tv-stat-value.accent { color: var(--accent); }
.tv-stat-value.warning { color: var(--warning); }

/* Grid helpers */
.tv-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tv-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tv-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tv-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

@media (max-width: 1024px) {
    .tv-grid-4, .tv-grid-5 { grid-template-columns: repeat(2, 1fr); }
    .tv-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .tv-grid-2, .tv-grid-3, .tv-grid-4, .tv-grid-5 { grid-template-columns: 1fr; }
}

/* Input */
.tv-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
    transition: border-color var(--transition);
}

.tv-input:focus {
    border-color: var(--border-hover);
}

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

/* Select */
.tv-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

/* Table */
.tv-table {
    width: 100%;
    border-collapse: collapse;
}

.tv-table th {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.tv-table td {
    padding: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tv-table tr:hover td {
    background: rgba(var(--accent-rgb), 0.03);
}

/* Text utilities */
.tv-text-muted { color: var(--text-muted); }
.tv-text-sm { font-size: 12px; }
.tv-text-xs { font-size: 10px; }
.tv-text-positive { color: var(--positive); }
.tv-text-negative { color: var(--negative); }
.tv-text-accent { color: var(--accent); }

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-divider {
    margin: 0 var(--space-sm);
    opacity: 0.5;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-success { color: var(--positive); }
.text-danger { color: var(--negative); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-heading { color: var(--text-heading); }

.hidden { display: none !important; }

::selection {
    background: var(--accent);
    color: #fff;
}

/* ============================================
   AUTO-REFRESH CONTROLS
   ============================================ */

.refresh-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12px;
}

.refresh-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.refresh-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--cyan);
}

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

.refresh-select {
    padding: 4px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
}

.refresh-select:focus {
    outline: none;
    border-color: var(--cyan);
}

.last-updated {
    color: var(--text-muted);
    font-size: 11px;
}

.refresh-now-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-now-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.refresh-now-btn.spinning {
    animation: spin 0.5s linear;
}

/* ============================================
   VISUAL FEEDBACK ANIMATIONS
   ============================================ */

/* Pulse animation on data update */
@keyframes pulse-update {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.pulse-update {
    animation: pulse-update 0.5s ease-out;
}

/* Price flash animations */
@keyframes flash-green {
    0% { background-color: rgba(16, 185, 129, 0); }
    30% { background-color: rgba(16, 185, 129, 0.3); }
    100% { background-color: rgba(16, 185, 129, 0); }
}

@keyframes flash-red {
    0% { background-color: rgba(239, 68, 68, 0); }
    30% { background-color: rgba(239, 68, 68, 0.3); }
    100% { background-color: rgba(239, 68, 68, 0); }
}

.flash-green {
    animation: flash-green 0.6s ease-out;
}

.flash-red {
    animation: flash-red 0.6s ease-out;
}

/* Row hover slide effect */
.token-row,
.holding-row,
.swap-item,
.activity-item {
    position: relative;
}

.token-row::before,
.holding-row::before,
.swap-item::before,
.activity-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--cyan);
    opacity: 0;
    transition: width 0.2s ease, opacity 0.2s ease;
}

.token-row:hover::before,
.holding-row:hover::before,
.swap-item:hover::before,
.activity-item:hover::before {
    width: 3px;
    opacity: 1;
}

/* Button hover scale */
button:not(:disabled):hover,
.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

button:not(:disabled):active,
.btn:not(:disabled):active {
    transform: translateY(0);
}

/* Page transition fade in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section {
    animation: fadeIn 0.3s ease-out;
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-card-hover) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 16px;
    margin-bottom: var(--space-sm);
}

.skeleton-text.sm {
    height: 12px;
    width: 60%;
}

.skeleton-text.lg {
    height: 24px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.skeleton-card {
    height: 80px;
    border-radius: var(--radius-md);
}

/* ============================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ============================================ */

/* Touch-friendly elements */
button, .btn, a.link-btn, .tab-btn, .main-tab, .wallet-tab {
    min-height: 44px;
    min-width: 44px;
}

/* Mobile hamburger menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 200;
    flex-direction: column;
    padding: var(--space-xl);
}

.mobile-nav.visible {
    display: flex;
}

.mobile-nav-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    margin-bottom: var(--space-xl);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.mobile-nav-link:hover {
    background: var(--bg-card);
    color: var(--cyan);
}

/* Responsive tables to cards */
@media (max-width: 640px) {
    .tokens-table .tokens-header {
        display: none;
    }

    .token-row {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-md);
        border-radius: var(--radius-md);
        margin-bottom: var(--space-sm);
        background: var(--bg-card);
    }

    .token-row .token-info {
        width: 100%;
    }

    .token-row .token-rank {
        position: absolute;
        right: var(--space-md);
        top: var(--space-md);
        background: var(--bg-secondary);
        padding: 2px 8px;
        border-radius: var(--radius-sm);
        font-size: 11px;
    }

    .token-row > span:not(.token-rank):not(.token-info) {
        display: flex;
        justify-content: space-between;
        font-size: 13px;
    }

    .token-row > span::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 11px;
        text-transform: uppercase;
    }
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        gap: var(--space-md);
        padding: var(--space-md);
    }

    .header .logo {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-status {
        display: none;
    }

    .search-container {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .search-container input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .main-content {
        padding: var(--space-md);
    }

    .welcome-state h1 {
        font-size: 24px;
    }

    .welcome-features {
        flex-direction: column;
        width: 100%;
    }

    .feature {
        width: 100%;
        justify-content: center;
    }

    .token-header-section {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }

    .token-price-box {
        text-align: center;
    }

    /* Ensure buttons are touch-friendly */
    .search-container button {
        padding: var(--space-md);
        min-width: 80px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .main-content {
        padding: var(--space-sm);
    }

    .section {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .logo-text {
        font-size: 14px;
    }
}
