* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00ff88;
    --primary-dark: #00cc6a;
    --primary-glow: rgba(0, 255, 136, 0.3);
    --bg: #050505;
    --bg-card: rgba(15, 15, 15, 0.8);
    --bg-glass: rgba(20, 20, 20, 0.6);
    --text: #ffffff;
    --text-muted: #666;
    --border: rgba(255, 255, 255, 0.08);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loadingCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.loading-logo {
    font-size: 80px;
    animation: float 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px var(--primary));
}

.loading-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 8px;
    margin-top: 20px;
    text-shadow: 0 0 40px var(--primary-glow);
}

.loading-sub {
    color: var(--text-muted);
    margin-top: 15px;
    font-size: 1rem;
    letter-spacing: 2px;
}

.loading-bar {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    margin: 30px auto 0;
    overflow: hidden;
}

.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    animation: loadingBar 2.5s ease-out forwards;
}

@keyframes loadingBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Body & Background */
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -2;
}

.bg-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, var(--primary-glow) 0%, transparent 50%);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-3d {
    position: relative;
}

.logo-door {
    font-size: 42px;
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

.logo-img {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    filter: drop-shadow(0 0 25px var(--primary-glow));
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--primary);
    filter: blur(25px);
    opacity: 0.4;
    border-radius: 50%;
}

.logo h1 {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 3px;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    background: var(--bg-glass);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    transition: all 0.3s;
}

.status-badge.online .status-dot {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 15px var(--primary); }
    50% { box-shadow: 0 0 25px var(--primary); }
}

.status-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 70px;
    padding: 40px 0;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.05));
    border: 1px solid var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 25px;
}

.hero h2 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 35px;
    line-height: 1.7;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    padding: 25px 50px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.hero-stat-divider {
    width: 1px;
    height: 50px;
    background: var(--border);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 50px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.95));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card:hover {
    border-color: rgba(0, 255, 136, 0.25);
    transform: translateY(-2px);
}

.stat-card.main-stat {
    grid-column: span 2;
    background: linear-gradient(145deg, rgba(0, 40, 20, 0.7), rgba(10, 10, 10, 0.95));
    border-color: rgba(0, 255, 136, 0.4);
}

.stat-card.ca-card {
    grid-column: 1 / -1;
    padding: 20px 24px;
}

.stat-label {
    color: #555;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.stat-value.green {
    color: var(--primary);
}

.stat-value.small {
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    word-break: break-all;
    cursor: pointer;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    transition: all 0.2s;
    border: 1px solid var(--border);
    color: #888;
}

.stat-value.small:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.03);
    color: var(--text);
}

.main-stat .stat-value {
    font-size: 3rem;
    color: var(--primary);
}

.stat-sub {
    color: #444;
    font-size: 0.75rem;
    margin-top: 6px;
    font-weight: 500;
}

/* Glass Card */
.glass-card {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    backdrop-filter: blur(15px);
}

/* Chart Section */
.chart-section {
    padding: 35px;
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.chart-container {
    height: 300px;
}

/* CTA Section */
.cta-section {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 50, 25, 0.9), rgba(10, 10, 10, 0.95));
    border: 1px solid var(--primary);
    border-radius: 25px;
    padding: 70px 50px;
    margin-bottom: 50px;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.15;
}

.cta-content {
    position: relative;
    text-align: center;
    z-index: 1;
}

.cta-section h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.cta-section p {
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary);
    color: var(--bg);
    padding: 18px 40px;
    border-radius: 15px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px var(--primary-glow);
}

.cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 50px var(--primary-glow);
}

.btn-arrow {
    transition: transform 0.3s;
}

.cta-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.info-card {
    padding: 35px;
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.info-card h3 {
    margin-bottom: 18px;
    font-size: 1.3rem;
    font-weight: 700;
}

.info-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.info-card ul {
    list-style: none;
    color: var(--text-muted);
    font-size: 1rem;
}

.info-card li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
}

.info-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* TX Section */
.tx-section {
    padding: 35px;
    margin-bottom: 50px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.tx-list {
    max-height: 380px;
    overflow-y: auto;
}

.tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.tx-item:hover {
    border-color: var(--border);
    background: rgba(0, 255, 136, 0.03);
}

.tx-sig {
    color: var(--text);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
}

.tx-sig a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.tx-sig a:hover {
    color: var(--primary);
}

.tx-amount {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.tx-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.tx-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tx-empty-icon {
    font-size: 2rem;
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links span {
    color: var(--border);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Responsive */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-card.main-stat {
        grid-column: span 2;
    }
    .info-section {
        grid-template-columns: 1fr;
    }
    .hero h2 {
        font-size: 2.5rem;
    }
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        padding: 30px 40px;
    }
    .hero-stat-divider {
        width: 50px;
        height: 1px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-card.main-stat {
        grid-column: span 1;
    }
    header {
        flex-direction: column;
        gap: 25px;
    }
    .hero h2 {
        font-size: 2rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    .cta-section {
        padding: 50px 25px;
    }
    .loading-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }
}
