/* ===========================
   Memory Flash — Base Layout
   =========================== */

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 1rem;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Full-screen overlay base */
.screen {
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 200;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.screen-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.screen-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
    max-width: 300px;
    line-height: 1.5;
}

/* Responsive */
@media (max-height: 650px) {
    .container {
        gap: 0.6rem;
    }

    .display-area {
        padding: 1rem 0.75rem;
        min-height: 95px;
    }

    .number-display {
        font-size: 2rem;
    }

    .key {
        font-size: 1.25rem;
        aspect-ratio: 1.5;
    }
}