body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Space Grotesk', sans-serif;
    background-color: #020617;
    background-image: 
        linear-gradient(rgba(30, 41, 59, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.35) 1px, transparent 1px);
    background-size: 40px 40px;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background: radial-gradient(circle at center, transparent 0%, #020617 100%);
}

/* Smooth Modal Transitions (Fixed from display:none bug) */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: #0f172a;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 580px;
    width: 92%;
    max-height: 82vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.close-btn:hover {
    color: #f8fafc;
    border-color: #64748b;
}

.instruction {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: #64748b;
    pointer-events: none;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

.typing-cursor::after {
    content: '▋';
    animation: blink 1s step-end infinite;
    color: #22d3ee;
    margin-left: 6px;
    font-size: 0.85em;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Custom Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: #0f172a;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}
