/* ============================================
   Learning Plan v2 — Premium Redesign
   ============================================ */

/* ── Layout Shell ── */
.lp-page {
    min-height: 100vh;
    background: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════
   ONBOARDING WIZARD
   ══════════════════════════════════════════════ */
.lp-onboarding {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Ambient glow orbs */
.lp-onboarding::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -150px;
    width: 450px;
    height: 450px;
    background: var(--accent-purple);
    border-radius: 50%;
    filter: blur(160px);
    opacity: 0.18;
    pointer-events: none;
    animation: lpOrbDrift 20s infinite ease-in-out alternate;
}

.lp-onboarding::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    pointer-events: none;
    animation: lpOrbDrift 25s infinite ease-in-out alternate-reverse;
}

@keyframes lpOrbDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -20px) scale(1.05); }
    100% { transform: translate(-20px, 15px) scale(0.95); }
}

.lp-wizard {
    width: 100%;
    max-width: 720px;
    position: relative;
    z-index: 2;
}

/* ── Brand Header ── */
.lp-wizard__brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.lp-wizard__brand img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 8px 24px rgba(16, 185, 129, 0.15);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.lp-wizard__brand img:hover {
    transform: scale(1.08) rotate(5deg);
}

.lp-wizard__brand h1 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.lp-wizard__brand h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lp-wizard__brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ── Step Progress ── */
.lp-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
    position: relative;
}

.lp-progress__step {
    flex: 1;
    height: 4px;
    border-radius: 100px;
    background: var(--border-glass);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 3px;
}

.lp-progress__step--active {
    background: var(--gradient-primary);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
    height: 5px;
}

.lp-progress__step--done {
    background: var(--accent-purple);
    opacity: 0.7;
}

/* ── Step Card ── */
.lp-step {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.lp-step--active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    position: relative;
}

.lp-step--exit-left {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
    position: absolute;
}

.lp-step__card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

[data-theme="dark"] .lp-step__card {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* Step label */
.lp-step__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.lp-step__label-emoji {
    font-size: 1.1rem;
}

.lp-step__label-text {
    opacity: 0.85;
}

/* Question */
.lp-step__question {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

/* Helper text */
.lp-step__helper {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-step__helper i {
    font-size: 0.9rem;
    color: var(--accent-purple);
}

/* ══════════════════════════════════════════════
   OPTIONS — SHARED BASE
   ══════════════════════════════════════════════ */
.lp-options {
    display: grid;
    gap: 10px;
}

/* Single select: 2-column compact cards */
.lp-options--single {
    grid-template-columns: repeat(2, 1fr);
}

/* Multi select: full-width checklist rows */
.lp-options--multi {
    grid-template-columns: 1fr;
    gap: 8px;
}

/* ── Base Option (shared) ── */
.lp-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1.15rem;
    border-radius: 14px;
    border: 1.5px solid var(--border-glass);
    background: var(--bg-surface);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
}

.lp-option:hover {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.03);
    color: var(--text-primary);
}

.lp-option:active {
    transform: scale(0.99);
}

/* ══════════════════════════════════════════════
   SINGLE SELECT — Compact Selection Cards
   ══════════════════════════════════════════════ */
.lp-options--single .lp-option {
    padding: 0.9rem 1.15rem;
    border-radius: 16px;
}

.lp-options--single .lp-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

/* Radio indicator — circle */
.lp-option__radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.22s ease;
    background: transparent;
}

.lp-option__radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.22s ease;
}

/* Single selected */
.lp-options--single .lp-option--selected {
    border-color: var(--accent-purple);
    background: rgba(16, 185, 129, 0.08);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.lp-option--selected .lp-option__radio {
    border-color: var(--accent-purple);
    background: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.lp-option--selected .lp-option__radio::after {
    background: white;
}

/* ══════════════════════════════════════════════
   MULTI SELECT — Checkbox Checklist
   ══════════════════════════════════════════════ */
.lp-options--multi .lp-option {
    padding: 0.8rem 1.1rem;
    border-radius: 12px;
    border-left: 3px solid transparent;
}

.lp-options--multi .lp-option:hover {
    border-left-color: rgba(16, 185, 129, 0.3);
    transform: translateX(3px);
}

/* Checkbox indicator — rounded square */
.lp-option__check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.22s ease;
    background: transparent;
}

.lp-option__check svg {
    width: 13px;
    height: 13px;
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Multi selected */
.lp-options--multi .lp-option--selected {
    border-color: rgba(16, 185, 129, 0.25);
    border-left-color: var(--accent-purple);
    background: rgba(16, 185, 129, 0.06);
    color: var(--text-primary);
    font-weight: 600;
}

.lp-option--selected .lp-option__check {
    border-color: var(--accent-purple);
    background: var(--accent-purple);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.lp-option--selected .lp-option__check svg {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* ── Shared: Emoji + Text ── */
.lp-option__emoji {
    font-size: 1.15rem;
    flex-shrink: 0;
    line-height: 1;
}

.lp-option__text {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.35;
}

/* ── Input Field ── */
.lp-input-wrapper {
    margin-top: 0.5rem;
    position: relative;
}

.lp-input {
    width: 100%;
    max-width: 320px;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    border: 1.5px solid var(--border-glass);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.25s ease;
}

.lp-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.lp-input::placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Navigation Buttons ── */
.lp-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.lp-nav__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 1.6rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-family: var(--font-body);
}

.lp-nav__btn--back {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
}

.lp-nav__btn--back:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    transform: translateX(-3px);
}

.lp-nav__btn--next {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
    margin-left: auto;
}

.lp-nav__btn--next:hover {
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.lp-nav__btn--next:disabled,
.lp-nav__btn--submit:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.lp-nav__btn--submit {
    background: linear-gradient(135deg, #059669, #10b981, #34d399);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    font-size: 0.95rem;
    padding: 0.9rem 2rem;
    margin-left: auto;
    position: relative;
    overflow: hidden;
}

.lp-nav__btn--submit::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
    animation: lpShimmer 3s infinite;
}

@keyframes lpShimmer {
    0%   { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.lp-nav__btn--submit:hover {
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

/* ── Skip Button ── */
.lp-skip {
    display: block;
    margin: 1rem auto 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: var(--font-body);
    padding: 6px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.lp-skip:hover {
    color: var(--text-secondary);
    background: rgba(16, 185, 129, 0.05);
}

/* ══════════════════════════════════════════════
   GENERATING OVERLAY
   ══════════════════════════════════════════════ */
.lp-generating {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.lp-generating--active {
    display: flex;
    animation: lpFadeIn 0.5s ease;
}

/* Orbital spinner */
.lp-generating__orbital {
    width: 120px;
    height: 120px;
    position: relative;
}

.lp-generating__orbital-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.8rem;
    animation: lpCorePulse 2s infinite ease-in-out;
    z-index: 2;
}

@keyframes lpCorePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.12); }
}

.lp-generating__orbital-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
}

.lp-generating__orbital-ring:nth-child(2) {
    border-top-color: var(--accent-purple);
    border-right-color: var(--accent-purple);
    animation: lpOrbitSpin 2s linear infinite;
}

.lp-generating__orbital-ring:nth-child(3) {
    inset: 8px;
    border-bottom-color: var(--accent-blue);
    border-left-color: var(--accent-blue);
    animation: lpOrbitSpin 3s linear infinite reverse;
}

.lp-generating__orbital-ring:nth-child(4) {
    inset: 16px;
    border-top-color: var(--accent-pink);
    animation: lpOrbitSpin 4s linear infinite;
}

@keyframes lpOrbitSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.lp-generating__text {
    text-align: center;
    max-width: 420px;
}

.lp-generating__text h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lp-generating__status {
    color: var(--text-muted);
    font-size: 0.9rem;
    min-height: 1.4em;
    transition: opacity 0.3s ease;
}

.lp-generating__dots {
    display: flex;
    gap: 8px;
}

.lp-generating__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-purple);
    animation: lpDotBounce 1.4s infinite ease-in-out;
}

.lp-generating__dots span:nth-child(2) { animation-delay: 0.2s; }
.lp-generating__dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes lpDotBounce {
    0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
    40%           { transform: scale(1.1); opacity: 1; }
}

/* ── Error Toast ── */
.lp-error-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-surface);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 480px;
    width: 90%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lp-error-toast--visible {
    transform: translateX(-50%) translateY(0);
}

.lp-error-toast__icon {
    font-size: 1.5rem;
    color: #ef4444;
    flex-shrink: 0;
}

.lp-error-toast__text {
    flex: 1;
}

.lp-error-toast__title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.lp-error-toast__msg {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lp-error-toast__retry {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-body);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.lp-error-toast__retry:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.lp-error-toast__close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════════ */
.lp-dashboard {
    display: none;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.lp-dashboard--active {
    display: block;
    animation: lpFadeIn 0.5s ease;
}

@keyframes lpFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Back link ── */
.lp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    padding: 6px 12px;
    border-radius: 10px;
}

.lp-back-link:hover {
    color: var(--text-primary);
    background: rgba(16, 185, 129, 0.05);
    transform: translateX(-3px);
}

/* ── AI Welcome Banner ── */
.lp-banner {
    background: var(--gradient-primary);
    border-radius: 24px;
    padding: 2.25rem 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.lp-banner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
}

.lp-banner::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 40%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.lp-banner__emoji {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
}

.lp-banner__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
}

.lp-banner__message {
    opacity: 0.92;
    font-size: 0.92rem;
    line-height: 1.65;
    max-width: 600px;
    margin-bottom: 0;
    color: rgba(255,255,255,0.92);
    position: relative;
}

/* ── Stats Row ── */
.lp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.lp-stat {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lp-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
}

.lp-stat__icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lp-stat__value {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lp-stat__label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── XP Bar ── */
.lp-xp {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.lp-xp__badge {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.lp-xp__info {
    flex: 1;
    min-width: 0;
}

.lp-xp__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lp-xp__level {
    font-weight: 700;
    font-size: 0.92rem;
}

.lp-xp__count {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.lp-xp__bar {
    height: 10px;
    background: var(--border-glass);
    border-radius: 100px;
    overflow: hidden;
}

.lp-xp__fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 100px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
    position: relative;
}

.lp-xp__fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    border-radius: 100px;
    animation: lpXpGlow 2s infinite;
}

@keyframes lpXpGlow {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}

/* ── Section Headers ── */
.lp-section {
    margin-bottom: 2rem;
}

.lp-section__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.lp-section__header i {
    font-size: 1.3rem;
    color: var(--accent-purple);
}

.lp-section__header h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* ── Today's Mission ── */
.lp-mission {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 22px;
    overflow: hidden;
}

.lp-mission__header {
    background: rgba(16, 185, 129, 0.05);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-glass);
}

.lp-mission__day {
    font-weight: 700;
    font-size: 0.92rem;
}

.lp-mission__topic {
    font-size: 0.82rem;
    color: var(--accent-purple);
    font-weight: 600;
}

.lp-task-list {
    padding: 0.5rem 0;
}

.lp-task {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    transition: background 0.2s ease;
    cursor: pointer;
    border-radius: 12px;
    margin: 4px 8px;
}

.lp-task:hover {
    background: rgba(16, 185, 129, 0.04);
}

.lp-task__check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: transparent;
    color: transparent;
    font-size: 0.85rem;
}

.lp-task__check:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.lp-task--done .lp-task__check {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.lp-task__info {
    flex: 1;
    min-width: 0;
}

.lp-task__title {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.lp-task--done .lp-task__title {
    text-decoration: line-through;
    opacity: 0.5;
}

.lp-task__meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lp-task__xp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    padding: 3px 10px;
    border-radius: 100px;
}

.lp-task__difficulty {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: capitalize;
}

.lp-task__difficulty--easy   { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.lp-task__difficulty--medium { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.lp-task__difficulty--hard   { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* ── Weekly Roadmap ── */
.lp-weeks {
    display: flex;
    gap: 10px;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.lp-week-tab {
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    border: 1.5px solid var(--border-glass);
    background: var(--bg-surface);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.lp-week-tab:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.lp-week-tab--active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.lp-week-content {
    display: none;
}

.lp-week-content--active {
    display: block;
    animation: lpFadeIn 0.35s ease;
}

.lp-week-goal {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.lp-week-goal strong {
    color: var(--accent-purple);
}

.lp-day-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.lp-day-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.lp-day-card--completed {
    opacity: 0.5;
    border-color: rgba(16, 185, 129, 0.15);
}

.lp-day-card--completed .lp-day-card__day {
    background: var(--accent-purple);
    color: white;
}

.lp-day-card--rest {
    opacity: 0.6;
    background: rgba(139, 92, 246, 0.03);
}

.lp-day-card__day {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--accent-purple);
    flex-shrink: 0;
    font-family: var(--font-heading);
}

.lp-day-card__info {
    flex: 1;
    min-width: 0;
}

.lp-day-card__topic {
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.lp-day-card__desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lp-day-card__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Badges ── */
.lp-badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.lp-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.1rem;
    border-radius: 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    transition: all 0.3s ease;
}

.lp-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.lp-badge--locked {
    opacity: 0.3;
    filter: grayscale(1);
}

.lp-badge__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.lp-badge__info {
    min-width: 0;
}

.lp-badge__name {
    font-weight: 700;
    font-size: 0.85rem;
}

.lp-badge__desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ── Weak Topics Alert ── */
.lp-alert {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.lp-alert__icon {
    font-size: 1.5rem;
    color: #ef4444;
    flex-shrink: 0;
    margin-top: 2px;
}

.lp-alert__title {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 4px;
}

.lp-alert__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.lp-alert__topic {
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Recommendations ── */
.lp-rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.lp-rec-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.lp-rec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
}

.lp-rec-card__title {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-rec-card__title i {
    color: var(--accent-purple);
}

.lp-rec-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lp-rec-card__list li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-rec-card__list li::before {
    content: '→';
    color: var(--accent-purple);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Export & Regenerate Buttons ── */
.lp-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.lp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.4rem;
    border-radius: 14px;
    border: 1.5px solid var(--border-glass);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-body);
}

.lp-action-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
}

.lp-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.lp-action-btn--primary {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.lp-action-btn--primary:hover {
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
    color: white;
}

/* Copy success feedback */
.lp-action-btn--copied {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

/* ── XP Popup Animation ── */
.lp-xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: #f59e0b;
    text-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
    animation: lpXpPop 1.2s ease forwards;
    pointer-events: none;
}

@keyframes lpXpPop {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    25%  { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
    50%  { opacity: 1; transform: translate(-50%, -70%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -120%) scale(0.8); }
}

/* ── Level Up Overlay ── */
.lp-levelup {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lpFadeIn 0.3s ease;
}

.lp-levelup__card {
    background: var(--bg-surface);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 380px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: lpScaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes lpScaleIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.lp-levelup__icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.lp-levelup__title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lp-levelup__msg {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.lp-levelup__dismiss {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.lp-levelup__dismiss:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* ── Print Styles ── */
@media print {
    .lp-back-link,
    .lp-actions,
    .lp-alert,
    .lp-page > *:not(.lp-dashboard) {
        display: none !important;
    }
    
    .lp-dashboard {
        display: block !important;
        padding: 0;
    }
    
    .lp-banner {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .lp-onboarding {
        padding: 1.25rem;
    }

    .lp-wizard__brand h1 {
        font-size: 1.5rem;
    }

    .lp-step__card {
        padding: 2rem 1.5rem;
        border-radius: 22px;
    }

    .lp-step__question {
        font-size: 1.25rem;
    }

    .lp-options--single {
        grid-template-columns: 1fr;
    }

    .lp-option {
        padding: 0.75rem 1rem;
    }

    .lp-dashboard {
        padding: 1.25rem 1rem 3rem;
    }

    .lp-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .lp-xp {
        flex-direction: column;
        text-align: center;
    }

    .lp-banner {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .lp-banner__title {
        font-size: 1.25rem;
    }

    .lp-badges {
        grid-template-columns: 1fr;
    }

    .lp-rec-grid {
        grid-template-columns: 1fr;
    }

    .lp-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .lp-action-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .lp-wizard__brand h1 {
        font-size: 1.3rem;
    }

    .lp-step__card {
        padding: 1.5rem 1.15rem;
        border-radius: 18px;
    }

    .lp-step__question {
        font-size: 1.1rem;
    }

    .lp-nav {
        flex-wrap: wrap;
    }

    .lp-nav__btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .lp-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .lp-stat {
        padding: 1rem;
    }

    .lp-stat__value {
        font-size: 1.3rem;
    }
}
