
/* =========================================
   NEUROWRITE — OBSIDIAN BLACK GLASS THEME
   Dark Ash | Frost White | Black | Silver
   ========================================= */

:root {
    --ink: #202125;
    --muted: #777a83;
    --black: #191a1d;
    --dark-ash: #303238;
    --silver: #d9dade;
    --white: #fafafa;

    --glass: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.68);
    --line: rgba(255, 255, 255, 0.13);

    --shadow:
        0 20px 60px rgba(0, 0, 0, 0.17),
        0 3px 12px rgba(0, 0, 0, 0.06);

    --accent: #202125;
    --accent-hover: #3a3b40;
}

/* GLOBAL */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Nunito", sans-serif;
    color: var(--ink);
    min-height: 100vh;

    background:
        radial-gradient(
            ellipse at 10% 5%,
            #45474e 0%,
            transparent 38%
        ),
        radial-gradient(
            ellipse at 90% 30%,
            #383a41 0%,
            transparent 36%
        ),
        linear-gradient(
            135deg,
            #202125,
            #34363c 55%,
            #25272d
        );
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    width: min(1200px, calc(100% - 48px));
    margin: auto;
}

/* HEADER */

.topbar {
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-icon {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    color: white;
    font-size: 22px;
    font-weight: 800;

    border-radius: 13px;

    background: linear-gradient(
        145deg,
        #4a4c53,
        #17181b
    );

    border: 1px solid rgba(255,255,255,.18);

    box-shadow:
        0 7px 18px rgba(0,0,0,.25),
        inset 0 1px 1px rgba(255,255,255,.18);
}

.brand-name {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -.6px;
}

.brand-name span {
    color: #c5c6ca;
}

.brand-caption {
    color: #b7b9c0;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-top: 2px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c8d7cd;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7dbb91;
    box-shadow: 0 0 0 4px rgba(125,187,145,.15);
}

.version-tag,
.step-tag,
.small-label {
    padding: 7px 10px;
    border-radius: 8px;

    background: rgba(255,255,255,.11);
    color: #e4e5e8;

    border: 1px solid rgba(255,255,255,.12);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
}

/* HERO */

.hero {
    text-align: center;
    padding: 55px 0 39px;
}

.eyebrow,
.section-kicker {
    font-size: 10px;
    letter-spacing: 1.8px;
    font-weight: 800;
    color: #aeb1ba;
}

.eyebrow {
    display: inline-block;
    padding: 9px 15px;

    border: 1px solid rgba(255,255,255,.18);
    border-radius: 30px;

    background: rgba(255,255,255,.09);
    color: #e4e5e8;

    backdrop-filter: blur(12px);
}

.hero h1 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(34px, 5vw, 48px);
    letter-spacing: -2px;
    color: #ffffff;
    margin-top: 17px;
}

.hero h1 span {
    color: #c9cacf;
}

.hero p {
    margin-top: 12px;
    color: #c0c2ca;
    font-size: 15px;
}

/* LIQUID GLASS PANELS */

.glass-panel {
    background: linear-gradient(
        135deg,
        rgba(255,255,255,.91),
        rgba(238,239,243,.77)
    );

    border: 1px solid var(--glass-border);
    border-radius: 23px;

    box-shadow:
        var(--shadow),
        inset 0 1px 1px rgba(255,255,255,.95);

    backdrop-filter: blur(26px) saturate(135%);
    -webkit-backdrop-filter: blur(26px) saturate(135%);
}

.workspace {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 22px;
    align-items: stretch;
}

.drawing-panel,
.result-panel,
.comparison-panel,
.history-panel {
    padding: 25px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.panel-heading h2,
.guide-section h2 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #25262b;
    margin-top: 6px;
}

.muted {
    color: #858893;
    font-size: 12px;
    margin-top: 5px;
}

/* DRAWING CANVAS */

.canvas-wrap {
    margin-top: 23px;
    padding: 17px;

    border: 1px solid #e2e3e7;
    border-radius: 17px;

    background: rgba(255,255,255,.9);
}

.canvas-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
    color: #989ba4;
    margin-bottom: 12px;
}

.canvas-surface {
    position: relative;
    width: min(100%, 340px);
    aspect-ratio: 1;

    margin: auto;
    overflow: hidden;

    border: 1px solid #d9dce2;
    border-radius: 10px;

    background: #ffffff;

    box-shadow:
        0 8px 22px rgba(24,27,39,.08),
        inset 0 0 0 1px rgba(255,255,255,.9);
}

/* Keep actual drawing canvas white */

#canvas {
    position: relative;
    display: block;

    width: 100%;
    height: 100%;

    background: #ffffff;
    cursor: crosshair;

    touch-action: none;
    z-index: 1;
}

/* Graph overlay remains visual only */

.graph-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;

    background-image:
        linear-gradient(
            to right,
            rgba(120,145,190,.16) 1px,
            transparent 1px
        ),
        linear-gradient(
            to bottom,
            rgba(120,145,190,.16) 1px,
            transparent 1px
        ),
        linear-gradient(
            to right,
            rgba(120,145,190,.08) 1px,
            transparent 1px
        ),
        linear-gradient(
            to bottom,
            rgba(120,145,190,.08) 1px,
            transparent 1px
        );

    background-size:
        28px 28px,
        28px 28px,
        7px 7px,
        7px 7px;
}

.canvas-hint {
    text-align: center;
    color: #9296a0;
    font-size: 10px;
    margin-top: 11px;
}

/* BUTTONS */

.canvas-actions {
    display: flex;
    gap: 10px;
    margin-top: 17px;
}

.button {
    border: 0;
    border-radius: 11px;
    padding: 13px 15px;

    font-size: 12px;
    font-weight: 800;

    transition: .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-secondary {
    color: #44464d;
    background: #e8e9ed;
    border: 1px solid #dcdde2;
}

.button-secondary:hover {
    background: #dfe0e5;
}

.button-primary {
    flex: 1;

    color: #ffffff;

    background: linear-gradient(
        135deg,
        #34363b,
        #17181b
    );

    border: 1px solid rgba(0,0,0,.15);

    box-shadow:
        0 7px 17px rgba(0,0,0,.19),
        inset 0 1px 1px rgba(255,255,255,.14);
}

.button-primary:hover {
    background: linear-gradient(
        135deg,
        #46484e,
        #25262a
    );

    box-shadow: 0 10px 22px rgba(0,0,0,.25);
}

.button:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}

/* EXPECTED CHARACTER INPUT */

.target-box {
    margin-top: 19px;
    padding: 13px;

    border-radius: 13px;
    border: 1px solid #e1e2e7;

    background: rgba(235,237,242,.85);

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.target-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.target-copy strong {
    font-size: 12px;
    color: #292b30;
}

.target-copy span {
    color: #858a96;
    font-size: 10px;
}

#targetInput {
    width: 48px;
    height: 43px;

    text-align: center;

    border: 1px solid #d5d7dd;
    border-radius: 10px;

    outline: none;

    color: #202125;
    background: #ffffff;

    font-size: 20px;
    font-weight: 800;
}

#targetInput:focus {
    border-color: #55575d;
    box-shadow: 0 0 0 3px rgba(32,33,37,.1);
}

.match-feedback {
    color: #9296a1;
    font-size: 11px;
    min-height: 18px;
    margin-top: 9px;
}

.match-feedback.match {
    color: #34835d;
    font-weight: 800;
}

.match-feedback.mismatch {
    color: #b36e4d;
    font-weight: 800;
}

.shortcut-row {
    display: flex;
    gap: 16px;
    color: #9296a0;
    font-size: 10px;
    margin-top: 15px;
}

kbd {
    padding: 3px 6px;
    background: #e1e2e7;
    border-radius: 5px;
    color: #44464d;
    font-size: 10px;
    font-weight: 800;
}

/* PREDICTION */

.right-column {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.live-tag {
    padding: 8px 10px;
    border-radius: 9px;

    background: #edf4ef;
    color: #548366;

    font-size: 9px;
    font-weight: 800;
}

.result-display {
    min-height: 178px;
    margin-top: 21px;

    display: grid;
    place-items: center;

    border: 1px solid #e2e3e8;
    border-radius: 16px;

    background: linear-gradient(
        145deg,
        #ffffff,
        #eceef2
    );
}

.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: #a0a4b0;
}

.placeholder-symbol {
    width: 62px;
    height: 62px;

    display: grid;
    place-items: center;

    background: #ffffff;
    border: 1px solid #e2e3e8;
    border-radius: 20px;

    color: #45474e;
    font-size: 26px;
    font-weight: 800;
}

.result-placeholder strong {
    color: #656973;
    font-size: 13px;
}

.result-placeholder span {
    font-size: 11px;
}

.predicted-character {
    color: #202125;

    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 76px;
    font-weight: 800;
}

/* CONFIDENCE */

.confidence-area {
    margin-top: 20px;
}

.confidence-heading {
    display: flex;
    justify-content: space-between;

    font-size: 11px;
    color: #858a98;
    font-weight: 700;
}

.confidence-heading strong {
    color: #202125;
    font-size: 13px;
}

.confidence-track,
.prediction-track {
    overflow: hidden;
    height: 8px;
    border-radius: 20px;
    background: #dfe1e6;
}

.confidence-track {
    margin-top: 9px;
}

.confidence-fill,
.prediction-fill {
    height: 100%;
    width: 0%;

    border-radius: inherit;

    background: linear-gradient(
        90deg,
        #777a83,
        #202125
    );

    transition: width .5s ease;
}

.confidence-note {
    color: #999da6;
    font-size: 10px;
    margin-top: 8px;
}

/* TOP THREE */

.top-predictions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 19px;
}

.empty-comparison {
    color: #a0a4ae;
    font-size: 11px;
    padding: 13px 0;
}

.prediction-item {
    display: grid;
    grid-template-columns: 35px 1fr 50px;
    gap: 11px;
    align-items: center;
}

.prediction-rank {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: #e9eaee;
    color: #656973;

    font-size: 11px;
    font-weight: 800;
}

.prediction-item:first-child .prediction-rank {
    color: #ffffff;
    background: #242529;
}

.prediction-character {
    font-size: 13px;
    font-weight: 800;
    color: #292b30;
    margin-bottom: 5px;
}

.prediction-percent {
    text-align: right;
    color: #656973;
    font-size: 11px;
    font-weight: 800;
}

/* HISTORY */

.history-panel {
    margin-top: 22px;
}

.text-button {
    background: transparent;
    border: 0;
    color: #45474e;
    font-size: 11px;
    font-weight: 800;
}

.text-button:hover {
    color: #000000;
}

.history-list {
    display: flex;
    gap: 11px;
    overflow-x: auto;
    padding: 19px 1px 3px;
}

.history-empty {
    color: #a0a4ae;
    font-size: 12px;
    padding: 8px 0;
}

.history-item {
    flex: 0 0 115px;

    padding: 13px;

    border-radius: 13px;

    background: rgba(235,237,242,.9);
    border: 1px solid #dfe1e6;

    text-align: center;
}

.history-char {
    color: #202125;
    font-size: 27px;
    font-weight: 800;
}

.history-confidence {
    color: #747984;
    font-size: 10px;
    font-weight: 800;
    margin-top: 3px;
}

.history-time {
    color: #a0a4ae;
    font-size: 9px;
    margin-top: 5px;
}

/* INSTRUCTIONS */

.guide-section {
    padding: 48px 0 40px;
}

.guide-section h2 {
    font-size: 23px;
    color: #ffffff;
    margin-top: 7px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
    margin-top: 19px;
}

.guide-card {
    position: relative;
    padding: 20px;

    border-radius: 17px;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,.91),
        rgba(237,239,243,.76)
    );

    border: 1px solid rgba(255,255,255,.65);

    box-shadow:
        0 8px 25px rgba(0,0,0,.12),
        inset 0 1px 1px rgba(255,255,255,.9);

    backdrop-filter: blur(18px);
}

.guide-number {
    position: absolute;
    top: 15px;
    right: 16px;

    color: #a4a6ad;
    font-size: 10px;
    font-weight: 800;
}

.guide-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: #e3e4e8;
    color: #242529;

    font-size: 19px;
}

.guide-card h3 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 13px;
    color: #292b30;
    margin-top: 15px;
}

.guide-card p {
    color: #858a96;
    font-size: 11px;
    line-height: 1.7;
    margin-top: 7px;
}

.guide-tip {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 15px 17px;
    margin-top: 15px;

    border-radius: 13px;

    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.13);

    color: #e1e2e6;
    font-size: 11px;
}

/* FOOTER */

footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 20px 0 27px;

    border-top: 1px solid var(--line);

    color: #c0c2ca;
    font-size: 10px;
}

/* RESPONSIVE */

@media (max-width: 850px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .page-shell {
        width: calc(100% - 26px);
    }

    .topbar {
        height: 72px;
    }

    .header-status {
        font-size: 8px;
    }

    .version-tag {
        display: none;
    }

    .hero {
        padding: 40px 0 28px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .drawing-panel,
    .result-panel,
    .comparison-panel,
    .history-panel {
        padding: 18px;
    }

    .canvas-actions {
        flex-direction: column;
    }

    .guide-grid {
        grid-template-columns: 1fr 1fr;
    }

    .guide-card {
        padding: 15px;
    }

    footer {
        flex-direction: column;
    }
}
/* Remove section numbering labels */
.section-kicker {
    display: none !important;
}