:root {
    --orange: #5b86e5;
    --pink: #4f9fea;
    --lime: #36d1dc;
    --cyan: #36d1dc;
    --violet: #5b86e5;
    --accent-start: #5b86e5;
    --accent-end: #36d1dc;
    --accent-gradient: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    --ink: #1f2937;
    --muted: #64748b;
    --page-bg: #edf5fd;
    --line: rgba(15, 23, 42, 0.08);
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: #ffffff;
    --shadow: 0 18px 45px rgba(31, 41, 55, 0.08);
    --shadow-soft: 0 10px 26px rgba(31, 41, 55, 0.06);
    --radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html,
body {
    min-height: 100vh;
    background-color: var(--page-bg);
    /* Keep browser caret-browsing from drawing an insertion cursor on
       read-only headings, statistics and cards. */
    caret-color: transparent;
}

body {
    color: var(--ink);
}

/* Real editing controls must continue to show a visible text caret. */
input,
textarea,
[contenteditable="true"],
[contenteditable="plaintext-only"] {
    caret-color: auto;
}

.decor-third {display: none;}

header {
    position: relative;
    z-index: 100;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--ink);
    font-size: 1.75rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cyan), var(--violet), var(--lime));
    box-shadow: 0 10px 22px rgba(94, 200, 255, 0.25);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    list-style: none;
}

.nav-menu a {
    position: relative;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
    padding: 0.55rem 0;
    transition: color .2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-start);
}

.nav-menu a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    color: white;
    background: var(--accent-gradient);
    box-shadow: 0 16px 30px rgba(91, 134, 229, .22);
}

/* Hide the server-session placeholder until the private page has restored the user. */
.auth-checking a.login-btn[href="login.html"] {
    visibility: hidden;
}

.user-menu {
    position: relative;
    flex: 0 0 auto;
    z-index: 140;
}

.user-menu__trigger {
    gap: .55rem;
    cursor: pointer;
}

.user-menu__name {
    color: #176fae;
    font-weight: 950;
}

.user-name-highlight {
    display: inline-block;
    padding: .08em .32em .12em;
    border-radius: .38em;
    background: linear-gradient(120deg, #e5f3ff, #e5fbf6);
    color: #147bb3;
    box-shadow: inset 0 -2px 0 rgba(43, 164, 196, .35);
    font-weight: 950;
}

.user-menu__arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}

.user-menu.is-open .user-menu__arrow {
    transform: rotate(225deg) translate(-2px, -1px);
}

.user-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 190px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}

.user-menu.is-open .user-menu__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu__panel a,
.user-menu__panel button {
    display: block;
    width: 100%;
    padding: .75rem .85rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.user-menu__panel a:hover,
.user-menu__panel button:hover {
    color: var(--accent-start);
    background: #eef7ff;
}

.user-menu__panel button {
    margin-top: 4px;
    border-top: 1px solid var(--line);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 3.2rem 2rem 4rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h2 {
    font-size: 2.55rem;
    font-weight: 900;
    letter-spacing: 0;
    color: var(--accent-start);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .8rem;
}

.page-header p {
    color: var(--muted);
    font-size: 1.12rem;
    font-weight: 650;
    line-height: 1.8;
}

.card,
.accordion-item,
.glass-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1.6rem;
    margin-bottom: 1.2rem;
}

.card:hover,
.algorithm-chip:hover,
.topic-pill:hover {
    transform: translateY(-2px);
}

.card h3 {
    font-size: 1.28rem;
    margin-bottom: .75rem;
}

.card p {
    color: var(--muted);
    line-height: 1.8;
}

.btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 42px;
    padding: .75rem 1.25rem;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease, filter .2s ease, border-color .2s ease, background-color .2s ease;
}

.btn-primary {
    color: white;
    background: var(--accent-gradient);
    box-shadow: 0 14px 24px rgba(91, 134, 229, .22);
}

.btn-secondary {
    color: var(--ink);
    background: #f6f8fb;
    border: 1px solid var(--line);
    box-shadow: 0 5px 12px rgba(66, 91, 124, .06);
}

.btn:hover {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow: 0 13px 24px rgba(47, 91, 150, .16);
}

.btn:active {
    transform: translateY(0) scale(.98);
}

.btn:focus-visible,
.topic-pill:focus-visible,
.algorithm-chip:focus-visible,
.filter-action:focus-visible,
.workbench-action:focus-visible,
.visual-control:focus-visible {
    outline: 3px solid rgba(56, 189, 248, .34);
    outline-offset: 3px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .62;
    transform: none;
    box-shadow: none;
}

.button-ripple {
    position: absolute;
    z-index: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: button-ripple .58s ease-out forwards;
}

.btn > *,
.topic-pill > *,
.algorithm-chip > *,
.filter-action > *,
.workbench-action > *,
.visual-control > *,
.solution-copy-button > * {
    position: relative;
    z-index: 1;
}

.btn-secondary .button-ripple,
.topic-pill .button-ripple,
.algorithm-chip .button-ripple {
    background: rgba(74, 144, 226, .2);
}

@keyframes button-ripple {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(24);
    }
}

.app-notice {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* 提示/确认框可能由业务弹窗内部触发，必须始终显示在最上层。 */
    z-index: 20000;
    display: block;
    padding: 1rem;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}

.app-notice.is-open {
    opacity: 1;
    visibility: visible;
}

.app-notice__panel {
    position: absolute;
    top: 50vh;
    left: 50%;
    width: min(440px, 100%);
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
    text-align: center;
    transform: translate(-50%, calc(-50% + 8px));
    transition: transform .18s ease;
}

.app-notice.is-open .app-notice__panel {
    transform: translate(-50%, -50%);
}

.app-notice__message {
    margin: 0 0 1.4rem;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 750;
    line-height: 1.7;
}

.app-notice__confirm {
    min-width: 110px;
}

.app-notice__actions {
    display: flex;
    justify-content: center;
    gap: .75rem;
}

.is-pressing {
    transform: translateY(1px) scale(.98) !important;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
    gap: 2rem;
    align-items: center;
    min-height: 68vh;
}

.hero-text h1 {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    color: #243044;
}

.hero-text p {
    color: var(--muted);
    font-size: 1.14rem;
    line-height: 1.9;
    margin-bottom: 1.6rem;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.7rem 0 .9rem;
}

.section-title h3 {
    font-size: 1.35rem;
}

.topic-grid {
    display: grid;
    gap: 1.25rem;
}

.topic-block {
    background: rgba(255,255,255,.82);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.topic-block h3 {
    font-size: 1.35rem;
    margin-bottom: .9rem;
}

.topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.topic-pill,
.algorithm-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: .55rem .9rem;
    border-radius: 8px;
    color: #5f6877;
    background: #f6f8fb;
    text-decoration: none;
    font-weight: 750;
    border: 1px solid rgba(15, 23, 42, 0.04);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.topic-pill:hover,
.algorithm-chip:hover {
    color: #243044;
    background: white;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.algorithm-chip.featured {
    color: white;
    background: var(--accent-gradient);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 1.5rem;
    align-items: start;
}

.visual-stage {
    min-height: 320px;
    display: grid;
    align-items: end;
    gap: .75rem;
    padding: 1rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border: 1px solid var(--line);
}

.bar-row {
    min-height: 190px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: .55rem;
}

.bar {
    width: 44px;
    border-radius: 10px 10px 5px 5px;
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: .45rem;
    font-weight: 800;
    background: linear-gradient(180deg, var(--accent-start), var(--accent-end));
    transition: height .35s ease, background .2s ease, transform .2s ease;
}

.bar.active {
    background: linear-gradient(180deg, #ff8a4c, #ff6b8b);
    transform: translateY(-8px);
}

.pointer-track {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    flex-wrap: wrap;
}

.node {
    min-width: 58px;
    height: 58px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    background: var(--accent-gradient);
    box-shadow: 0 14px 24px rgba(94, 200, 255, .18);
}

.node.active {
    background: linear-gradient(135deg, #ff8a4c, #ff6b8b);
}

.rich-visual-stage {
    min-height: 520px;
    align-items: stretch;
    gap: 1rem;
}

.visual-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.visual-toolbar span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: #eef8ff;
    color: #0369a1;
    font-weight: 900;
    font-size: .9rem;
}

.visual-canvas {
    position: relative;
    min-height: 430px;
    display: grid;
    gap: .9rem;
    align-content: center;
    padding: 1rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid var(--line);
    overflow: hidden;
}

.visual-caption {
    min-height: 54px;
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f6f8fb;
    color: var(--muted);
    font-weight: 850;
    line-height: 1.6;
    text-align: center;
    border: 1px solid var(--line);
}

.visual-lane {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: .7rem;
    min-height: 140px;
    flex-wrap: wrap;
}

.visual-bar {
    min-width: 48px;
    border-radius: 10px 10px 5px 5px;
    color: white;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: .45rem .35rem;
    font-weight: 900;
    background: linear-gradient(180deg, var(--accent-start), var(--accent-end));
    box-shadow: 0 10px 20px rgba(94, 200, 255, .14);
    transition: transform .25s ease, background .25s ease;
}

.visual-bar.hot,
.visual-cell.hot,
.visual-node.hot,
.visual-token.hot {
    background: linear-gradient(135deg, #ff8a4c, #ff6b8b);
    color: white;
}

.visual-bar.done,
.visual-cell.done,
.visual-node.done,
.visual-token.done {
    background: linear-gradient(135deg, #4ecf8f, #2fbf7f);
    color: white;
}

.visual-bar.muted,
.visual-cell.muted,
.visual-node.muted,
.visual-token.muted {
    opacity: .45;
}

.visual-cells,
.visual-tape,
.visual-stack,
.visual-queue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.visual-cell,
.visual-token,
.visual-node {
    min-width: 52px;
    min-height: 52px;
    padding: .45rem .6rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #50617a;
    background: #f6f8fb;
    border: 1px solid var(--line);
    font-weight: 900;
    text-align: center;
}

.visual-stack {
    min-height: 190px;
    flex-direction: column-reverse;
}

.visual-stack .visual-token {
    width: min(220px, 70%);
}

.visual-queue::before,
.visual-queue::after {
    color: #94a3b8;
    font-weight: 900;
}

.visual-queue::before { content: "队首"; }
.visual-queue::after { content: "队尾"; }

.visual-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 640px;
    margin: 0 auto;
}

.visual-table td,
.visual-table th {
    min-width: 48px;
    height: 44px;
    border: 1px solid rgba(15, 23, 42, .08);
    text-align: center;
    border-radius: 6px;
    color: #50617a;
    background: #f8fbff;
    font-weight: 850;
}

.visual-table .hot {
    color: white;
    background: linear-gradient(135deg, #ff8a4c, #ff6b8b);
}

.visual-table .done {
    color: white;
    background: linear-gradient(135deg, #4ecf8f, #2fbf7f);
}

.visual-graph {
    position: relative;
    min-height: 260px;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
}

.visual-edge {
    position: absolute;
    height: 3px;
    border-radius: 999px;
    background: rgba(100, 116, 139, .28);
    transform-origin: left center;
}

.visual-edge.hot {
    background: linear-gradient(90deg, #ff8a4c, #ff6b8b);
}

.visual-node.graph-node {
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 20px rgba(15, 23, 42, .08);
}

.visual-node small {
    display: block;
    font-size: .68rem;
    opacity: .8;
}

.visual-code {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    border-radius: 12px;
    background: #0f172a;
    color: #dbeafe;
    font-family: Consolas, monospace;
    line-height: 1.7;
    overflow: auto;
}

.visual-code div {
    padding: .1rem .45rem;
    border-radius: 6px;
    white-space: pre;
}

.visual-code .hot {
    color: white;
    background: rgba(255, 107, 139, .32);
}

.visual-state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .55rem;
}

.visual-state {
    padding: .7rem;
    border-radius: 10px;
    background: #f6f8fb;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.visual-state b {
    display: block;
    color: var(--ink);
    margin-bottom: .15rem;
}

.visual-explain {
    min-height: 40px;
    display: grid;
    align-content: center;
    gap: .25rem;
    text-align: center;
}

.visual-explain p:first-child {
    display: none;
}

.visual-explain p:last-child {
    color: var(--accent-start);
    font-weight: 900;
}

.info-list {
    display: grid;
    gap: .8rem;
    margin-top: .9rem;
}

.info-list li {
    list-style: none;
    padding: .85rem 1rem;
    border-radius: 10px;
    background: rgba(246,248,251,.9);
    color: var(--muted);
    line-height: 1.7;
}

.info-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.info-list li small {
    display: block;
    color: #94a3b8;
    font-size: .78rem;
}

.info-list li b {
    color: #64748b;
    white-space: nowrap;
}

.record-pagination,
.question-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .8rem;
}

.record-pagination button,
.record-pagination span,
.question-pagination button,
.question-pagination span {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f6f8fb;
    color: var(--muted);
    font-weight: 800;
}

.record-pagination button,
.question-pagination button {
    padding: .55rem .75rem;
    cursor: pointer;
}

.record-pagination button.active,
.question-pagination button.active {
    color: white;
    background: var(--accent-gradient);
}

.record-pagination button:disabled,
.question-pagination button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.record-pagination .record-page-ellipsis {
    min-width: 24px;
    border-color: transparent;
    background: transparent;
}

.problem-meta,
.problem-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.problem-card .problem-summary {
    display: -webkit-box;
    height: 10.8em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
}

.problem-tag {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .25rem .65rem;
    border-radius: 999px;
    color: #0369a1;
    background: #eef8ff;
    font-size: .86rem;
    font-weight: 800;
}

.judge-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s ease, visibility .24s ease;
}

.judge-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.judge-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .26s ease, backdrop-filter .26s ease;
}

.judge-modal.is-open .judge-modal__backdrop {opacity: 1;}

.judge-modal__panel {
    position: relative;
    width: min(680px, 100%);
    min-height: 280px;
    max-height: min(88vh, 680px);
    overflow: auto;
    padding: 2.7rem 2.8rem 2.8rem;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .26);
    text-align: center;
    opacity: 0;
    transform: translateY(18px) scale(.975);
    transition: opacity .28s ease, transform .32s cubic-bezier(.2, .8, .2, 1);
}

.judge-modal.is-open .judge-modal__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.judge-modal__close {
    position: absolute;
    top: .85rem;
    right: 1rem;
    border: 0;
    background: transparent;
    color: #c4c4c4;
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.judge-modal__close:hover {
    color: #64748b;
    transform: rotate(4deg) scale(1.04);
}

.judge-modal__eyebrow {
    margin-bottom: .35rem;
    color: var(--muted);
    font-weight: 800;
}

.judge-modal__panel h2 {
    margin-bottom: .85rem;
    color: #111827;
    font-size: 2rem;
}

.judge-modal__summary {
    color: #666;
    font-size: 1.14rem;
    font-weight: 650;
}

.judge-modal__errors {
    margin: 1.55rem auto 0;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255, 107, 139, .22);
    border-radius: 8px;
    background: #fff7f8;
    color: #9f1239;
    text-align: left;
    font-size: 1rem;
    line-height: 1.7;
}

.difficulty {
    color: #c2410c;
    background: #fff5e8;
}

input,
textarea,
.code-box {
    outline: none;
    transition: border .18s ease, box-shadow .18s ease;
}

input:focus,
textarea:focus,
.code-box:focus {
    border-color: rgba(91, 134, 229, .58) !important;
    box-shadow: 0 0 0 4px rgba(91, 134, 229, .13);
}

/* Shared search affordance for static and dynamically-created search fields. */
input.app-search-input {
    padding-left: 2.75rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b7696' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 1rem center !important;
    background-size: 1.15rem 1.15rem !important;
}

/* Keep page-specific inline accents consistent with the global blue theme. */
.role-tabs button.active,
.progress-fill,
.memory-bar span,
.visual-panel .node {
    background: var(--accent-gradient) !important;
}

.register-link a,
.login-link a {
    color: var(--accent-start) !important;
}

.path-step > strong,
.course-hero h2,
#profileName {
    color: var(--accent-start) !important;
    background: var(--accent-gradient) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

@media (max-width: 980px) {
    .nav-menu {display: none;}
    .hero-section,
    .detail-layout {grid-template-columns: 1fr;}
}

@media (max-width: 640px) {
    .container {padding: 2.4rem 1rem 3rem;}
    .nav-container {padding: .8rem 1rem;}
    .page-header h2 {font-size: 2rem;}
    .hero-text h1 {font-size: 2.25rem;}
    .bar {width: 34px;}
    .judge-modal {padding: .9rem;}
    .judge-modal__panel {min-height: 240px;padding: 2.3rem 1.4rem 2rem;}
    .judge-modal__panel h2 {font-size: 1.6rem;}
}
.coze-assistant-host{position:relative;width:100%}
.coze-assistant-status{display:grid;place-items:center;min-height:180px;padding:24px;color:#64748b;text-align:center;background:#f8fbff}
.coze-assistant-status--error{color:#b42318;background:#fff6f5}
.coze-assistant-error-badge{position:fixed;right:24px;bottom:24px;z-index:10020;max-width:min(360px,calc(100vw - 48px));border:1px solid #fecaca;border-radius:10px;padding:12px 14px;background:#fff7ed;color:#9a3412;box-shadow:0 12px 28px rgba(15,23,42,.18);font:inherit;text-align:left;cursor:pointer}
