/* Base & Variables */
:root {
    --deep-space: #050816;
    --cosmic-blue: #0a1628;
    --electric-blue: #00d4ff;
    --neon-purple: #a855f7;
    --fluoro-cyan: #22d3ee;
    --cyber-pink: #ec4899;
    --energy-orange: #f97316;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    background-color: var(--deep-space);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.font-orbitron {
    font-family: 'Orbitron', 'Noto Sans SC', sans-serif;
}

.bg-deep-space {
    background-color: var(--deep-space);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-space);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #00d4ff 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.4));
}

/* Glass Effects */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-button {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.glass-button:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(5, 8, 22, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--electric-blue), var(--neon-purple));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.logo-glow {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    animation: logoPulse 3s ease-in-out infinite;
}

.logo-ring {
    animation: logoRotate 8s linear infinite;
    transform-origin: center;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.2); }
    50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.4); }
}

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

/* Hero Content Animations */
.hero-content {
    animation: fadeInUp 1s ease-out 0.3s both;
}

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

/* Pi Core */
.pi-core {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pi-symbol {
    font-size: 160px;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(0, 212, 255, 0.8) 50%, rgba(168, 85, 247, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(0, 212, 255, 0.6);
    animation: piFloat 6s ease-in-out infinite, piGlow 4s ease-in-out infinite;
    z-index: 10;
}

.pi-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, rgba(168, 85, 247, 0.2) 40%, transparent 70%);
    filter: blur(20px);
    animation: glowPulse 4s ease-in-out infinite;
}

.pi-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    animation: ringRotate linear infinite;
}

.pi-ring.ring-1 {
    width: 320px;
    height: 320px;
    border-color: rgba(0, 212, 255, 0.3);
    animation-duration: 20s;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

.pi-ring.ring-2 {
    width: 400px;
    height: 400px;
    border-color: rgba(168, 85, 247, 0.2);
    animation-duration: 30s;
    animation-direction: reverse;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.1);
}

.pi-ring.ring-3 {
    width: 480px;
    height: 480px;
    border-color: rgba(236, 72, 153, 0.15);
    animation-duration: 40s;
    box-shadow: 0 0 50px rgba(236, 72, 153, 0.08);
}

@keyframes piFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes piGlow {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 30px rgba(0, 212, 255, 0.5)); }
    50% { filter: brightness(1.2) drop-shadow(0 0 50px rgba(168, 85, 247, 0.6)); }
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

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

/* Feature Cards Container */
.feature-cards-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.feature-cards-container .feature-card {
    pointer-events: auto;
}

/* Feature Cards */
.feature-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 220px;
    animation: cardFloat 5s ease-in-out infinite;
    /* 卡片现在是真实入口（<a>），去掉链接默认样式 */
    text-decoration: none;
    color: inherit;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.5), rgba(168, 85, 247, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.03);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 48px rgba(0, 212, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon svg {
    width: 26px;
    height: 26px;
    color: var(--electric-blue);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* Card Positions */
.card-top {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.card-top-left {
    top: 22%;
    left: 5%;
    animation-delay: 0.5s;
}

.card-top-right {
    top: 22%;
    right: 5%;
    animation-delay: 1s;
}

.card-bottom-left {
    bottom: 22%;
    left: 5%;
    animation-delay: 1.5s;
}

.card-bottom-right {
    bottom: 22%;
    right: 5%;
    animation-delay: 2s;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.card-top:hover,
.card-top-left:hover,
.card-top-right:hover,
.card-bottom-left:hover,
.card-bottom-right:hover {
    animation-play-state: paused;
}

/* Floating Formulas */
.formula {
    position: absolute;
    font-family: 'Orbitron', serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 500;
    pointer-events: none;
    animation: formulaFloat 8s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.formula-1 { top: 10%; left: 15%; animation-delay: 0s; }
.formula-2 { top: 15%; right: 18%; animation-delay: 1.5s; }
.formula-3 { bottom: 25%; left: 12%; animation-delay: 3s; }
.formula-4 { bottom: 15%; right: 15%; animation-delay: 4.5s; }
.formula-5 { top: 45%; left: 8%; animation-delay: 2s; }
.formula-6 { top: 50%; right: 10%; animation-delay: 5s; }

@keyframes formulaFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.25; }
    50% { transform: translateY(-20px) rotate(3deg); opacity: 0.45; }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .pi-core {
        width: 220px;
        height: 220px;
    }

    .pi-symbol {
        font-size: 120px;
    }

    .pi-ring.ring-1 {
        width: 260px;
        height: 260px;
    }

    .pi-ring.ring-2 {
        width: 320px;
        height: 320px;
    }

    .pi-ring.ring-3 {
        width: 380px;
        height: 380px;
    }

    .feature-card {
        padding: 14px 18px;
        min-width: 180px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .card-icon svg {
        width: 22px;
        height: 22px;
    }

    .card-title {
        font-size: 14px;
    }

    .card-desc {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 42px;
    }

    .pi-core {
        width: 180px;
        height: 180px;
    }

    .pi-symbol {
        font-size: 90px;
    }

    .pi-ring.ring-1 {
        width: 220px;
        height: 220px;
    }

    .pi-ring.ring-2 {
        width: 270px;
        height: 270px;
    }

    .pi-ring.ring-3 {
        width: 320px;
        height: 320px;
    }

    .feature-cards-container {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px 0;
        pointer-events: auto;
    }

    .feature-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: 100%;
        margin-bottom: 0;
        animation: cardFloat 4s ease-in-out infinite;
    }

    .formula {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 34px;
    }

    .hero-content p.text-lg {
        font-size: 16px;
    }

    .pi-core {
        width: 150px;
        height: 150px;
    }

    .pi-symbol {
        font-size: 70px;
    }
}

/* Performance optimizations */
.pi-core,
.feature-card,
.formula {
    will-change: transform;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   探索地图 (Exploration Map)
   ============================================================ */
.map-stage {
    position: relative;
    width: 100%;
    height: calc(100vh - 5rem);
    min-height: 620px;
    overflow: hidden;
}

.map-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.22), rgba(168, 85, 247, 0.12) 50%, transparent 72%);
    border: 1px solid rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3), inset 0 0 30px rgba(168, 85, 247, 0.15);
    z-index: 5;
    animation: corePulse 4s ease-in-out infinite;
}

.map-core .core-symbol {
    font-family: 'Orbitron', sans-serif;
    font-size: 54px;
    font-weight: 900;
    background: linear-gradient(180deg, #ffffff 0%, #00d4ff 55%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5));
}

.map-core .core-label {
    position: absolute;
    bottom: -26px;
    font-size: 11px;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

@keyframes corePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 50px rgba(0, 212, 255, 0.3), inset 0 0 30px rgba(168, 85, 247, 0.15); }
    50% { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 0 70px rgba(0, 212, 255, 0.45), inset 0 0 40px rgba(168, 85, 247, 0.25); }
}

.map-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.map-lines path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 1;
    stroke-dasharray: 4 6;
    transition: stroke 0.4s ease;
}

.map-lines path.active {
    stroke: rgba(0, 212, 255, 0.6);
    stroke-width: 1.5;
}

.island-node {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.island-node:hover {
    transform: translate(-50%, -50%) scale(1.18);
    z-index: 20;
}

.island-dot {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid currentColor;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 26px -4px currentColor;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.island-node:hover .island-dot {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 44px -2px currentColor, inset 0 0 22px rgba(255, 255, 255, 0.12);
}

.island-label {
    margin-top: 11px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
}

.island-progress {
    margin-top: 5px;
    width: 58px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.island-progress > span {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    transition: width 0.6s ease;
}

.map-hint {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    z-index: 15;
    text-align: center;
    letter-spacing: 0.05em;
}

/* 岛屿详情页 */
.island-hero {
    position: relative;
    padding: 7rem 1.5rem 3rem;
    text-align: center;
    overflow: hidden;
}

.island-hero .island-badge {
    width: 110px;
    height: 110px;
    border-radius: 30px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 700;
    color: #fff;
    border: 2px solid currentColor;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 50px -8px currentColor;
}

.island-hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.island-hero p {
    max-width: 560px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
}

.topic-grid {
    max-width: 880px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.topic-card {
    padding: 1.4rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-6px);
    border-color: currentColor;
    box-shadow: 0 12px 40px -12px currentColor;
}

.topic-card .topic-index {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: currentColor;
    opacity: 0.8;
}

.topic-card h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.topic-card .topic-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.back-link {
    position: fixed;
    top: 6.5rem;
    left: 1.5rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
}

.back-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .island-dot {
        width: 58px;
        height: 58px;
        font-size: 26px;
    }
    .island-label {
        font-size: 11px;
    }
    .map-core {
        width: 96px;
        height: 96px;
    }
    .map-core .core-symbol {
        font-size: 40px;
    }
    .island-hero h1 {
        font-size: 1.8rem;
    }
    .island-hero .island-badge {
        width: 84px;
        height: 84px;
        font-size: 38px;
    }
}

/* ============================================================
   单题训练 (Practice / Socratic Hint Ladder)
   ============================================================ */
.practice-progress-top {
    position: fixed; top: 0; left: 0; right: 0; height: 3px;
    background: rgba(255, 255, 255, 0.06); z-index: 50;
}
.practice-progress-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--electric-blue), var(--neon-purple));
    box-shadow: 0 0 10px var(--electric-blue);
    transition: width 0.5s ease;
}

.practice-wrap {
    max-width: 1180px; margin: 0 auto; padding: 5.5rem 1.5rem 4rem;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: start;
}

.practice-head { margin-bottom: 1.2rem; }
.practice-island {
    font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--electric-blue); margin-bottom: 0.3rem;
}
.practice-title {
    font-size: 1.9rem; font-weight: 800; font-family: 'Orbitron', 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #00d4ff, #a855f7, #ec4899);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.practice-meta { margin-top: 0.6rem; display: flex; gap: 0.5rem; align-items: center; }
.meta-chip {
    font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.05);
}
.meta-chip.diff-入门 { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.35); }
.meta-chip.diff-基础 { color: #a78bfa; border-color: rgba(167, 139, 250, 0.35); }
.meta-chip.diff-提高 { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.meta-chip.diff-挑战 { color: #f43f5e; border-color: rgba(244, 63, 94, 0.35); }
.meta-code { font-size: 0.75rem; color: rgba(255, 255, 255, 0.4); font-family: 'Orbitron', monospace; }

.problem-card {
    border-radius: 22px; padding: 1.8rem; margin-bottom: 1.2rem;
    border: 1px solid rgba(0, 212, 255, 0.18);
}
.problem-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.tag-chip {
    font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 8px;
    background: rgba(168, 85, 247, 0.12); border: 1px solid rgba(168, 85, 247, 0.3); color: #d8b4fe;
}
.problem-text {
    font-size: 1.25rem; line-height: 1.85; color: #fff; font-weight: 500;
}

.answer-zone {
    border-radius: 18px; padding: 1.2rem 1.4rem; margin-bottom: 1.2rem;
}
.answer-label { display: block; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); margin-bottom: 0.5rem; }
.answer-input {
    width: 100%; resize: vertical; border-radius: 12px; padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff; font-family: inherit; font-size: 0.95rem; line-height: 1.6;
}
.answer-input:focus { outline: none; border-color: rgba(0, 212, 255, 0.5); box-shadow: 0 0 16px rgba(0, 212, 255, 0.15); }
.answer-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.8rem; flex-wrap: wrap; }
.answer-submit { padding: 0.6rem 1.2rem; border-radius: 12px; font-size: 0.9rem; }
.attempt-counter { font-size: 0.78rem; color: rgba(255, 255, 255, 0.5); }
.submit-feedback {
    max-height: 0; overflow: hidden; opacity: 0; transition: all 0.35s ease;
    font-size: 0.85rem; color: var(--fluoro-cyan); margin-top: 0;
}
.submit-feedback.show { max-height: 60px; opacity: 1; margin-top: 0.6rem; }

.nav-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.nav-btn { padding: 0.55rem 1.1rem; border-radius: 12px; font-size: 0.88rem; }
.nav-indicator { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); min-width: 56px; text-align: center; }
.done-btn { margin-left: auto; color: #34d399; border-color: rgba(52, 211, 153, 0.4); }
.done-btn:hover { background: rgba(52, 211, 153, 0.12); }

.practice-right {
    position: sticky; top: 5.5rem;
    background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 22px; padding: 1.5rem;
}
.coach-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.coach-avatar {
    width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif; font-size: 1.4rem; font-weight: 800;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(0, 212, 255, 0.4); color: #fff; box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}
.coach-name { font-weight: 700; font-size: 1rem; }
.coach-sub { font-size: 0.75rem; color: rgba(255, 255, 255, 0.5); }

.ladder-explain {
    font-size: 0.82rem; line-height: 1.7; color: rgba(255, 255, 255, 0.6);
    background: rgba(168, 85, 247, 0.08); border: 1px solid rgba(168, 85, 247, 0.18);
    border-radius: 12px; padding: 0.7rem 0.9rem; margin-bottom: 1rem;
}
.ladder-explain strong { color: #d8b4fe; }

.ladder-steps { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.ladder-step {
    flex: 1; text-align: center; font-size: 0.7rem; padding: 0.5rem 0.2rem; border-radius: 10px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5); transition: all 0.3s ease;
}
.ladder-step .dot {
    display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center;
    font-size: 0.7rem; background: rgba(255, 255, 255, 0.1); margin-right: 0.2rem;
}
.ladder-step.active { border-color: rgba(0, 212, 255, 0.5); color: #fff; box-shadow: 0 0 16px rgba(0, 212, 255, 0.15); }
.ladder-step.active .dot { background: rgba(0, 212, 255, 0.3); color: #fff; }
.ladder-step.done { border-color: rgba(52, 211, 153, 0.5); color: #34d399; }
.ladder-step.done .dot { background: rgba(52, 211, 153, 0.3); color: #fff; }

.hint-thread {
    display: flex; flex-direction: column; gap: 0.7rem; min-height: 80px; margin-bottom: 1rem;
    max-height: 340px; overflow-y: auto; padding-right: 0.3rem;
}
.hint-empty { font-size: 0.82rem; color: rgba(255, 255, 255, 0.4); line-height: 1.7; text-align: center; padding: 1.5rem 0.5rem; }

.hint-bubble {
    border-radius: 14px; padding: 0.8rem 1rem; background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.2); animation: fadeInUp 0.4s ease both;
}
.hint-bubble-body { font-size: 0.92rem; line-height: 1.75; color: #e6f6ff; }
.hint-bubble-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.hint-lv { font-size: 0.72rem; color: var(--electric-blue); font-weight: 600; letter-spacing: 0.05em; }
.hint-lv4-badge { font-size: 0.66rem; color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.4); border-radius: 6px; padding: 0.1rem 0.4rem; }
.hint-bubble.lv-4 { background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.35); }
.hint-bubble.lv-4 .hint-lv { color: #d8b4fe; }

.hint-trigger {
    width: 100%; padding: 0.75rem; border-radius: 14px; font-size: 0.92rem; font-weight: 600;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(0, 212, 255, 0.4); color: #fff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.12); transition: all 0.25s ease;
}
.hint-trigger:hover:not(:disabled) { background: rgba(0, 212, 255, 0.18); box-shadow: 0 0 30px rgba(0, 212, 255, 0.25); }
.hint-trigger:disabled { opacity: 0.5; cursor: not-allowed; }
.hint-trigger.locked { border-color: rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.55); box-shadow: none; }
.hint-note { font-size: 0.76rem; line-height: 1.6; color: rgba(255, 255, 255, 0.5); margin-top: 0.6rem; min-height: 1.1em; }

/* 联动细节：计数器弹跳 / Lv4 解锁脉冲 / 空提示高亮 */
.attempt-counter.bump { animation: counterBump 0.45s ease; }
@keyframes counterBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); color: var(--fluoro-cyan); text-shadow: 0 0 12px var(--fluoro-cyan); }
  100% { transform: scale(1); }
}

.hint-trigger.pulse {
  border-color: rgba(168, 85, 247, 0.7) !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(0, 212, 255, 0.18)) !important;
  animation: hintPulse 1.4s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(168, 85, 247, 0.25); }
  50%      { box-shadow: 0 0 34px rgba(168, 85, 247, 0.6); }
}

.hint-empty b { color: var(--fluoro-cyan); font-weight: 700; }

.practice-enter {
    display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.4rem;
    padding: 0.6rem 1.4rem; border-radius: 12px; font-weight: 600; font-size: 0.92rem;
    text-decoration: none; background: rgba(255, 255, 255, 0.05); transition: all 0.25s ease;
}
.practice-enter:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

@media (max-width: 900px) {
    .practice-wrap { grid-template-columns: 1fr; padding-top: 6rem; }
    .practice-right { position: static; }
}

/* ============================================================
   π教练主页 (Coach Home)
   ============================================================ */
.coach-wrap {
    max-width: 980px; margin: 0 auto; padding: 6.5rem 1.5rem 4rem;
    display: flex; flex-direction: column; gap: 1.4rem;
}

.coach-hero {
    display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
    border-radius: 24px; padding: 1.8rem 2rem; position: relative;
    border: 1px solid rgba(0, 212, 255, 0.18);
}
.coach-face {
    position: relative; width: 76px; height: 76px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.coach-face-symbol {
    font-family: 'Orbitron', sans-serif; font-size: 2.4rem; font-weight: 800; color: #fff; z-index: 2;
    text-shadow: 0 0 18px rgba(0, 212, 255, 0.6);
}
.coach-face-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(0,212,255,0.5), rgba(168,85,247,0.5), rgba(0,212,255,0.5));
    filter: blur(2px); opacity: 0.5; animation: spinSlow 6s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
.coach-hero-text { flex: 1; min-width: 220px; }
.coach-title { font-size: 1.8rem; font-weight: 800; }
.coach-sub { font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.7; margin-top: 0.4rem; }

.coach-toggle { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; user-select: none; }
.coach-toggle input { display: none; }
.coach-toggle-track {
    width: 42px; height: 24px; border-radius: 999px; background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2); position: relative; transition: all 0.25s ease;
}
.coach-toggle-thumb {
    position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: all 0.25s ease;
}
.coach-toggle input:checked + .coach-toggle-track { background: rgba(244,63,94,0.4); border-color: rgba(244,63,94,0.5); }
.coach-toggle input:checked + .coach-toggle-track .coach-toggle-thumb { transform: translateX(18px); }
.coach-toggle-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); }

.coach-invite { border-radius: 20px; padding: 1.4rem 1.6rem; }
.invite-row { display: flex; align-items: flex-start; gap: 0.9rem; }
.invite-avatar {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-family: 'Orbitron', sans-serif;
    font-weight: 800; color: #fff; background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(168,85,247,0.2));
    border: 1px solid rgba(0,212,255,0.4);
}
.invite-bubble {
    flex: 1; font-size: 1rem; line-height: 1.75; color: #e6f6ff;
    background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.2);
    border-radius: 14px; padding: 0.9rem 1.1rem;
}
.invite-actions { display: flex; justify-content: flex-end; margin-top: 0.8rem; }
.invite-refresh { padding: 0.45rem 1rem; border-radius: 10px; font-size: 0.82rem; }

.coach-profile { border-radius: 24px; padding: 1.8rem 2rem; }
.profile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.profile-head h2 { font-size: 1.3rem; font-weight: 800; font-family: 'Orbitron', 'Noto Sans SC', sans-serif; }
.profile-source { font-size: 0.72rem; color: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.12); padding: 0.2rem 0.6rem; border-radius: 999px; }
.profile-body { display: grid; grid-template-columns: 360px 1fr; gap: 1.6rem; align-items: center; }
.radar-box { display: flex; align-items: center; justify-content: center; }
.radar-box canvas { max-width: 100%; height: auto; }

.profile-side { display: flex; flex-direction: column; gap: 1rem; }
.tag-group { }
.tag-label { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; }
.tag-good { color: #34d399; }
.tag-grow { color: #fbbf24; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag-chip {
    font-size: 0.78rem; padding: 0.25rem 0.7rem; border-radius: 999px;
    background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.3); color: #d8b4fe;
}
.tag-strong { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.35); color: #6ee7b7; }
.tag-growchip { background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.35); color: #fcd34d; }
.profile-desc { font-size: 0.92rem; line-height: 1.8; color: rgba(255,255,255,0.72); }

@media (max-width: 760px) {
    .coach-wrap { padding-top: 5.5rem; }
    .profile-body { grid-template-columns: 1fr; }
    .radar-box canvas { width: 300px; height: 300px; }
    .coach-hero { flex-direction: column; text-align: center; }
    .coach-toggle { margin-top: 0.4rem; }
}

/* ============ 家长后台 ============ */
.parent-wrap { max-width: 1040px; margin: 0 auto; padding: 6rem 1.2rem 4rem; }
.parent-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.parent-title { font-size: 2rem; font-weight: 900; }
.parent-sub { font-size: 0.85rem; color: rgba(255,255,255,0.55); margin-top: 0.3rem; }
.parent-badge { font-size: 0.75rem; color: rgba(0,212,255,0.9); border: 1px solid rgba(0,212,255,0.3); padding: 0.3rem 0.8rem; border-radius: 999px; background: rgba(0,212,255,0.08); }
.parent-note { font-size: 0.85rem; line-height: 1.7; color: rgba(255,255,255,0.65); padding: 1rem 1.3rem; margin-bottom: 1.4rem; }
.parent-note strong { color: #7dd3fc; }
.parent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1.2rem; }
.parent-card { border-radius: 20px; padding: 1.5rem 1.6rem; }
.parent-card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; color: #fff; }
.stat-row { display: flex; gap: 1rem; margin-bottom: 1.2rem; }
.stat-box { flex: 1; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 1rem; text-align: center; }
.stat-num { font-size: 2rem; font-weight: 900; background: linear-gradient(90deg,#00d4ff,#a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-top: 0.2rem; }
.stat-sub { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin: 0.6rem 0 0.5rem; }
.src-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.src-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.src-item b { color: #fff; margin-left: 0.2rem; }
.src-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.island-dist { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.3rem; }
.summary-text { font-size: 0.95rem; line-height: 1.9; color: rgba(255,255,255,0.78); }
.parent-summary { margin-bottom: 1.2rem; }
.parent-consent { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.consent-title { font-weight: 700; color: #fff; }
.consent-sub { font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-top: 0.3rem; max-width: 520px; }
.consent-hidden-note { font-size: 0.85rem; color: rgba(255,255,255,0.6); font-style: italic; margin-top: 0.6rem; }

@media (max-width: 760px) {
    .parent-grid { grid-template-columns: 1fr; }
    .parent-wrap { padding-top: 5.5rem; }
    .parent-title { font-size: 1.6rem; }
}

/* ============ 拍题 OCR ============ */
.photo-wrap { max-width: 760px; margin: 0 auto; padding: 6rem 1.2rem 4rem; }
.photo-hero { text-align: center; margin-bottom: 1.6rem; }
.photo-title { font-size: 2rem; font-weight: 900; }
.photo-sub { font-size: 0.88rem; line-height: 1.7; color: rgba(255,255,255,0.6); margin-top: 0.5rem; }
.photo-sub b { color: #fca5a5; }
.photo-card { border-radius: 20px; padding: 1.5rem 1.6rem; margin-bottom: 1.2rem; }
.photo-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.photo-btn { cursor: pointer; }
.photo-preview { margin: 1.2rem 0; min-height: 200px; border: 1.5px dashed rgba(255,255,255,0.15); border-radius: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(0,0,0,0.2); }
.photo-placeholder { color: rgba(255,255,255,0.4); font-size: 0.9rem; }
.photo-preview img, .photo-preview video { max-width: 100%; max-height: 360px; border-radius: 12px; }
.photo-capture-row { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.photo-ocr { width: 100%; margin-top: 0.4rem; }
.photo-progress { margin-top: 0.8rem; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.photo-progress-bar { height: 6px; background: linear-gradient(90deg,#00d4ff,#a855f7); border-radius: 999px; width: 0%; transition: width 0.3s; margin-bottom: 0.4rem; }
.photo-card-title { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.8rem; }
.photo-tip { font-size: 0.78rem; color: rgba(255,255,255,0.45); font-weight: 400; }
.photo-text { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; color: #fff; padding: 0.9rem; font-size: 0.95rem; line-height: 1.6; resize: vertical; }
.photo-text:focus { outline: none; border-color: rgba(0,212,255,0.5); }
.photo-final-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.photo-go { background: linear-gradient(90deg,#00d4ff,#a855f7); color: #fff; border: none; }
.photo-note { font-size: 0.82rem; color: rgba(255,255,255,0.55); }
.photo-foot { font-size: 0.8rem; color: rgba(255,255,255,0.4); line-height: 1.7; text-align: center; margin-top: 0.5rem; }

@media (max-width: 760px) {
    .photo-wrap { padding-top: 5.5rem; }
    .photo-title { font-size: 1.6rem; }
}

/* ============ practice 自由模式输入区 ============ */
.free-entry { margin-bottom: 1.2rem; }
.free-entry .answer-label { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 0.5rem; }
.free-entry .answer-input { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; color: #fff; padding: 0.9rem; font-size: 0.95rem; line-height: 1.6; resize: vertical; }
.free-entry .answer-input:focus { outline: none; border-color: rgba(0,212,255,0.5); }
.free-entry .answer-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.8rem; flex-wrap: wrap; }

/* ============ 通用子页面包装（实验室/侦探/树/收藏） ============ */
.feature-wrap { max-width: 980px; margin: 0 auto; padding: 6rem 1.2rem 4rem; }
.feature-hero { text-align: center; margin-bottom: 1.8rem; }
.feature-title { font-size: 2.1rem; font-weight: 900; }
.feature-sub { font-size: 0.9rem; line-height: 1.8; color: rgba(255,255,255,0.6); margin-top: 0.6rem; max-width: 640px; margin-left: auto; margin-right: auto; }
.feature-note { font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.8; border-left: 2px solid rgba(0,212,255,0.4); padding: 0.6rem 0 0.6rem 1rem; margin: 0 auto 1.6rem; max-width: 720px; }
.feature-note b { color: #7dd3fc; }

/* ============ 错误模式实验室（机制三） ============ */
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.lab-card { border-radius: 20px; padding: 1.4rem 1.5rem; position: relative; overflow: hidden; }
.lab-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% -10%, rgba(168,85,247,0.18), transparent 60%); pointer-events: none; }
.lab-icon { font-size: 1.8rem; filter: drop-shadow(0 0 10px rgba(0,212,255,0.4)); }
.lab-pattern-name { font-size: 1.15rem; font-weight: 800; margin: 0.5rem 0 0.2rem; color: #fff; cursor: text; }
.lab-pattern-label { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-bottom: 0.6rem; }
.lab-neutral { font-size: 0.92rem; line-height: 1.7; color: rgba(255,255,255,0.8); }
.lab-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 0.9rem; font-size: 0.78rem; color: rgba(255,255,255,0.5); }
.lab-occurrence { background: rgba(0,212,255,0.12); color: #7dd3fc; padding: 0.15rem 0.6rem; border-radius: 999px; }
.lab-card-actions { display: flex; gap: 0.5rem; margin-top: 0.8rem; }
.lab-add { display: flex; align-items: center; justify-content: center; gap: 0.5rem; border: 1.5px dashed rgba(255,255,255,0.2); border-radius: 20px; padding: 1.4rem; color: rgba(255,255,255,0.7); cursor: pointer; transition: all 0.25s; font-weight: 600; min-height: 100%; }
.lab-add:hover { border-color: rgba(0,212,255,0.5); color: #7dd3fc; background: rgba(0,212,255,0.05); }
.lab-empty { grid-column: 1 / -1; text-align: center; color: rgba(255,255,255,0.5); padding: 2.5rem 1rem; font-size: 0.92rem; line-height: 1.8; }

/* ============ 数学侦探任务（机制四） ============ */
.detective-story { border-radius: 20px; padding: 1.8rem 2rem; line-height: 2; font-size: 1rem; color: rgba(255,255,255,0.85); white-space: pre-wrap; }
.detective-theme { display: inline-block; font-size: 0.78rem; color: #fcd34d; background: rgba(251,191,36,0.12); padding: 0.2rem 0.7rem; border-radius: 999px; margin-bottom: 0.9rem; }
.detective-puzzles { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.6rem; }
.detective-puzzle { border-radius: 18px; padding: 1.3rem 1.5rem; }
.puzzle-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.puzzle-num { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg,#00d4ff,#a855f7); color: #050816; font-weight: 800; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.puzzle-q { font-size: 0.98rem; line-height: 1.7; color: #fff; }
.puzzle-hint-area { margin-top: 0.9rem; }
.puzzle-actions { display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }

/* ============ 思维树（机制五 成长可视化） ============ */
.tree-stage { position: relative; border-radius: 24px; padding: 2rem 1rem 2.5rem; min-height: 420px; overflow: hidden; background: linear-gradient(180deg, rgba(5,8,22,0.4), rgba(20,12,40,0.5)); }
.tree-trunk { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 14px; height: 230px; background: linear-gradient(90deg,#5b4636,#7c5c43); border-radius: 8px 8px 0 0; }
.tree-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(180deg, transparent, rgba(34,211,238,0.08)); }
.tree-blooms { position: relative; display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: center; align-items: flex-end; padding-top: 1rem; z-index: 2; }
.tree-bloom { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; width: 90px; cursor: default; transition: transform 0.3s; }
.tree-bloom:hover { transform: translateY(-4px); }
.tree-flower { font-size: 2.6rem; line-height: 1; filter: grayscale(0.6) opacity(0.4); transition: all 0.5s; }
.tree-bloom[data-stage="bud"] .tree-flower { filter: grayscale(0.2) opacity(0.7); font-size: 2rem; }
.tree-bloom[data-stage="bloom"] .tree-flower { filter: grayscale(0) opacity(1); text-shadow: 0 0 16px currentColor; }
.tree-bloom[data-stage="full"] .tree-flower { filter: grayscale(0) opacity(1); font-size: 3.1rem; text-shadow: 0 0 24px currentColor; animation: bloomPulse 3s ease-in-out infinite; }
@keyframes bloomPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.tree-bloom-name { font-size: 0.72rem; color: rgba(255,255,255,0.6); text-align: center; }
.tree-bloom-prog { font-size: 0.66rem; color: rgba(255,255,255,0.4); }
.tree-notes { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 0.7rem; }
.tree-note-item { font-size: 0.88rem; color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.04); border-radius: 12px; padding: 0.7rem 1rem; border-left: 2px solid rgba(52,211,153,0.5); }
.tree-note-date { font-size: 0.7rem; color: rgba(255,255,255,0.35); margin-right: 0.5rem; }
.tree-stat { text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 1rem; }

/* ============ 错题花园 / 笔记（持久化） ============ */
.notes-filters { display: flex; gap: 0.6rem; justify-content: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; }
.note-card { border-radius: 18px; padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; }
.note-type { font-size: 0.72rem; padding: 0.15rem 0.6rem; border-radius: 999px; align-self: flex-start; }
.note-type.wrong { background: rgba(244,63,94,0.14); color: #fda4af; }
.note-type.note { background: rgba(0,212,255,0.14); color: #7dd3fc; }
.note-type.favorite { background: rgba(251,191,36,0.14); color: #fcd34d; }
.note-problem { font-size: 0.92rem; line-height: 1.65; color: #fff; }
.note-child { font-size: 0.86rem; line-height: 1.6; color: rgba(255,255,255,0.75); font-style: italic; border-top: 1px dashed rgba(255,255,255,0.12); padding-top: 0.5rem; }
.note-meta { font-size: 0.74rem; color: rgba(255,255,255,0.45); display: flex; gap: 0.8rem; flex-wrap: wrap; }
.note-mastered { color: #6ee7b7; }
.note-actions { display: flex; gap: 0.5rem; margin-top: 0.3rem; flex-wrap: wrap; }
.note-empty { grid-column: 1 / -1; text-align: center; color: rgba(255,255,255,0.5); padding: 2.5rem 1rem; font-size: 0.92rem; line-height: 1.8; }

/* ============ 通用小按钮 ============ */
.btn-ghost { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); border-radius: 12px; padding: 0.5rem 1rem; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.btn-ghost:hover { border-color: rgba(0,212,255,0.5); color: #7dd3fc; }
.btn-primary { background: linear-gradient(90deg,#00d4ff,#a855f7); color: #fff; border: none; border-radius: 12px; padding: 0.5rem 1.1rem; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-sm { font-size: 0.78rem; padding: 0.35rem 0.8rem; }

/* ============ 每日时长硬上限 指示器 + 全屏提示 ============ */
.session-indicator { display: flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; color: rgba(255,255,255,0.6); cursor: pointer; user-select: none; }
.session-ring { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#00d4ff var(--p, 0%), rgba(255,255,255,0.12) 0%); display: flex; align-items: center; justify-content: center; transition: background 0.4s; }
.session-ring::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #0a0e22; }
.session-indicator.warn .session-ring { background: conic-gradient(#fbbf24 var(--p, 0%), rgba(255,255,255,0.12) 0%); }
.session-label { white-space: nowrap; }
.session-overlay { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, rgba(10,14,34,0.9), rgba(5,8,22,0.97)); backdrop-filter: blur(6px); }
.session-overlay.show { display: flex; animation: fadeIn 0.6s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.session-card { text-align: center; max-width: 460px; padding: 2.5rem 2rem; border-radius: 28px; }
.session-moon { font-size: 3.4rem; }
.session-card h2 { font-size: 1.5rem; font-weight: 800; margin: 0.8rem 0 0.6rem; }
.session-card p { font-size: 0.95rem; line-height: 1.8; color: rgba(255,255,255,0.7); }
.session-card .session-actions { margin-top: 1.6rem; display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.session-settings { margin-top: 1rem; font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.session-settings input { width: 56px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; color: #fff; padding: 0.2rem 0.4rem; text-align: center; }

/* ============ 通用模态框 ============ */
.modal-overlay { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; background: rgba(5,8,22,0.8); backdrop-filter: blur(4px); padding: 1rem; }
.modal-overlay.show { display: flex; }
.modal-box { width: 100%; max-width: 480px; border-radius: 22px; padding: 1.6rem 1.7rem; }
.modal-box h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.4rem; }
.modal-box .modal-sub { font-size: 0.84rem; color: rgba(255,255,255,0.6); line-height: 1.7; margin-bottom: 1rem; }
.modal-field { margin-bottom: 1rem; }
.modal-field label { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.7); margin-bottom: 0.4rem; }
.modal-field select, .modal-field input, .modal-field textarea { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; color: #fff; padding: 0.7rem 0.8rem; font-size: 0.9rem; font-family: inherit; }
.modal-field select:focus, .modal-field input:focus, .modal-field textarea:focus { outline: none; border-color: rgba(0,212,255,0.5); }
.modal-field textarea { resize: vertical; line-height: 1.6; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.icon-picker span { font-size: 1.3rem; cursor: pointer; padding: 0.2rem 0.35rem; border-radius: 10px; transition: all 0.2s; }
.icon-picker span:hover, .icon-picker span.active { background: rgba(0,212,255,0.18); }
.modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.2rem; }

/* 移动端间距 */
@media (max-width: 760px) {
    .feature-wrap { padding-top: 5.5rem; }
    .feature-title { font-size: 1.6rem; }
    .detective-story { padding: 1.3rem; font-size: 0.92rem; }
    .tree-stage { min-height: 360px; }
}

/* ============ 练习页：卡壳后引导面板 ============ */
.post-done { margin-top: 1.1rem; padding: 1.1rem 1.2rem; border-radius: 16px; }
.post-done-title { font-size: 0.95rem; font-weight: 700; color: #fff; }
.post-done-sub { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin: 0.3rem 0 0.8rem; }
.post-done-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.post-done-result { font-size: 0.82rem; color: #6ee7b7; margin-top: 0.7rem; }
.post-done-result a { color: #7dd3fc; text-decoration: underline; }

/* ============ 三段式（学习 → 典型题训练 → 自测）进度条 ============ */
.stage-track {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0.7rem 0 0.6rem;
}

.stage-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex: none;
}

.stage-dot.doing {
    background: transparent;
    border-width: 2px;
}

.stage-dot.done {
    border-color: transparent;
}

.stage-line {
    height: 1px;
    width: 18px;
    background: rgba(255, 255, 255, 0.14);
    flex: none;
}

.stage-now {
    margin-left: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: currentColor;
    opacity: 0.85;
}

/* ============ 学习小课 learn.html ============ */
.learn-wrap {
    max-width: 720px;
    margin: 7.5rem auto 5rem;
    padding: 0 1.5rem;
}

.learn-kicker {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    opacity: 0.8;
}

.learn-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0.6rem 0 1rem;
    line-height: 1.35;
}

.learn-hook {
    padding: 1.1rem 1.3rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid currentColor;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
}

.learn-step {
    margin-top: 1.1rem;
    padding: 1.2rem 1.3rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.learn-step.locked {
    opacity: 0.35;
    pointer-events: none;
}

.learn-step .step-no {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: currentColor;
}

.learn-step .step-ask {
    margin: 0.55rem 0 0;
    font-size: 1.02rem;
    line-height: 1.7;
    color: #fff;
    font-weight: 600;
}

.learn-step .step-reveal {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    font-size: 0.95rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.78);
    animation: fadeUp 0.4s ease;
}

.learn-btn {
    margin-top: 0.9rem;
    padding: 0.55rem 1.1rem;
    border-radius: 12px;
    font-size: 0.86rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid currentColor;
    color: currentColor;
    transition: all 0.25s ease;
}

.learn-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.learn-summary {
    margin-top: 1.8rem;
    padding: 1.3rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid currentColor;
}

.learn-summary h4 {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: currentColor;
    margin-bottom: 0.4rem;
}

.learn-summary p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1rem;
}

.learn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.4rem;
    padding: 0.8rem 1.5rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    color: #050816;
    background: currentColor;
}

.learn-next span { color: #050816; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ============ 自测 quiz.html ============ */
.quiz-wrap {
    max-width: 720px;
    margin: 7.5rem auto 5rem;
    padding: 0 1.5rem;
}

.quiz-note {
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    font-size: 0.86rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.quiz-card {
    margin-top: 1.1rem;
    padding: 1.3rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.quiz-card .q-no {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: currentColor;
}

.quiz-card .q-text {
    margin: 0.6rem 0 1rem;
    font-size: 1rem;
    line-height: 1.8;
    color: #fff;
}

.quiz-card textarea {
    width: 100%;
    min-height: 84px;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e6f1ff;
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
}

.quiz-card textarea:focus { border-color: currentColor; }

.quiz-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.quiz-chip {
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    font-size: 0.82rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.2s ease;
}

.quiz-chip:hover { background: rgba(255, 255, 255, 0.1); }

.quiz-chip.on {
    border-color: currentColor;
    color: currentColor;
    background: rgba(255, 255, 255, 0.1);
}

.quiz-feedback {
    margin-top: 1.6rem;
    padding: 1.4rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid currentColor;
    font-size: 0.98rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.85);
    animation: fadeUp 0.4s ease;
}

/* ============ 典型题训练模式横幅（三段式第二段） ============ */
.drill-banner {
    margin-bottom: 1rem;
    padding: 0.95rem 1.2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    font-size: 0.86rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

.drill-banner .drill-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: #00d4ff;
    margin-bottom: 0.35rem;
}

.drill-banner .drill-bar {
    margin-top: 0.6rem;
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.drill-banner .drill-bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: #00d4ff;
    box-shadow: 0 0 10px #00d4ff;
    transition: width 0.4s ease;
}

.drill-banner a {
    color: #00d4ff;
    text-decoration: underline;
}

/* 从服务端恢复的历史进度提示 */
.hint-restored {
    margin-bottom: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
}

/* ============ 家长后台：每日时长设定 ============ */
.cap-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.cap-label {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.55);
}

.cap-input {
    width: 84px;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e6f1ff;
    font-size: 0.92rem;
    outline: none;
}

.cap-input:focus { border-color: rgba(0, 212, 255, 0.5); }

.cap-hint {
    font-size: 0.8rem;
    color: rgba(0, 212, 255, 0.8);
}

.cap-week {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 1.4rem;
    height: 72px;
}

.cap-week .cap-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    height: 72px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.35);
}

.cap-week .cap-bar {
    width: 100%;
    max-width: 34px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.75), rgba(0, 212, 255, 0.2));
    min-height: 3px;
}

.cap-week .cap-day-label {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1;
}

.cap-week .cap-day-min {
    font-size: 0.58rem;
    color: rgba(0, 212, 255, 0.65);
    line-height: 1;
}

.coach-toggle.cap-locked {
    border-left: 2px solid rgba(255, 196, 0, 0.5);
    padding-left: 10px;
    border-radius: 4px;
}
