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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0A0E27 0%, #1A1F3A 100%);
    color: #FFFFFF;
    overflow-x: hidden;
    min-height: 100vh;
}

.space-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 70% 90%, white, transparent);
    background-size: 200% 200%;
    animation: twinkle 8s ease-in-out infinite;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

header {
    position: relative;
    z-index: 10;
    padding: 2rem;
    text-align: center;
    background: rgba(26, 31, 58, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
}

h1 {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #00F0FF;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.header-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
    color: #AAA;
}

.update-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #00FF88;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.controls-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: rgba(0, 240, 255, 0.2);
    border: 1px solid rgba(0, 240, 255, 0.5);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.controls-toggle:hover {
    background: rgba(0, 240, 255, 0.4);
    transform: scale(1.05);
}

.control-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 240, 255, 0.3);
    padding: 2rem;
    z-index: 1000;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.control-panel.visible {
    right: 0;
}

.control-panel h3 {
    margin-bottom: 1.5rem;
    color: #00F0FF;
    font-size: 1.5rem;
}

.control-section {
    margin-bottom: 1.5rem;
}

.control-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: #AAA;
    font-size: 0.9rem;
}

.control-section input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
}

.control-section select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: white;
    border-radius: 4px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.burst-btn, .share-btn {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #FF0420 0%, #FF8800 100%);
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn {
    background: linear-gradient(135deg, #00F0FF 0%, #0088FF 100%);
}

.burst-btn:hover, .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 4, 32, 0.5);
}

.share-btn:hover {
    box-shadow: 0 5px 20px rgba(0, 240, 255, 0.5);
}

.grid-container {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 2rem;
    max-width: 1800px;
    margin: 0 auto;
}

.blockchain-cell {
    position: relative;
    aspect-ratio: 1;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.blockchain-cell:hover {
    transform: scale(1.02);
    filter: brightness(1.2);
}

.cell-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
    pointer-events: none;
}

.chain-emoji {
    font-size: 1.5rem;
}

.chain-name {
    font-size: 0.9rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.cell-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
    font-size: 0.75rem;
    pointer-events: none;
}

.tx-count {
    font-weight: bold;
}

.tps-badge {
    padding: 0.25rem 0.5rem;
    background: rgba(0, 240, 255, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.4);
}

footer {
    position: relative;
    z-index: 10;
    padding: 2rem;
    text-align: center;
    background: rgba(26, 31, 58, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 240, 255, 0.3);
    margin-top: 2rem;
}

.attribution {
    margin-bottom: 1rem;
    color: #AAA;
}

.attribution a {
    color: #00F0FF;
    text-decoration: none;
}

.attribution a:hover {
    text-decoration: underline;
}

.easter-egg {
    cursor: pointer;
    transition: all 0.3s;
}

.easter-egg:hover {
    color: #FF1744;
    text-shadow: 0 0 10px #FF1744;
}

.footer-humor {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }

    .header-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
        gap: 0.5rem;
    }

    .control-panel {
        width: 100%;
        right: -100%;
    }

    .chain-name {
        font-size: 0.75rem;
    }

    .chain-emoji {
        font-size: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}