/* MemeCore Theme Variables */
:root {
    --bg-dark: #120a2e;
    --bg-card: rgba(28, 20, 56, 0.85);
    --primary: #6d28d9;
    --primary-light: #8b5cf6;
    --accent: #00f0ff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-main: #ffffff;
    --text-muted: #a78bfa;
    --border-color: #4c1d95;
    
    --font-pixel: 'Press Start 2P', cursive;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 40px; 
}

/* Background Effects */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 0;
}

/* Network Ticker Bar */
.network-ticker-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid var(--accent);
    z-index: 2000;
    display: flex;
    align-items: center;
    overflow: visible; 
    font-family: 'Courier New', monospace;
}

/* Block Progress Bar */
.block-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.2), rgba(0, 240, 255, 0.4)); 
    width: 0%; 
    z-index: 0;
}

.ticker-content {
    display: flex;
    gap: 20px;
    padding: 0 20px;
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    animation: slideIn 0.5s ease-out;
    z-index: 1; 
    position: relative;
}

.ticker-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.ticker-label {
    margin-right: 6px;
    font-weight: bold;
    color: var(--primary-light);
}

.ticker-value {
    color: var(--success);
    font-weight: bold;
    font-family: monospace;
}

.highlight-item .ticker-value {
    color: var(--accent);
    text-shadow: 0 0 5px var(--accent);
}

.ticker-unit {
    color: var(--text-muted);
    font-size: 10px;
    margin-left: 2px;
}

/* TOOLTIP STYLES */
.tooltip-container {
    cursor: help;
    position: relative; 
}

.tooltip-wrapper {
    position: absolute;
    top: 100%; 
    left: 50%;
    transform: translateX(-50%);
    padding-top: 10px; 
    display: none; 
    z-index: 3000; 
}

.tooltip-text {
    display: block;
    background-color: rgba(10, 10, 30, 0.98);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    border: 1px solid var(--accent);
    font-size: 10px;
    font-family: var(--font-body);
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    line-height: 1.4;
}

.tooltip-container:hover .tooltip-wrapper {
    display: block;
    animation: fadeInTooltip 0.2s ease-in-out;
}

@keyframes fadeInTooltip {
    from { opacity: 0; transform: translateX(-50%) translateY(-5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.updated {
    animation: flash-green 0.5s ease;
}

@keyframes flash-green {
    0% { color: #fff; text-shadow: 0 0 10px #fff; }
    50% { color: var(--success); text-shadow: 0 0 5px var(--success); }
    100% { color: var(--success); }
}

.app-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    z-index: 1;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    gap: 16px;
    text-align: center;
}

.brand-logo-text {
    font-family: var(--font-pixel);
    font-size: 28px;
    color: var(--text-main);
    text-shadow: 4px 4px 0px #4c1d95;
    letter-spacing: 2px;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn {
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.btn-pixel {
    box-shadow: 
        inset 2px 2px 0px 0px rgba(255,255,255,0.2),
        inset -2px -2px 0px 0px rgba(0,0,0,0.4),
        4px 4px 0px 0px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.1);
}

.btn-pixel:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--border-color); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.wallet-connect-group { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-phantom { background: #512da8; color: #fff; font-size: 12px; padding: 8px 16px; }
.btn-metamask { background: #e67e22; color: #fff; font-size: 12px; padding: 8px 16px; }

.tabs {
    display: flex;
    background: rgba(0,0,0,0.3);
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px;
    font-family: var(--font-pixel);
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(109, 40, 217, 0.4);
}

.bridge-direction-toggle {
    display: flex;
    background: rgba(0,0,0,0.5);
    border-radius: 6px;
    padding: 4px;
    margin-bottom: 12px;
}

.direction-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.direction-btn.active {
    background: rgba(255,255,255,0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.panel { display: none; animation: fadeIn 0.3s ease; }
.panel.active { display: block; }

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.pixel-border {
    border: 2px solid var(--border-color);
    box-shadow: 0 0 15px rgba(109, 40, 217, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px dashed rgba(255,255,255,0.1);
    padding-bottom: 12px;
}

.card-title {
    font-family: var(--font-pixel);
    font-size: 14px;
    margin: 0;
    color: var(--accent);
}

.badge {
    font-size: 10px;
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.input-group { margin-bottom: 20px; }

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.balance-display {
    font-size: 11px;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.btn-max {
    background: var(--accent);
    border: none;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 2px;
    margin-left: 6px;
    cursor: pointer;
}
.btn-max:hover { opacity: 0.8; }

.pixel-input {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 2px solid var(--border-color);
    color: white;
    padding: 14px;
    font-family: 'Inter', monospace;
    font-size: 16px;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.pixel-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn-block { width: 100%; font-size: 16px; padding: 16px; font-family: var(--font-pixel); }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.stat-label { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 700; font-family: monospace; }
.stat-sub { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.reward-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.reward-amount { font-size: 24px; font-family: monospace; color: var(--success); }
.reward-amount .currency { font-size: 14px; color: var(--text-muted); }

.action-buttons {
    display: flex;
    gap: 10px;
}
.action-buttons button { flex: 1; }

.contract-info {
    text-align: center;
    font-size: 10px;
    color: rgba(255,255,255,0.2);
    margin-top: 20px;
    font-family: monospace;
}

.text-link {
    background: none;
    border: none;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--bg-dark);
    width: 90%;
    max-width: 400px;
    padding: 40px 20px;
    text-align: center;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px var(--primary);
}

.loader-animation {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.ant-spinner {
    width: 120px;
    height: auto;
    display: block;
    image-rendering: pixelated;
}

#modal-title {
    font-family: var(--font-pixel);
    color: var(--accent);
    margin-bottom: 10px;
}

#modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-step {
    font-size: 12px;
    color: white;
    background: rgba(255,255,255,0.1);
    padding: 8px;
    border-radius: 4px;
}

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