/* Global Reset & Typography */
:root {
    --bg-body: #0f172a;       /* Dark Blue/Slate Background */
    --bg-card: #1e293b;       /* Card Background */
    --bg-card-hover: #334155;
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-green: #10b981;  /* Success/Active */
    --accent-blue: #3b82f6;   /* Info/Link */
    --accent-purple: #8b5cf6; /* Rank/Special */
    --accent-gold: #f59e0b;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    
    /* Glow Colors */
    --glow-green: rgba(16, 185, 129, 0.4);
    --glow-blue: rgba(59, 130, 246, 0.4);
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.5;
    min-height: 100vh;
    padding: 20px;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08), transparent 25%);
    animation: bg-pulse 10s ease-in-out infinite alternate;
}

@keyframes bg-pulse {
    0% { background-position: 0% 0%; }
    100% { background-position: 10px 10px; }
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--accent-blue); text-shadow: 0 0 8px var(--glow-blue); }

/* 3D Canvas Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none; /* Let clicks pass through */
    opacity: 0.6; /* Subtle blend */
}

/* Layout & Container */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header Section */
.header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
    animation: scan-line 3s linear infinite;
}

@keyframes scan-line {
    0% { left: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.header-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.header-title p { color: var(--text-secondary); font-size: 0.9rem; }

.status-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

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

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Social Buttons */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-social svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}

.btn-social:hover {
    background: var(--bg-card-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-social:hover svg {
    transform: scale(1.1);
}

.x-social:hover {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.tg-social:hover {
    border-color: #229ED9;
    color: #229ED9;
    box-shadow: 0 0 15px rgba(34, 158, 217, 0.3);
}

/* Contract Address Box */
.address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

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

.ca-box {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    /* margin-bottom removed as it's handled by grid gap */
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ca-box:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.15), inset 0 0 10px rgba(59, 130, 246, 0.05);
}

.ca-box::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transition: 0.5s;
}

.ca-box:hover::before {
    left: 100%;
}

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

.ca-label { 
    font-weight: 700; 
    color: var(--accent-blue); 
    letter-spacing: 0.5px; 
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}
.ca-actions { display: flex; gap: 10px; }

.btn-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-action:hover {
    background: var(--bg-card-hover);
    color: #fff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.ca-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-primary);
    word-break: break-all;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    transition: border-color 0.3s;
}

.ca-box:hover .ca-value {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(15, 23, 42, 0.6);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
    pointer-events: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    transition: text-shadow 0.3s;
}

.stat-card:hover .stat-value {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.stat-value.green { 
    color: var(--accent-green); 
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.stat-card:hover .stat-value.green {
    text-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
}

.stat-value.blue { 
    color: var(--accent-blue); 
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}
.stat-card:hover .stat-value.blue {
    text-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}

.stat-sub { font-size: 0.8rem; color: var(--text-secondary); margin-top: 5px; }

/* Main Content Split */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .main-content { grid-template-columns: 1fr; }
}

/* Panel Styles */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 600px; /* Fixed height for dashboard feel */
    transition: box-shadow 0.3s;
}

.panel:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
}

.panel-title { 
    font-weight: 600; 
    font-size: 1rem; 
    color: var(--text-primary); 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.panel-badge { 
    background: rgba(59, 130, 246, 0.2); 
    color: #60a5fa; 
    font-size: 0.75rem; 
    padding: 2px 8px; 
    border-radius: 10px; 
    border: 1px solid rgba(59, 130, 246, 0.3);
    animation: pulse-border 2s infinite alternate;
}

@keyframes pulse-border {
    from { border-color: rgba(59, 130, 246, 0.3); box-shadow: 0 0 0 rgba(59, 130, 246, 0); }
    to { border-color: rgba(59, 130, 246, 0.8); box-shadow: 0 0 8px rgba(59, 130, 246, 0.3); }
}

.panel-body { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0; 
    background: linear-gradient(180deg, rgba(30, 41, 59, 0) 0%, rgba(30, 41, 59, 0.3) 100%);
}

/* Terminal Logs Style */
.log-list {
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.log-item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.2s;
    position: relative;
}

.log-item:hover { 
    background: rgba(59, 130, 246, 0.05); 
}

.log-item:hover::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
}

.log-time { color: var(--text-secondary); font-size: 0.8rem; min-width: 70px; opacity: 0.7; }
.log-status { 
    color: var(--accent-green); 
    font-weight: bold; 
    font-size: 0.8rem; 
    border: 1px solid rgba(16, 185, 129, 0.3); 
    padding: 2px 6px; 
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.05);
}

.log-content { flex: 1; color: #e2e8f0; }
.log-hash { color: var(--accent-blue); text-decoration: none; border-bottom: 1px dotted var(--accent-blue); }
.log-hash:hover { color: #60a5fa; border-bottom-style: solid; }
.log-amount { color: var(--accent-green); font-weight: bold; text-shadow: 0 0 5px rgba(16, 185, 129, 0.2); }

/* Leaderboard Table */
.whale-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.whale-table th { 
    text-align: left; 
    padding: 12px 20px; 
    color: var(--text-secondary); 
    font-weight: 500; 
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; background: var(--bg-card); z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.whale-table td { padding: 12px 20px; border-bottom: 1px solid rgba(51, 65, 85, 0.3); transition: background 0.2s; }
.whale-table tr:hover td { background: rgba(255,255,255,0.02); }

.whale-rank { font-weight: bold; width: 50px; text-align: center; }
.rank-icon { display: inline-block; width: 24px; text-align: center; filter: drop-shadow(0 0 2px rgba(255,255,0,0.5)); }
.whale-addr { font-family: var(--font-mono); color: var(--text-primary); }
.whale-pct { text-align: right; color: var(--accent-purple); font-weight: bold; text-shadow: 0 0 5px rgba(139, 92, 246, 0.3); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Utility */
.text-green { color: var(--accent-green); }
.text-muted { color: var(--text-secondary); }
.spinner { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }
