/* =====================================================
   SOLANA MEMES FACTORY — Custom Theme
   ===================================================== */

/* Solana gradient colors */
:root {
    --sol-purple: #9945FF;
    --sol-green: #14F195;
    --sol-blue: #00C2FF;
    --sol-dark: #0D1117;
    --sol-card-bg: rgba(153, 69, 255, 0.05);
    --sol-border: rgba(153, 69, 255, 0.2);
    --sol-glow: 0 0 20px rgba(153, 69, 255, 0.3);
}

/* Solana live dot */
.solana-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--sol-green);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--sol-green);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 4px var(--sol-green); }
    50% { box-shadow: 0 0 12px var(--sol-green), 0 0 20px var(--sol-green); }
}

/* ===================== Hero Banner ===================== */
.sol-hero-banner {
    background: linear-gradient(135deg, rgba(153,69,255,0.07) 0%, rgba(20,241,149,0.04) 60%, rgba(0,194,255,0.04) 100%);
    border: 1px solid var(--sol-border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.sol-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(153, 69, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.sol-hero-inner {
    padding: 40px;
    position: relative;
    z-index: 1;
}

.sol-hero-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(90deg, #9945FF, #14F195);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 12px;
}

.sol-hero-subtitle {
    color: #4B5563;
    font-size: 1rem;
    margin-bottom: 28px;
}

/* ===================== Wallet Connect Button ===================== */
.btn-sol-connect {
    background: linear-gradient(135deg, #9945FF, #14F195);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 50px;
    padding: 12px 32px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-sol-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(153, 69, 255, 0.5);
    color: #fff;
}

.btn-sol-connect.connected {
    background: linear-gradient(135deg, #14F195, #00C2FF);
}

.btn-sol-disconnect {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sol-disconnect:hover {
    border-color: #ff4d4d;
    color: #ff4d4d;
}

/* ===================== Stat Cards ===================== */
.sol-stat-card {
    background: linear-gradient(135deg, rgba(153,69,255,0.08), rgba(20,241,149,0.04));
    border: 1px solid var(--sol-border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sol-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(153,69,255,0.2), transparent 70%);
    border-radius: 50%;
    transform: translate(20px, -20px);
}

.sol-stat-card:hover {
    box-shadow: var(--sol-glow);
    transform: translateY(-2px);
    border-color: rgba(153,69,255,0.4);
}

.sol-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.sol-stat-icon.purple { background: rgba(153,69,255,0.2); color: var(--sol-purple); }
.sol-stat-icon.green { background: rgba(20,241,149,0.15); color: var(--sol-green); }
.sol-stat-icon.blue { background: rgba(0,194,255,0.15); color: var(--sol-blue); }
.sol-stat-icon.orange { background: rgba(255,159,41,0.15); color: #FF9F29; }

.sol-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bs-heading-color, #111827);
    line-height: 1;
    margin-bottom: 4px;
}

.sol-stat-label {
    font-size: 0.82rem;
    color: #6B7280;
    font-weight: 500;
    margin-bottom: 12px;
}

.sol-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.sol-stat-badge.up { background: rgba(20,241,149,0.15); color: #00c47a; }
.sol-stat-badge.down { background: rgba(255,77,77,0.12); color: #ff4d4d; }

/* ===================== Meme Token Cards ===================== */
.meme-token-card {
    background: var(--bs-white, #fff);
    border: 1px solid var(--bs-border-color, #E5E7EB);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.meme-token-card:hover {
    box-shadow: 0 8px 30px rgba(153,69,255,0.15);
    transform: translateY(-4px);
    border-color: var(--sol-border);
}

.meme-token-img-wrap {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(153,69,255,0.12), rgba(20,241,149,0.06));
    display: flex;
    align-items: center;
    justify-content: center;
}

.meme-token-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(153,69,255,0.4);
    box-shadow: 0 0 20px rgba(153,69,255,0.3);
}

.meme-token-img-fallback {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9945FF, #14F195);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    border: 3px solid rgba(255,255,255,0.2);
}

.meme-token-badge-hot {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6b35, #ff4d4d);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meme-token-badge-new {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #14F195, #00C2FF);
    color: #0D1117;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meme-token-body {
    padding: 16px;
}

.meme-token-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--bs-heading-color, #111827);
    margin-bottom: 2px;
}

.meme-token-symbol {
    font-size: 0.8rem;
    color: var(--sol-purple);
    font-weight: 600;
    margin-bottom: 12px;
}

.meme-token-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.meme-token-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-heading-color, #111827);
}

.meme-token-change.up { color: #00c47a; font-weight: 700; font-size: 0.9rem; }
.meme-token-change.down { color: #ff4d4d; font-weight: 700; font-size: 0.9rem; }

.meme-token-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9CA3AF;
    padding-top: 10px;
    border-top: 1px solid var(--bs-border-color, #F3F4F6);
    margin-top: 6px;
}

/* ===================== Wallet Analytics ===================== */
.wallet-card {
    background: linear-gradient(135deg, rgba(153,69,255,0.12) 0%, rgba(20,241,149,0.06) 100%);
    border: 1px solid var(--sol-border);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(153,69,255,0.15), transparent 70%);
    border-radius: 50%;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: #6B7280;
    word-break: break-all;
    background: rgba(153,69,255,0.06);
    border: 1px solid var(--sol-border);
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 20px;
}

.wallet-balance-label {
    color: #9CA3AF;
    font-size: 0.82rem;
    margin-bottom: 6px;
}

.wallet-balance-sol {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(90deg, #9945FF, #14F195);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.wallet-balance-usd {
    color: #6B7280;
    font-size: 1rem;
}

/* ===================== AI Recommendation Cards ===================== */
.ai-rec-card {
    border-radius: 16px;
    border: 1px solid var(--bs-border-color, #E5E7EB);
    padding: 20px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.ai-rec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.ai-rec-card.buy::before { background: var(--sol-green); }
.ai-rec-card.sell::before { background: #ff4d4d; }
.ai-rec-card.hold::before { background: #FF9F29; }
.ai-rec-card.watch::before { background: var(--sol-blue); }

.ai-rec-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.ai-rec-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.ai-rec-action.buy { background: rgba(20,241,149,0.15); color: #00c47a; }
.ai-rec-action.sell { background: rgba(255,77,77,0.12); color: #ff4d4d; }
.ai-rec-action.hold { background: rgba(255,159,41,0.12); color: #FF9F29; }
.ai-rec-action.watch { background: rgba(0,194,255,0.12); color: var(--sol-blue); }

.ai-confidence-bar {
    height: 6px;
    background: #F3F4F6;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.ai-confidence-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.ai-confidence-fill.high { background: linear-gradient(90deg, #14F195, #00C2FF); }
.ai-confidence-fill.medium { background: linear-gradient(90deg, #FF9F29, #ffcc00); }
.ai-confidence-fill.low { background: linear-gradient(90deg, #ff6b35, #ff4d4d); }

/* ===================== Trending Table ===================== */
.sol-table th {
    background: rgba(153,69,255,0.05);
    color: #6B7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--bs-border-color, #E5E7EB);
    padding: 12px 16px;
}

.sol-table td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--bs-border-color, #F9FAFB);
}

.sol-table tr:hover td {
    background: rgba(153,69,255,0.03);
}

.token-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(153,69,255,0.1);
    color: var(--sol-purple);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.token-logo-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(153,69,255,0.2);
}

.token-logo-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9945FF, #14F195);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

.price-up { color: #00c47a; font-weight: 600; }
.price-down { color: #ff4d4d; font-weight: 600; }

/* ===================== Loading Skeleton ===================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #2d2d2d 25%, #3d3d3d 50%, #2d2d2d 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===================== Section Headers ===================== */
.sol-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.sol-section-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9945FF, #14F195);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(153,69,255,0.5);
}

/* ===================== Wallet Token Holdings ===================== */
.holding-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--bs-border-color, #F3F4F6);
}

.holding-item:last-child { border-bottom: none; }

.holding-info { flex: 1; }
.holding-name { font-weight: 600; font-size: 0.9rem; color: var(--bs-heading-color, #111827); }
.holding-amount { font-size: 0.78rem; color: #9CA3AF; }
.holding-value { text-align: right; }
.holding-usd { font-weight: 700; font-size: 0.95rem; }
.holding-pnl { font-size: 0.78rem; }
.holding-pnl.up { color: #00c47a; }
.holding-pnl.down { color: #ff4d4d; }

/* ===================== Network Stats Banner ===================== */
.sol-network-ticker {
    background: linear-gradient(135deg, rgba(153,69,255,0.1), rgba(20,241,149,0.05));
    border: 1px solid var(--sol-border);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    overflow: hidden;
}

.sol-network-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.sol-network-label { color: #9CA3AF; }
.sol-network-value { font-weight: 600; }

/* ===================== Filter Tabs ===================== */
.sol-filter-tabs .nav-link {
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 18px;
    color: #6B7280;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.sol-filter-tabs .nav-link:hover {
    background: rgba(153,69,255,0.08);
    color: var(--sol-purple);
}

.sol-filter-tabs .nav-link.active {
    background: linear-gradient(135deg, #9945FF, #14F195);
    color: white;
    border-color: transparent;
}

/* ===================== Price Chart Widget ===================== */
.chart-label {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-bottom: 4px;
}

.chart-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--bs-heading-color, #111827);
    margin-bottom: 4px;
}

/* ===================== Wallet Connect Panel ===================== */
.wallet-connect-panel {
    text-align: center;
    padding: 60px 40px;
}

.wallet-connect-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, #9945FF, #14F195);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px rgba(153,69,255,0.4);
}

.wallet-connect-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.wallet-connect-desc {
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 28px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================== Loading Spinner Solana ===================== */
.sol-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(153,69,255,0.2);
    border-top-color: var(--sol-purple);
    border-radius: 50%;
    animation: sol-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes sol-spin {
    to { transform: rotate(360deg); }
}

/* ===================== Dark theme overrides ===================== */
[data-theme="dark"] .sol-stat-value,
[data-theme="dark"] .meme-token-name,
[data-theme="dark"] .meme-token-price,
[data-theme="dark"] .holding-name,
[data-theme="dark"] .wallet-connect-title,
[data-theme="dark"] .chart-value {
    color: #F9FAFB;
}

[data-theme="dark"] .sol-stat-card,
[data-theme="dark"] .meme-token-card,
[data-theme="dark"] .ai-rec-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .sol-table th { background: rgba(153,69,255,0.1); }
[data-theme="dark"] .sol-table tr:hover td { background: rgba(255,255,255,0.03); }

[data-theme="dark"] .meme-token-meta,
[data-theme="dark"] .holding-item { border-color: rgba(255,255,255,0.08); }

/* ===================== Pulsing live indicator ===================== */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--sol-green);
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sol-green);
    animation: pulse-green 2s infinite;
    display: inline-block;
}

/* =====================================================================
   ANIMATED PRICE TICKER
   ===================================================================== */
.smf-ticker-wrap {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0D0D1A 0%, #1a0533 100%);
    border-bottom: 1px solid rgba(153,69,255,0.25);
    height: 38px;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 999;
}

.smf-ticker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #14F195;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    border-right: 1px solid rgba(153,69,255,0.3);
    height: 100%;
    flex-shrink: 0;
    background: rgba(153,69,255,0.15);
}

.smf-ticker-overflow {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.smf-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: ticker-scroll 45s linear infinite;
    will-change: transform;
}

.smf-ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.smf-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    cursor: default;
}

.smf-ticker-item span:first-of-type {
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.smf-ticker-sep {
    color: rgba(153,69,255,0.4);
    font-size: 0.9rem;
    padding: 0 4px;
}

.badge-change {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 12px;
    display: inline-block;
}
.badge-change.up   { background: rgba(20,241,149,0.15); color: #14F195; }
.badge-change.down { background: rgba(255,77,77,0.15);  color: #ff4d4d; }

/* =====================================================================
   CSS LOGO — No SVG file needed
   ===================================================================== */
.smf-logo-link {
    text-decoration: none !important;
    display: flex;
    align-items: center;
}

.smf-logo-full {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

/* Hide full logo when sidebar is collapsed (sidebar-toggle adds .active to .sidebar) */
.sidebar.active .smf-logo-full { display: none !important; }
.sidebar.active .smf-logo-icon-only { display: flex !important; }

/* Default: icon-only hidden, full shown */
.smf-logo-icon-only { display: none; }

.smf-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #9945FF, #14F195);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(153,69,255,0.4);
}

.smf-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.smf-logo-top {
    font-size: 0.65rem;
    font-weight: 600;
    color: #9945FF;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.smf-logo-bot {
    font-size: 0.95rem;
    font-weight: 800;
    background: linear-gradient(90deg, #9945FF, #14F195);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* =====================================================================
   NAVBAR SOL PRICE BADGE
   ===================================================================== */
.navbar-sol-price {
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(153,69,255,0.1), rgba(20,241,149,0.05));
    border: 1px solid rgba(153,69,255,0.2);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 0.8rem;
}

.sol-price-text {
    font-weight: 700;
    color: #9945FF;
}

.sol-price-val {
    font-weight: 700;
    color: var(--bs-heading-color, #111827);
}

.sol-price-change {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Compact wallet button for navbar */
.btn-sol-connect-sm {
    padding: 8px 18px !important;
    font-size: 0.82rem !important;
}

[data-theme="dark"] .navbar-sol-price {
    background: rgba(153,69,255,0.15);
    border-color: rgba(153,69,255,0.3);
}
[data-theme="dark"] .sol-price-val { color: #F9FAFB; }

/* =====================================================================
   MOBILE RESPONSIVENESS — Complete overhaul
   ===================================================================== */

/* ── Extra small: phones ≤575px ───────────────────────────────── */
@media (max-width: 575px) {
    /* Hero */
    .sol-hero-inner         { padding: 20px 16px; }
    .sol-hero-title         { font-size: 1.25rem; }
    .sol-hero-subtitle      { font-size: 0.85rem; margin-bottom: 18px; }
    .sol-hero-inner .d-flex.gap-12 { flex-direction: column; align-items: flex-start; }
    .sol-hero-banner .col-lg-5 { display: none !important; }
    /* make hero stats row scrollable */
    .sol-hero-inner .d-flex.align-items-center.gap-24 { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 4px; }

    /* Network ticker — show only 3 most important items */
    .sol-network-item:nth-child(n+4) { display: none !important; }
    .sol-network-ticker { gap: 10px 16px; padding: 10px 14px; }
    .sol-network-item   { font-size: 0.78rem; }

    /* Stat cards */
    .sol-stat-value         { font-size: 1.25rem; }
    .sol-stat-card          { padding: 16px; }
    .col-xxl-3.col-sm-6    { flex: 0 0 50%; max-width: 50%; }

    /* Stats grid (index.php network stats bar → 2 cols) */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

    /* Connect button */
    .btn-sol-connect { padding: 10px 18px; font-size: 0.85rem; }

    /* Wallet connect panel */
    .wallet-connect-panel { padding: 32px 16px; }
    .wallet-connect-title { font-size: 1.2rem; }
    .wallet-connect-desc  { font-size: 0.85rem; }
    .wallet-connect-icon  { width: 64px; height: 64px; font-size: 1.8rem; border-radius: 18px; }

    /* Tables */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .sol-table td, .sol-table th { padding: 9px 10px; font-size: 0.76rem; }

    /* AI cards */
    .ai-rec-card { padding: 14px; }

    /* Ticker */
    .smf-ticker-wrap  { height: 34px; }
    .smf-ticker-item  { padding: 0 10px; font-size: 0.72rem; }
    .smf-ticker-track { animation-duration: 35s; }

    /* Wallet card */
    .wallet-card { padding: 16px; }
    .wallet-balance-sol { font-size: 1.8rem; }
    .wallet-address { font-size: 0.72rem; }

    /* Meme token cards */
    .meme-token-img-wrap { height: 130px; }
    .meme-token-img { width: 70px; height: 70px; }
    .meme-token-img-fallback { width: 70px; height: 70px; font-size: 1.5rem; }
    .meme-token-name { font-size: 0.9rem; }
    .meme-token-price { font-size: 1rem; }
    .meme-token-body { padding: 12px; }
}

/* ── Small: tablets ≤767px ────────────────────────────────────── */
@media (max-width: 767px) {
    /* Meme cards: 2 per row */
    .col-xxl-3.col-lg-4.col-sm-6 { flex: 0 0 50%; max-width: 50%; }

    /* Charts full width */
    .col-xxl-8, .col-xxl-4 { flex: 0 0 100%; max-width: 100%; }

    /* Navbar SOL price badge */
    .navbar-sol-price { display: none !important; }

    /* Ticker animation slower */
    .smf-ticker-track { animation-duration: 50s; }

    /* Stats grid: 2 columns on tablets */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Table hide less critical columns via utility class */
    .sol-table .d-none-mobile { display: none !important; }

    /* wallet-analytics not-connected feature cards */
    .wallet-notconn-features .col-4 { flex: 0 0 100%; max-width: 100%; }
    .wallet-notconn-features { max-width: 100% !important; }

    /* wallet overview stats: 2 per row on small tablets */
    .wallet-overview-stat.col-sm-3 { flex: 0 0 50%; max-width: 50%; }

    /* Hero title */
    .sol-hero-title { font-size: 1.5rem; }

    /* Stack network ticker items */
    .sol-network-ticker { flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; }
    .sol-network-item:nth-child(n+5) { display: none; }
}

/* ── Medium: small laptops ≤991px ────────────────────────────── */
@media (max-width: 991px) {
    .sol-hero-title     { font-size: 1.6rem; }
    .wallet-card        { padding: 20px; }
    .wallet-balance-sol { font-size: 2rem; }

    /* Sidebar widgets stack */
    .col-xxl-4 .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }

    /* Stat grid: keep 2 cols */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Touch-friendly tap targets ───────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    .btn-sol-connect,
    .gen-btn,
    .frame-nav-item,
    .nav-link,
    .meme-token-card { -webkit-tap-highlight-color: transparent; }

    /* Bigger tap zones */
    .sol-filter-tabs .nav-link { padding: 8px 16px; min-height: 40px; }
    .sol-table td, .sol-table th { min-height: 48px; }
}

/* =====================================================================
   CARD HOVER GLOW EFFECTS
   ===================================================================== */
.sol-stat-card:hover .sol-stat-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.meme-token-card:hover .meme-token-img {
    box-shadow: 0 0 30px rgba(153,69,255,0.6);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.meme-token-img {
    transition: all 0.3s ease;
}

/* =====================================================================
   DARK THEME EXTRAS
   ===================================================================== */
[data-theme="dark"] .smf-ticker-wrap {
    background: linear-gradient(135deg, #080812 0%, #120225 100%);
    border-color: rgba(153,69,255,0.3);
}

[data-theme="dark"] .smf-logo-bot {
    background: linear-gradient(90deg, #b06dff, #14F195);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================================
   WALLET CONNECT PANEL — Large variant (wallet-analytics page)
   ===================================================================== */
.wallet-connect-panel-lg  { padding: 60px 40px; }
.wallet-connect-icon-lg   { width: 100px; height: 100px; border-radius: 30px; font-size: 2.8rem; }
.wallet-connect-title-lg  { font-size: 1.8rem; }
.btn-sol-connect-lg       { padding: 16px 48px; font-size: 1.05rem; }

@media (max-width: 767px) {
    .wallet-connect-panel-lg  { padding: 40px 20px; }
    .wallet-connect-icon-lg   { width: 76px; height: 76px; border-radius: 22px; font-size: 2.2rem; }
    .wallet-connect-title-lg  { font-size: 1.4rem; }
    .btn-sol-connect-lg       { padding: 14px 32px; font-size: 0.95rem; }
}

@media (max-width: 575px) {
    .wallet-connect-panel-lg  { padding: 28px 16px; }
    .wallet-connect-icon-lg   { width: 64px; height: 64px; border-radius: 18px; font-size: 1.8rem; }
    .wallet-connect-title-lg  { font-size: 1.2rem; }
    .btn-sol-connect-lg       { padding: 12px 24px; font-size: 0.9rem; width: 100%; justify-content: center; }
    .wallet-notconn-features  { max-width: 100% !important; }
}

/* =====================================================================
   SIDEBAR MOBILE — z-index over ticker
   ===================================================================== */
/*
 * On mobile the sidebar opens as a fixed overlay.
 * smf-ticker-wrap has z-index:999 (sticky inside main).
 * We must give the sidebar + its overlay a higher z-index
 * so the logo is NOT covered by the ticker strip.
 */
@media (max-width: 1199px) {
    /* Sidebar panel itself */
    .sidebar {
        z-index: 1100 !important;
    }
    /* Dark overlay that appears behind the open sidebar */
    .sidebar-overlay,
    .overlay,
    .body-overlay {
        z-index: 1099 !important;
    }
}

/* =====================================================================
   FOOTER MOBILE
   ===================================================================== */
.d-footer {
    padding: 16px 24px;
}
@media (max-width: 767px) {
    .d-footer { padding: 16px; }
    .d-footer .row { text-align: center; }
    .d-footer p { font-size: 0.82rem; line-height: 1.6; }
}
@media (max-width: 575px) {
    .d-footer { padding: 14px 12px; }
    .d-footer p { font-size: 0.78rem; }
}

/* =====================================================================
   CARD BODY PADDING — mobile
   ===================================================================== */
@media (max-width: 575px) {
    .card-body { padding: 14px; }
    .card-header { padding: 12px 14px; }
    .card-body.p-0 { padding: 0 !important; }
}

/* =====================================================================
   HERO STATS — hide dividers, scroll on mobile
   ===================================================================== */
@media (max-width: 767px) {
    /* Hide the vertical dividers in hero stats */
    .sol-hero-inner [style*="width:1px"] { display: none !important; }
    /* Let stats wrap into a 3-col grid */
    .sol-hero-inner .d-flex.align-items-center.gap-24 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-top: 16px !important;
    }
    .sol-hero-inner .d-flex.align-items-center.gap-24 > div {
        text-align: center;
    }
    .sol-hero-inner .d-flex.align-items-center.gap-24 > div > div:first-child {
        font-size: 1.1rem !important;
    }
    .sol-hero-inner .d-flex.align-items-center.gap-24 > div > div:last-child {
        font-size: 0.7rem !important;
    }
    /* Stack Connect + Trending buttons vertically on mobile */
    .sol-hero-inner .d-flex.align-items-center.flex-wrap.gap-12 {
        flex-direction: column;
        align-items: stretch !important;
    }
    .sol-hero-inner .d-flex.align-items-center.flex-wrap.gap-12 .btn-sol-connect {
        justify-content: center;
    }
}

/* =====================================================================
   NETWORK TICKER — strip ms-auto on mobile
   ===================================================================== */
@media (max-width: 767px) {
    .sol-network-ticker .sol-network-item.ms-auto { margin-left: 0 !important; }
    .sol-network-ticker { justify-content: flex-start; }
}

/* =====================================================================
   PAGE HEADER — compact on mobile
   ===================================================================== */
@media (max-width: 575px) {
    /* Shorten the Connect Wallet button text area */
    .btn-sol-connect iconify-icon { flex-shrink: 0; }
    /* Page header actions */
    .dashboard-main-body > .d-flex:first-child .btn-sol-connect {
        padding: 9px 16px;
        font-size: 0.8rem;
    }
    /* Live indicator */
    .live-indicator { font-size: 0.7rem; }
}

/* =====================================================================
   STAT CARD SPARKLINES — don't overflow
   ===================================================================== */
@media (max-width: 575px) {
    #spark1, #spark2, #spark3, #spark4 { max-width: 80px; overflow: hidden; }
    .sol-stat-card { overflow: hidden; }
    .sol-stat-card .d-flex.align-items-start { gap: 4px; }
}

/* =====================================================================
   WALLET CONNECT PANEL — index.php sidebar version
   ===================================================================== */
@media (max-width: 575px) {
    .wallet-connect-panel { padding: 28px 16px !important; }
    .wallet-connect-panel .d-flex.align-items-center.justify-content-center.gap-2 {
        gap: 6px !important;
    }
    .wallet-connect-panel .badge { font-size: 0.68rem !important; padding: 2px 8px !important; }
}

/* =====================================================================
   TABLE COLUMN VISIBILITY HELPERS
   ===================================================================== */
/* d-none-mobile = hide on < 768px */
@media (max-width: 767px) {
    .d-none-mobile { display: none !important; }
}
/* d-md-table-cell = show only from md+ */
@media (max-width: 767px) {
    .d-none.d-md-table-cell { display: none !important; }
}
/* d-sm-table-cell = show only from sm+ (576px) */
@media (max-width: 575px) {
    .d-none.d-sm-table-cell { display: none !important; }
}
@media (min-width: 576px) {
    .d-none.d-sm-table-cell { display: table-cell !important; }
}
/* d-lg-table-cell = show only from lg+ (992px) */
@media (max-width: 991px) {
    .d-none.d-lg-table-cell { display: none !important; }
}
@media (min-width: 992px) {
    .d-none.d-lg-table-cell { display: table-cell !important; }
}

/* =====================================================================
   CHART HEADER — wrap gracefully
   ===================================================================== */
@media (max-width: 575px) {
    .card-header .sol-section-header h6 { font-size: 0.88rem; }
    .card-header select.form-select-sm { font-size: 0.75rem; padding: 3px 8px; }
    .chart-value { font-size: 1.1rem; }
    .chart-label { font-size: 0.7rem; }
}

/* =====================================================================
   AI REC CARD — mobile padding
   ===================================================================== */
@media (max-width: 575px) {
    .ai-rec-card { padding: 12px 14px; margin-left: 6px; }
    .ai-rec-card::before { border-radius: 0 4px 4px 0; }
}

/* =====================================================================
   RESPONSIVE ORIGINAL
   ===================================================================== */
@media (max-width: 576px) {
    .sol-hero-inner { padding: 24px; }
    .sol-hero-title { font-size: 1.4rem; }
    .wallet-connect-panel { padding: 40px 20px; }
    .sol-network-ticker { gap: 14px; }
}
