/* ================================
   Memory Test - Layout
   ================================ */
.memory-test-main {
    min-height: calc(100vh - 80px);
    background: var(--light);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1.5rem 4rem;
}

.memory-test-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.memory-test-header {
    padding: 2rem 2rem 1.75rem;
    background: linear-gradient(135deg, #5f27cd 0%, #a29bfe 100%);
    color: white;
    text-align: center;
}

.memory-test-header .game-icon { font-size: 3rem; margin-bottom: 0.4rem; }
.memory-test-header .game-title { font-size: 1.8rem; font-weight: 900; margin-bottom: 0.4rem; }
.memory-test-header .game-subtitle { font-size: 0.95rem; opacity: 0.9; }

.memory-test-body { padding: 1.75rem 2rem; display: flex; flex-direction: column; gap: 1rem; }

/* ================================
   Number Display
   ================================ */
.mt-number-box {
    font-size: 2.4rem;
    font-weight: 900;
    background: var(--dark);
    color: var(--accent);
    padding: 1.5rem 1rem;
    border-radius: 16px;
    text-align: center;
    letter-spacing: 8px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Righteous', cursive;
}

/* ================================
   Input
   ================================ */
.mt-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.4rem;
    text-align: center;
    box-sizing: border-box;
    font-family: 'Righteous', cursive;
    color: var(--dark);
    transition: border-color 0.2s;
    letter-spacing: 4px;
}

.mt-input:focus { outline: none; border-color: #5f27cd; }
.mt-input:disabled { background: var(--light); color: #aaa; }

/* ================================
   Buttons
   ================================ */
.mt-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.mt-btn-start { background: linear-gradient(135deg, #5f27cd 0%, #a29bfe 100%); }
.mt-btn-start:hover:not(:disabled) { opacity: 0.9; transform: scale(1.02); }
.mt-btn-submit { background: var(--primary); }
.mt-btn-submit:hover:not(:disabled) { background: var(--primary-dark); transform: scale(1.02); }
.mt-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* ================================
   Result
   ================================ */
.mt-result {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    display: none;
    line-height: 1.7;
    animation: scaleIn 0.3s ease-out;
}

.mt-result.correct { background: #f0fff8; color: #06D6A0; border: 2px solid #06D6A0; }
.mt-result.wrong { background: #fff0f3; color: var(--danger); border: 2px solid var(--danger); }

header .logo { text-decoration: none; color: white; }

.back-link {
    display: block;
    text-align: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding-top: 0.25rem;
    transition: color 0.2s;
}
.back-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* ================================
   Responsive
   ================================ */
@media (max-width: 480px) {
    .memory-test-main { padding: 1.5rem 0.75rem 3rem; }
    .memory-test-body { padding: 1.25rem 1rem; }
    .mt-number-box { font-size: 1.9rem; letter-spacing: 5px; }
}
