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

body {
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    font-family: 'Cascadia Mono', 'Consolas', 'Courier New', monospace;
}

#terminal-container {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#terminal-container.active {
    display: flex;
}

/* Let xterm.js determine the natural size from 120x30 @ fontSize 16.
   CSS transform scale (set by JS) shrinks it to fit smaller viewports. */
#terminal {
    flex-shrink: 0;
}

/* Loading screen */
#loading {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    color: #e0e0e0;
}

#loading.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

.loading-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.loading-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #aaa;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide scrollbars in xterm */
.xterm-viewport::-webkit-scrollbar {
    display: none;
}

.xterm-viewport {
    scrollbar-width: none;
}
