/* ===========================================================================
   K53 Memos — Auth, Account, Paywall, and Memo Quiz styles
   ========================================================================= */

/* ---- Auth / form styles (login, signup, forgot, reset) ----------------- */

.auth-card {
    max-width: 440px;
    margin: 24px auto;
    padding: 32px 28px;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.auth-card__title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}
.auth-card__sub {
    color: #666;
    font-size: 14px;
    margin: 0 0 24px;
}
.auth-form .form-group { margin-bottom: 16px; }
.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 540px) { .auth-form .form-row { grid-template-columns: 1fr 1fr; } }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    line-height: 1.4;
    border: 1.5px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: #CC0000;
    box-shadow: 0 0 0 3px rgba(204,0,0,0.12);
}
.form-input.is-error { border-color: #E24B4A; }
.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}
.form-err {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #c0392b;
    font-weight: 500;
}
.btn-block { display: block; width: 100%; text-align: center; }
.btn-ghost {
    background: transparent;
    color: #555;
    border: 1.5px solid #ddd;
}
.btn-ghost:hover { background: #f7f7f7; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.auth-error {
    background: #fdeaea;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 16px;
}
.auth-success {
    background: #e8f8f2;
    border: 1px solid #1D9E75;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #0F6E56;
    margin-bottom: 16px;
}
.auth-card__alt {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: #777;
}
.auth-card__alt a { color: #CC0000; font-weight: 500; }

/* ---- Account page ----------------------------------------------------- */

.account-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
}
@media (min-width: 720px) { .account-grid { grid-template-columns: 1fr 1fr; } }
.account-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 24px;
}
.account-card__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
}
.account-card__status {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
}
.status-active   { color: #0F6E56; }
.status-pending  { color: #92400E; }
.status-inactive { color: #888; }
.account-card__meta { color: #666; font-size: 14px; margin: 4px 0; }
.account-card__actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- /memos paywall card --------------------------------------------- */

.paywall-card {
    background: #fff;
    border: 2px solid #CC0000;
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}
.paywall-card__price {
    font-size: 56px;
    font-weight: 900;
    color: #CC0000;
    letter-spacing: -0.04em;
    line-height: 1;
}
.paywall-card__period {
    font-size: 14px;
    color: #777;
    margin-bottom: 24px;
}
.paywall-card__title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 16px;
}
.paywall-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    text-align: left;
}
.paywall-card__features li {
    font-size: 14px;
    color: #444;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.paywall-card__features li:last-child { border-bottom: none; }
.paywall-card__note {
    font-size: 12px;
    color: #888;
    margin: 12px 0 0;
}
.faq details {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}
.faq summary {
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #1a1a1a;
}
.faq details[open] summary { color: #CC0000; }
.faq p { font-size: 13px; color: #555; line-height: 1.6; margin: 8px 0 0; }

/* ---- /memos member hub ------------------------------------------------ */

.memo-modes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0 0;
}
@media (min-width: 640px) { .memo-modes-grid { grid-template-columns: repeat(3, 1fr); } }

.memo-mode-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid #ebebeb;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #1a1a1a;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.memo-mode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #CC0000;
}
.memo-mode-card--featured {
    background: linear-gradient(135deg, #fff 0%, #fff8f8 100%);
    border-color: #CC0000;
}
.memo-mode-card__icon { font-size: 28px; margin-bottom: 8px; }
.memo-mode-card__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
}
.memo-mode-card__desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px;
}
.memo-mode-card__meta {
    margin-top: auto;
    font-size: 12px;
    font-weight: 600;
    color: #CC0000;
}

.memo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.memo-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 8px;
}
.memo-item__icon {
    font-size: 22px;
    flex-shrink: 0;
}
.memo-item__body { flex: 1; min-width: 0; }
.memo-item__title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}
.memo-item__meta {
    font-size: 12px;
    color: #888;
    margin: 2px 0 0;
}

/* ===========================================================================
   Memo Quiz (/memos/quiz) — Modern Design
   =========================================================================== */

/* ── Header ─────────────────────────────────────────────── */
.mq-header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1.5px solid #eee;
    margin-bottom: 24px;
}
.mq-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 16px;
    text-align: center;
}
.mq-timer {
    display: block;
    width: fit-content;
    margin: 0 auto 16px;
    padding: 6px 16px;
    background: #fef2f2;
    border: 1.5px solid #fee2e2;
    border-radius: 12px;
    font-family: var(--font-mono, monospace);
    font-weight: 700;
    color: #dc2626;
}
.mq-timer--urgent {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    animation: mq-pulse 1s infinite alternate;
}
@keyframes mq-pulse { from { opacity: 1; } to { opacity: 0.7; } }

.mq-progress-row {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}
.mq-counter {
    font-size: 13px;
    font-weight: 700;
    color: #666;
    white-space: nowrap;
}
.mq-progress-track {
    flex: 1;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}
.mq-progress-fill {
    height: 100%;
    background: #1754D8;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.mq-score-pill {
    background: #f0fdf4;
    color: #166534;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Status Pills ───────────────────────────────────────── */
.mq-status-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}
.mq-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #fff;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}
.mq-status-pill__dot { width: 8px; height: 8px; border-radius: 50%; }
.mq-status-pill--remain .mq-status-pill__dot { background: #94a3b8; }
.mq-status-pill--wrong  .mq-status-pill__dot { background: #ef4444; }
.mq-status-pill--right  .mq-status-pill__dot { background: #22c55e; }

/* ── Question Body ──────────────────────────────────────── */
.mq-question-section { margin-bottom: 24px; }
.mq-qnum {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 8px;
}
.mq-question {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
    color: #1a1a1a;
}
.mq-image { margin-top: 20px; text-align: center; }
.mq-image img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 12px;
    border: 1.5px solid #eee;
}

/* ── Options ────────────────────────────────────────────── */
.mq-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.mq-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    width: 100%;
}
.mq-option:hover:not(:disabled) {
    border-color: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204,0,0,0.08);
}
.mq-option__letter {
    width: 32px;
    height: 32px;
    background: #fef2f2;
    border: 1.5px solid #fee2e2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #dc2626;
    flex-shrink: 0;
}
.mq-option__text { font-size: 15px; font-weight: 600; color: #374151; line-height: 1.4; }

.mq-option--selected { border-color: #1754D8; background: #eff6ff; }
.mq-option--correct  { border-color: #22c55e; background: #f0fdf4; }
.mq-option--wrong    { border-color: #ef4444; background: #fef2f2; }
.mq-option--dimmed   { opacity: 0.5; cursor: default; }

.mq-option--correct .mq-option__letter { background: #22c55e; border-color: #22c55e; color: #fff; }
.mq-option--wrong .mq-option__letter   { background: #ef4444; border-color: #ef4444; color: #fff; }

/* ── Feedback Box ───────────────────────────────────────── */
.mq-feedback {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    animation: mq-fade-in 0.3s ease;
}
@keyframes mq-fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.mq-feedback--correct { background: #f0fdf4; border: 1.5px solid #bbf7d0; color: #166534; }
.mq-feedback--wrong   { background: #fef2f2; border: 1.5px solid #fecaca; color: #991b1b; }
.mq-feedback__icon { font-size: 18px; font-weight: 800; }
.mq-feedback__text { font-size: 14px; font-weight: 600; line-height: 1.5; }

.mq-exam-bar {
    background: #f8f9fa;
    border: 1.5px solid #eee;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: #4b5563;
}

/* ── Actions ────────────────────────────────────────────── */
.mq-actions { display: flex; gap: 12px; margin-top: 32px; }
.mq-btn {
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.mq-btn--primary { background: #CC0000; color: #fff; flex: 2; box-shadow: 0 4px 0 #990000; }
.mq-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #990000; }
.mq-btn--primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #990000; }
.mq-btn--ghost { background: #f3f4f6; color: #4b5563; flex: 1; }
.mq-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Results ────────────────────────────────────────────── */
#mq-results { text-align: center; }
.mq-score-ring { position: relative; width: 150px; height: 150px; margin: 48px auto 24px; }
.mq-score-ring svg { transform: rotate(-90deg); }
.mq-score-ring__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.mq-score-pct { font-size: 32px; font-weight: 900; color: #1a1a1a; }
.mq-score-label { font-size: 12px; font-weight: 700; color: #666; text-transform: uppercase; }

.mq-result-heading { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.mq-result-sub { font-size: 15px; color: #666; max-width: 400px; margin: 0 auto 32px; line-height: 1.5; }

.mq-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.mq-stat { background: #fff; border: 1.5px solid #eee; padding: 16px; border-radius: 16px; }
.mq-stat__val { font-size: 20px; font-weight: 800; color: #1a1a1a; margin-bottom: 4px; }
.mq-stat__lbl { font-size: 11px; font-weight: 700; color: #666; text-transform: uppercase; }

.mq-section-results { text-align: left; background: #fff; border: 1.5px solid #eee; border-radius: 16px; padding: 24px; margin-bottom: 32px; }
.mq-section-results h3 { font-size: 16px; font-weight: 700; margin: 0 0 16px; border-bottom: 1px solid #f0f0f0; padding-bottom: 12px; }
.mq-section-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid #fafafa; font-size: 14px; font-weight: 600; }
.mq-section-row:last-of-type { border: none; }
.mq-section-row__name { color: #1a1a1a; }
.mq-section-row__score { color: #4b5563; }
.mq-section-row__need { color: #9ca3af; font-size: 11px; }
.mq-section-row__status { font-weight: 800; }
.mq-section-row__status.pass { color: #16a34a; }
.mq-section-row__status.fail { color: #dc2626; }
.mq-pass-note { font-size: 12px; color: #666; margin-top: 16px; line-height: 1.5; }

.mq-result-actions { display: flex; gap: 12px; flex-direction: column; max-width: 320px; margin: 0 auto; }
