/* ============================================================
   homeaccess.css
   Styles for the BrainBuzz Home Access WEB section.
   Loaded alongside brainbuzz.css and mentalmaths.css.
   App-specific styles are in app.css
   ============================================================ */

/* ── Page background ─────────────────────────────────────── */
body {
    background: var(--mm-bg);
}

/* ══════════════════════════════════════════════════════════════
   AUTH PAGES (register, login, verify, forgot password)
   ══════════════════════════════════════════════════════════════ */

.auth-wrapper {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}
.auth-card {
    background: #fff;
    border: 1px solid var(--mm-border);
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 4px 24px rgba(88,103,221,.08);
}
@media (max-width: 480px) {
    .auth-card { padding: 1.75rem 1.25rem; }
}
.auth-brand { text-align: center; margin-bottom: 1.75rem; }
.auth-brand .brand-icon {
    width: 56px; height: 56px;
    background: var(--mm-primary-light);
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.6rem; color: var(--mm-primary); margin-bottom: 0.75rem;
}
.auth-brand h1 {
    font-size: 1.35rem; font-weight: 800;
    background: linear-gradient(135deg, var(--mm-primary) 0%, #3a4fd4 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 0.2rem;
}
.auth-brand p { font-size: 0.875rem; color: var(--mm-muted); margin: 0; }

.auth-alert { border-radius: 8px; font-size: 0.9rem; padding: 0.75rem 1rem; margin-bottom: 1.25rem; }

.input-group .btn-pw-toggle {
    border: 1.5px solid var(--mm-border); border-left: none;
    background: #fff; color: var(--mm-muted);
    border-radius: 0 8px 8px 0; padding: 0 0.75rem;
    cursor: pointer; transition: color 0.15s;
}
.input-group .btn-pw-toggle:hover { color: var(--mm-primary); }
.input-group .form-control { border-radius: 8px 0 0 8px; border: 1.5px solid var(--mm-border); }
.input-group .form-control:focus {
    z-index: 1; border-color: var(--mm-primary);
    box-shadow: 0 0 0 3px rgba(88,103,221,.12); outline: none;
}

.strength-bar-wrap { height: 4px; background: #e9ecef; border-radius: 2px; margin-top: 6px; overflow: hidden; }
.strength-bar { height: 100%; width: 0; border-radius: 2px; transition: width 0.25s, background 0.25s; }
.strength-label { font-size: 0.78rem; color: var(--mm-muted); margin-top: 4px; min-height: 1.1em; }
.match-label { font-size: 0.78rem; margin-top: 4px; min-height: 1.1em; }

.auth-divider { text-align: center; font-size: 0.85rem; color: var(--mm-muted); margin-top: 1.25rem; }
.auth-divider a { color: var(--mm-primary); font-weight: 600; text-decoration: none; }
.auth-divider a:hover { text-decoration: underline; }

.terms-note { font-size: 0.78rem; color: var(--mm-muted); text-align: center; margin-top: 1rem; }
.terms-note a { color: var(--mm-primary); text-decoration: none; }
.terms-note a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD (web)
   ══════════════════════════════════════════════════════════════ */

.home-topbar { background: linear-gradient(135deg, var(--mm-primary) 0%, var(--mm-accent) 100%); padding: 0.9rem 0; color: white; }
.home-topbar .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.home-topbar h1 { font-size: 1.1rem; font-weight: 800; margin: 0; color: white; }
.home-topbar .user-tag { font-size: 0.82rem; opacity: 0.9; }
.home-topbar-actions { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; }
.home-topbar-actions a { color: rgba(255,255,255,.85); text-decoration: none; }
.home-topbar-actions a:hover { color: white; }

.home-dash-card { background: white; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.07); padding: 1.5rem; margin-bottom: 1.25rem; }
.home-dash-card-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mm-primary); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; }

.test-status-panel { border: 2px solid var(--mm-border); border-radius: 12px; padding: 1.5rem; text-align: center; }
.test-status-panel.status-pending { border-color: #ffc107; background: #fffdf0; }
.test-status-panel.status-active  { border-color: var(--mm-accent); background: #f0fdf9; }
.test-status-panel.status-empty   { border-style: dashed; background: #fafbff; }

.btn-generate { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--mm-primary); color: white; border: none; border-radius: 8px; padding: 0.7rem 1.5rem; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: background 0.15s, transform 0.1s; }
.btn-generate:hover  { background: var(--mm-primary-dark); }
.btn-generate:active { transform: scale(0.99); }
.btn-generate:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-play-test { display: inline-flex; align-items: center; gap: 0.5rem; background: #198754; color: white; border: none; border-radius: 8px; padding: 0.7rem 1.5rem; font-size: 0.95rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn-play-test:hover { background: #157347; color: white; }

/* ══════════════════════════════════════════════════════════════
   WEB TEST LISTING (index.php)
   ══════════════════════════════════════════════════════════════ */

.web-yg-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.web-yg-pill { border: 1.5px solid var(--mm-border); background: #fff; color: var(--mm-muted); border-radius: 2rem; padding: 0.35rem 1rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.web-yg-pill:hover { border-color: var(--mm-primary); color: var(--mm-primary); }
.web-yg-pill.active { background: var(--mm-primary); border-color: var(--mm-primary); color: #fff; }
.web-yg-pill--empty { opacity: 0.45; }

.web-test-card { background: #fff; border: 1px solid var(--mm-border); border-radius: 12px; padding: 1.25rem; height: 100%; display: flex; flex-direction: column; transition: box-shadow 0.18s, transform 0.18s; }
.web-test-card:hover { box-shadow: 0 6px 22px rgba(88,103,221,.1); transform: translateY(-2px); }
.web-test-card__year { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mm-primary); margin-bottom: 0.4rem; }
.web-test-card__name { font-size: 1rem; font-weight: 700; color: var(--mm-text); margin-bottom: 0.4rem; }
.web-test-card__desc { font-size: 0.85rem; color: var(--mm-muted); margin-bottom: 0.75rem; flex: 1; }
.web-test-card__meta { font-size: 0.78rem; color: var(--mm-muted); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.web-test-card__term { background: var(--mm-primary-light); color: var(--mm-primary); border-radius: 1rem; padding: 0.1rem 0.5rem; font-weight: 600; }
.web-test-card__btn { display: block; text-align: center; background: var(--mm-primary); color: #fff; border-radius: 8px; padding: 0.55rem; font-size: 0.875rem; font-weight: 700; text-decoration: none; transition: background 0.15s; margin-top: auto; }
.web-test-card__btn:hover { background: var(--mm-primary-dark); color: #fff; }

.web-empty-state { text-align: center; padding: 3rem 1rem; color: var(--mm-muted); }
.web-empty-state i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; opacity: 0.4; }

.web-subscribe-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.web-subscribe-list li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: var(--mm-text); padding: 0.3rem 0; }
.web-subscribe-list li i { color: var(--mm-accent); flex-shrink: 0; }

.web-pricing-mini { background: #fff; border: 1px solid var(--mm-border); border-radius: 14px; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.web-pricing-mini__plan { display: flex; align-items: baseline; justify-content: space-between; position: relative; padding: 0.75rem; border-radius: 8px; background: #f8f9fb; }
.web-pricing-mini__plan--featured { background: var(--mm-primary-light); border: 1.5px solid rgba(88,103,221,.2); }
.web-pricing-mini__badge { position: absolute; top: -10px; right: 10px; background: var(--mm-primary); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 2px 10px; border-radius: 1rem; }
.web-pricing-mini__label { font-size: 0.85rem; font-weight: 600; color: var(--mm-muted); }
.web-pricing-mini__price { font-size: 1.4rem; font-weight: 800; color: var(--mm-primary); }
.web-pricing-mini__price span { font-size: 0.85rem; font-weight: 600; color: var(--mm-muted); }
.web-pricing-mini__equiv { font-size: 0.75rem; color: var(--mm-muted); }
.web-pricing-mini__divider { text-align: center; font-size: 0.8rem; color: var(--mm-muted); font-weight: 600; }
.web-pricing-mini__btn { display: block; text-align: center; background: var(--mm-primary); color: #fff; border-radius: 8px; padding: 0.7rem; font-size: 0.95rem; font-weight: 700; text-decoration: none; transition: background 0.15s; margin-top: 0.25rem; }
.web-pricing-mini__btn:hover { background: var(--mm-primary-dark); color: #fff; }

/* ══════════════════════════════════════════════════════════════
   GENERATE TEST PAGE
   ══════════════════════════════════════════════════════════════ */

.gen-wrap {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 3rem;
    align-items: start;
    padding: 3rem 0 5rem;
}
@media (max-width: 991px) {
    .gen-wrap { grid-template-columns: 1fr; gap: 2rem; }
}
.gen-card form { width: 100%; }

.gen-left h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--mm-primary) 0%, #3a4fd4 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 0.5rem;
}
.gen-left .lead { font-size: 1.05rem; color: #555; margin-bottom: 2rem; line-height: 1.6; }

.gen-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.gen-list li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--mm-border); font-size: 0.95rem; color: var(--mm-text); }
.gen-list li:last-child { border-bottom: none; }
.gen-list .fi { width: 36px; height: 36px; border-radius: 8px; background: var(--mm-primary-light); color: var(--mm-primary); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.gen-list .ft { font-weight: 700; display: block; margin-bottom: 0.1rem; }
.gen-list .fd { font-size: 0.85rem; color: var(--mm-muted); }

.gen-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(88,103,221,.12);
    overflow: hidden;
    position: sticky;
    top: 1.5rem;
}
.gen-card .card-top {
    background: linear-gradient(135deg, var(--mm-primary) 0%, #3a4fd4 100%);
    padding: 1.25rem 1.5rem; color: white;
}
.gen-card .card-top h3 { font-size: 1.1rem; font-weight: 800; margin: 0; color: white; }
.gen-card .card-top p  { font-size: 0.82rem; opacity: 0.85; margin: 0.2rem 0 0; }
.gen-card .card-body   { padding: 1.5rem; }

.test-name { font-size: 1.05rem; font-weight: 800; color: var(--mm-text); margin-bottom: 0.2rem; }
.test-meta { font-size: 0.82rem; color: var(--mm-muted); margin-bottom: 0.75rem; }

.status-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.85rem; border-radius: 1rem; font-size: 0.8rem; font-weight: 700; margin-bottom: 1rem; }
.status-badge--active { background: #d1fae5; color: #065f46; }
.status-badge--draft  { background: #fef3c7; color: #92400e; }

.btn-play { display: flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--mm-primary); color: white; border: none; border-radius: 8px; padding: 0.75rem; font-size: 0.95rem; font-weight: 700; text-decoration: none; transition: background 0.15s; margin-bottom: 0.6rem; }
.btn-play:hover { background: var(--mm-primary-dark); color: white; }

.btn-outline-sm { display: flex; align-items: center; justify-content: center; gap: 0.5rem; background: #fff; color: var(--mm-primary); border: 2px solid var(--mm-border); border-radius: 8px; padding: 0.65rem; font-size: 0.875rem; font-weight: 700; text-decoration: none; transition: border-color 0.15s; }
.btn-outline-sm:hover { border-color: var(--mm-primary); color: var(--mm-primary); }


.pending-note { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 0.85rem 1rem; font-size: 0.82rem; color: #92400e; }

.form-control { border: 1.5px solid var(--mm-border); border-radius: 8px; font-size: 0.9rem; padding: 0.55rem 0.75rem; }
.form-control:focus { border-color: var(--mm-primary); box-shadow: 0 0 0 3px rgba(88,103,221,.12); outline: none; }
.form-label { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--mm-text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }

.divider { border: none; border-top: 1px solid var(--mm-border); margin: 1.25rem 0; }

.empty-state { text-align: center; padding: 1.25rem 0; color: var(--mm-muted); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: 0.5rem; opacity: .35; }

/* ══════════════════════════════════════════════════════════════
   WEB LANDING PAGE
   ══════════════════════════════════════════════════════════════ */

.home-coming-soon-bar { background: linear-gradient(135deg, var(--mm-primary) 0%, var(--mm-accent) 100%); color: #fff; text-align: center; padding: 9px 16px; font-size: 0.87rem; font-weight: 600; letter-spacing: 0.03em; }

.hero-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(88,103,221,.1); border: 1px solid rgba(88,103,221,.25); border-radius: 50px; padding: 4px 14px; font-size: 0.82rem; font-weight: 700; color: var(--mm-primary); margin-bottom: 16px; }
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #ffc107; display: inline-block; }

.hero-tag { background: white; border: 2px solid var(--mm-primary); color: var(--mm-primary); border-radius: 2rem; padding: .35rem 1rem; font-size: 0.85rem; font-weight: 600; }

.diff-callout { background: rgba(88,103,221,.06); border-left: 4px solid var(--mm-primary); border-radius: 0 8px 8px 0; padding: 16px 20px; font-size: 0.95rem; color: #3a4080; }

.feature-card { border: 1px solid var(--mm-border); border-radius: 12px; padding: 24px; height: 100%; background: #fff; transition: box-shadow 0.18s, transform 0.18s; }
.feature-card:hover { box-shadow: 0 6px 22px rgba(88,103,221,.12); transform: translateY(-2px); }
.feature-icon-wrap { width: 48px; height: 48px; border-radius: 10px; background: var(--mm-primary-light); color: var(--mm-primary); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; margin-bottom: 14px; }
.feature-card h5 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--mm-text); }
.feature-card p  { font-size: 0.9rem; color: var(--mm-muted); margin: 0; }

.section-heading { font-size: 1.5rem; font-weight: 800; background: linear-gradient(135deg, var(--mm-primary) 0%, #3a4fd4 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 6px; display: inline-block; }
.section-sub { color: var(--mm-muted); font-size: 0.93rem; margin-bottom: 2rem; }

.pricing-card { border: 2px solid var(--mm-border); border-radius: 14px; padding: 36px 28px 28px; background: #fff; text-align: center; position: relative; transition: box-shadow 0.18s; }
.pricing-card.featured { border-color: var(--mm-primary); box-shadow: 0 8px 32px rgba(88,103,221,.15); }
.top-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--mm-primary) 0%, var(--mm-accent) 100%); color: white; font-size: 0.78rem; font-weight: 700; padding: 4px 16px; border-radius: 2rem; white-space: nowrap; }
.plan-label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mm-muted); margin-bottom: 12px; }
.price-block { display: flex; align-items: flex-start; justify-content: center; gap: 2px; margin-bottom: 4px; }
.price-block .sym { font-size: 1.4rem; font-weight: 700; color: var(--mm-primary); margin-top: 6px; }
.price-block .amount { font-size: 3rem; font-weight: 800; color: var(--mm-primary); line-height: 1; }
.price-period { font-size: 0.85rem; color: var(--mm-muted); margin-bottom: 4px; }
.price-equiv  { font-size: 0.82rem; color: var(--mm-primary); font-weight: 600; margin-bottom: 20px; min-height: 1.2em; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.pricing-card ul li { font-size: 0.875rem; color: var(--mm-text); padding: 6px 0; border-bottom: 1px solid var(--mm-border); display: flex; align-items: center; gap: 8px; }
.pricing-card ul li:last-child { border-bottom: none; }
.pricing-card ul li::before { content: '✓'; color: var(--mm-accent); font-weight: 700; flex-shrink: 0; }
.btn-coming-soon { display: block; padding: 0.65rem; border-radius: 8px; font-size: 0.9rem; font-weight: 700; background: var(--mm-border); color: var(--mm-muted); cursor: default; }
.btn-coming-soon.primary { background: linear-gradient(135deg, var(--mm-primary) 0%, var(--mm-accent) 100%); color: white; opacity: 0.6; }

.notify-strip { background: linear-gradient(135deg, var(--mm-primary) 0%, var(--mm-accent) 100%); color: white; padding: 2.5rem 0; text-align: center; margin-top: 2rem; }
.notify-strip h3 { font-weight: 800; margin-bottom: 0.5rem; color: white; }
.notify-strip p  { opacity: 0.88; margin: 0; }

/* ══════════════════════════════════════════════════════════════
   GENERAL MOBILE (narrow screens)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .game-stats { grid-template-columns: repeat(3, 1fr) !important; gap: 0.4rem; }
    .stat-card  { padding: 0.65rem 0.3rem; }
    .stat-label { font-size: 0.62rem; letter-spacing: 0; }
    .stat-value { font-size: 1.15rem; }
    .control-buttons { flex-direction: column; gap: 0.6rem; }
    .audio-button, .audio-button-outline { padding: 0.85rem 1rem; font-size: 0.95rem; margin: 0; width: 100%; border-radius: 10px; }
}