/* Shared visual language from jiaji/Web. Keep exercise state colors intact. */
:root {
    --jj-blue: #1769ff;
    --jj-ink: #071225;
    --jj-muted: #48699f;
    --jj-line: #c9dfff;
    --jj-surface: #edf6ff;
}
.jj-header {
    box-sizing: border-box;
    position: relative;
    z-index: 30;
    width: 100%;
    padding: 14px 32px;
    background: linear-gradient(180deg, #f6fbff, #edf7ff);
    border-bottom: 1px solid #c9dfff;
    font-family: Inter, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    color: var(--jj-ink);
}
.jj-header-inner, .jj-header-main, .jj-brand, .jj-header .nav-menu { display: flex; align-items: center; }
.jj-header-inner { justify-content: space-between; gap: 24px; }
.jj-header-main { gap: 48px; min-width: 0; }
.jj-brand { gap: 0; flex-shrink: 0; text-decoration: none; }
.jj-brand > img { display: block; width: 172px; height: auto; max-height: 54px; object-fit: contain; }
.jj-brand > span { display: none; }
.jj-brand strong { display: block; font-size: 23px; line-height: 1.25; color: #123568; }
.jj-brand small { display: inline-block; margin-top: 4px; padding: 2px 10px; border: 1px solid #d6e6ff; border-radius: 20px; background: #e7f0ff; color: var(--jj-blue); font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.jj-header .nav-menu { gap: 8px; }
.jj-header .nav-menu a { padding: 10px 18px !important; border: 0 !important; border-radius: 14px; color: #172b4d !important; font-size: 16px !important; font-weight: 700 !important; white-space: nowrap; }
.jj-header .nav-menu a:hover { background: #e0edff; }
.jj-header .nav-menu a[aria-current="page"] { color: white !important; background: linear-gradient(135deg, #3280ff, #075bfa); box-shadow: 0 6px 16px #1769ff26; }
.jj-header #userInfoBtn { font-weight: 700; font-size: 16px; }
.jj-header #userInfoBtn img { width: 40px !important; height: 40px !important; border-radius: 12px !important; }
.jj-header #userInfoBtn span:last-child { color: var(--jj-muted) !important; font-size: 12px !important; }
.jj-header #loginBtn, .jj-header #registerBtn { padding: 9px 24px; border: 1px solid var(--jj-blue); border-radius: 14px; font-size: 15px; font-weight: 700; color: var(--jj-blue) !important; }
.jj-header #registerBtn { color: white !important; background: var(--jj-blue); }
.jj-header #userDropdown { top: 100% !important; min-width: 140px; border: 1px solid var(--jj-line); padding: 6px; }
.jj-header #userDropdown a:hover { background: #edf6ff; border-radius: 6px; }
.jj-header a:focus-visible, .jj-header [tabindex]:focus-visible, .jj-home a:focus-visible { outline: 3px solid #1769ff; outline-offset: 4px; }
html.jj-theme body {
    margin: 0;
    background: radial-gradient(circle at 48% 16%, #ddebff 0, transparent 40%), linear-gradient(180deg, #f5fbff, #e5f2ff 65%, #edf6ff) !important;
    color: var(--jj-ink);
    font-family: Inter, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}
body.jj-home, body.jj-learning { min-height: 100vh; height: auto; }
html.jj-theme .bgstu02 { background: none; }
html.jj-theme .divbannernap,
html.jj-theme .divbannernapinfo,
html.jj-theme .divusercenter,
html.jj-theme .divusercenterteach,
html.jj-theme .divusercenterparent,
html.jj-theme .divusercenteragent {
    background-color: #fff;
    border-radius: 14px;
    border-color: var(--jj-line);
    box-shadow: 0 6px 20px #4a89e614;
}
html.jj-theme .usercentertitle { background: #edf6ff; color: #17386c; }
html.jj-theme .usercentertitlediv { background: none; }
.jj-home * { box-sizing: border-box; }
.jj-home-main { max-width: 1600px; margin: auto; padding: 24px 32px 0; }
.jj-hero { position: relative; overflow: hidden; min-height: 300px; border: 1px solid #b5d2fa; border-radius: 16px; padding: 36px 40px; background: linear-gradient(110deg, #eef2ff, #e3f1ff 65%, #d5eaff); box-shadow: 0 8px 24px #4a89e614; }
.jj-hero-copy { position: relative; z-index: 1; max-width: 72%; }
.jj-eyebrow { color: var(--jj-blue); font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.jj-hero h1 { font-size: 36px; font-weight: 900; line-height: 1.3; margin: 0 0 14px; }
.jj-hero-description { color: var(--jj-muted); font-size: 17px; margin: 0 0 26px; }
.jj-hero-art { position: absolute; right: 2%; bottom: -18px; width: 29%; height: 300px; object-fit: contain; }
.jj-profile { display: flex; flex-wrap: wrap; gap: 10px; }
.jj-profile > div { padding: 11px 16px; border: 1px solid #d6e5ff; border-radius: 10px; background: #ffffffd9; font-size: 14px; color: var(--jj-muted); }
.jj-profile strong { color: #17386c; margin-left: 7px; }
.jj-section-heading { margin: 26px 0 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.jj-section-heading h2 { font-size: 23px; font-weight: 800; margin: 0; }
.jj-section-heading p { color: var(--jj-muted); font-size: 14px; margin: 0; }
.jj-entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.jj-entry { --entry-color: #1769ff; --entry-tint: #f2f7ff; display: flex; flex-direction: column; border: 1px solid #c9dfff; border-radius: 16px; background: linear-gradient(135deg, #fff, var(--entry-tint)); padding: 28px; box-shadow: 0 8px 24px #4a89e609; transition: transform .2s, box-shadow .2s; }
.jj-entry:hover { transform: translateY(-3px); box-shadow: 0 12px 28px #4a89e61a; }
.jj-entry-purple { --entry-color: #8051e8; --entry-tint: #f7f3ff; border-color: #e0d4ff; }
.jj-entry-orange { --entry-color: #ff7a16; --entry-tint: #fff7ef; border-color: #ffe0c9; }
.jj-entry-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.jj-entry-top img { width: 62px; height: 62px; object-fit: contain; }
.jj-entry-top span { font-size: 12px; font-weight: 700; color: var(--entry-color); background: var(--entry-tint); border-radius: 20px; padding: 5px 12px; }
.jj-entry h3 { font-size: 25px; font-weight: 800; margin: 0 0 10px; }
.jj-entry p { color: var(--jj-muted); font-size: 15px; line-height: 1.8; margin: 0 0 22px; min-height: 54px; }
.jj-entry a { align-self: flex-start; margin-top: auto; border-radius: 10px; padding: 12px 26px; color: white; background: var(--entry-color); font-size: 16px; font-weight: 700; text-decoration: none; box-shadow: 0 5px 12px #1769ff15; }
.jj-entry a:hover { filter: brightness(.95); }
.jj-entry-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid #dce7f4; color: var(--jj-muted); font-size: 13px; }
.jj-home footer > div { margin-top: 28px !important; padding: 16px 0 !important; line-height: 1.7; }
.jj-learning .text-primary { color: var(--jj-blue); }
.jj-learning .bg-primary { background-color: var(--jj-blue); }
.jj-learning .border-primary { border-color: var(--jj-blue); }
.jj-learning .book-item { background: #fff; border: 1px solid var(--jj-line); box-shadow: 0 6px 18px #4a89e612; }
.jj-learning .book-cover { background: linear-gradient(135deg, #f5f9ff, #e7f1ff); }
@media (max-width: 1150px) {
    .jj-header-main { gap: 20px; }
    .jj-header .nav-menu a { padding: 9px 10px !important; font-size: 14px !important; }
    .jj-brand > img { width: 150px; max-height: 46px; }
    .jj-hero-copy { max-width: 78%; }
}
@media (max-width: 850px) {
    .jj-header { padding: 12px 18px; }
    .jj-header-inner { flex-wrap: wrap; }
    .jj-header-main { display: contents; }
    .jj-header .nav-menu { order: 3; width: 100%; overflow-x: auto; }
    .jj-home-main { padding: 18px; }
    .jj-hero { padding: 28px; }
    .jj-hero-copy { max-width: 100%; }
    .jj-hero-art { display: none; }
    .jj-hero h1 { font-size: 30px; }
    .jj-section-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 480px) {
    .jj-brand > img { width: 132px; max-height: 41px; }
    .jj-header-inner { gap: 12px; }
    .jj-header #userInfoBtn { padding: 0 !important; }
    .jj-header #userInfoBtn span:last-child { display: none; }
    .jj-hero { padding: 24px 20px; }
    .jj-profile > div { width: 100%; }
    .jj-entry-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .jj-entry { transition: none; }
    .jj-entry:hover { transform: none; }
}
