:root {
    --ink: #17212f;
    --muted: #657285;
    --line: #dce3ea;
    --surface: #ffffff;
    --surface-soft: #f5f8fb;
    --emerald: #0f9f7a;
    --ruby: #c93457;
    --amber: #d88a24;
    --blue: #2563eb;
    --violet: #6d5dfc;
    --shadow: 0 24px 70px rgba(23, 33, 47, 0.14);
    --shadow-soft: 0 14px 34px rgba(23, 33, 47, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

::selection {
    color: #fffaf7;
    background: rgba(201, 52, 87, 0.88);
    text-shadow: none;
}

::-moz-selection {
    color: #fffaf7;
    background: rgba(201, 52, 87, 0.88);
    text-shadow: none;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--surface-soft);
}

body.cursor-active,
body.cursor-active a,
body.cursor-active button,
body.cursor-active label,
body.cursor-active input,
body.cursor-active .upload-area,
body.cursor-active .batch-upload-area,
body.cursor-active .mode-btn,
body.cursor-active .result-card,
body.cursor-active .icon-button {
    cursor: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
label {
    font: inherit;
}

input,
textarea,
code,
p,
h1,
h2,
h3,
span,
small,
li,
strong,
a {
    -webkit-user-select: text;
    user-select: text;
}

.site-body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 248, 251, 0.96)),
        radial-gradient(circle at top left, rgba(15, 159, 122, 0.18), transparent 34%),
        radial-gradient(circle at 85% 10%, rgba(201, 52, 87, 0.12), transparent 30%),
        var(--surface-soft);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 56px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(220, 227, 234, 0.78);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--emerald), var(--ruby));
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(15, 159, 122, 0.24);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.nav-links a:hover {
    color: var(--ink);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
    user-select: none;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--emerald), var(--blue));
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.22);
}

.button-sponsor {
    color: #fff;
    background: linear-gradient(135deg, #cf4867, #8f1734);
    box-shadow: 0 16px 36px rgba(201, 52, 87, 0.24);
}

.button-secondary {
    color: var(--ink);
    background: #eef3f7;
}

.button-ghost {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.68);
}

.button-small {
    min-height: 38px;
    padding: 0 16px;
    color: #fff;
    background: var(--ink);
}

.hero {
    position: relative;
    min-height: calc(100vh - 74px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: end;
    gap: 36px;
    padding: clamp(46px, 8vw, 100px) clamp(18px, 4vw, 56px) 34px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(23, 33, 47, 0.82), rgba(23, 33, 47, 0.44) 56%, rgba(23, 33, 47, 0.08)),
        url("Downlode-test-images/of-ruby-isolated-on-white-background-generative-ai-photo.jpg") center / cover;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 34%;
    background: linear-gradient(180deg, transparent, rgba(245, 248, 251, 0.95));
    z-index: -1;
}

.hero-content {
    grid-column: 1;
    grid-row: 1;
    max-width: 780px;
    color: #fff;
    padding-bottom: min(8vh, 70px);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--emerald);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero .eyebrow,
.cta-band .eyebrow,
.side-panel .eyebrow {
    color: #9ff1d9;
}

.hero ::selection,
.side-panel ::selection,
.cta-band ::selection,
.prediction-card ::selection {
    color: #ffffff;
    background: rgba(15, 159, 122, 0.9);
}

.hero ::-moz-selection,
.side-panel ::-moz-selection,
.cta-band ::-moz-selection,
.prediction-card ::-moz-selection {
    color: #ffffff;
    background: rgba(15, 159, 122, 0.9);
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 8vw, 6.8rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.hero-copy {
    max-width: 640px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.hero-media {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(76px, 1fr));
    width: min(100%, 420px);
}

.hero-media img {
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-media img:nth-child(2) {
    margin-top: 46px;
}

.hero-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    width: min(920px, 100%);
    background: rgba(220, 227, 234, 0.9);
    border: 1px solid rgba(220, 227, 234, 0.9);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.metric {
    padding: 22px;
    background: rgba(255, 255, 255, 0.9);
}

.metric span {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
}

.metric p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.section {
    padding: clamp(54px, 8vw, 92px) clamp(18px, 4vw, 56px);
}

.section-tight {
    padding-top: 70px;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-heading.align-left {
    margin: 0;
    text-align: left;
}

.section-heading h2,
.cta-band h2,
.side-panel h1 {
    margin: 0;
    font-size: clamp(2rem, 4.8vw, 4rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.side-panel p {
    color: var(--muted);
    line-height: 1.7;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1160px;
    margin: 0 auto;
}

.feature-card,
.class-panel,
.workspace,
.side-panel,
.reference-list,
.prediction-card,
.probability-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.feature-card {
    padding: 28px;
}

.feature-card i {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    margin-bottom: 22px;
    color: #fff;
    background: var(--ink);
    border-radius: 8px;
}

.feature-card h3,
.class-panel h3,
.timeline h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.feature-card p,
.timeline p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
    gap: 34px;
    align-items: start;
}

.class-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.class-panel {
    padding: 24px;
}

.class-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.class-panel ul {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.class-panel li {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.class-panel span,
.class-panel small {
    display: block;
}

.class-panel span {
    font-weight: 900;
}

.class-panel small {
    margin-top: 4px;
    color: var(--muted);
}

.authentic h3 {
    color: var(--emerald);
}

.imitation h3 {
    color: var(--ruby);
}

.workflow {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 251, 0.96)),
        radial-gradient(circle at top left, rgba(15, 159, 122, 0.08), transparent 30%);
}

.workflow-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.4fr);
    gap: 24px;
    max-width: 1160px;
    margin: 0 auto;
}

.workflow-intro {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
    box-shadow: var(--shadow-soft);
}

.workflow-intro h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.02;
}

.workflow-intro p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.75;
}

.workflow-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    margin-top: 10px;
    color: var(--ink);
    background: #ecf7f3;
    border: 1px solid rgba(15, 159, 122, 0.18);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 800;
}

.workflow-badge i {
    color: var(--emerald);
}

.timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 24px;
    width: 1px;
    background: linear-gradient(180deg, rgba(15, 159, 122, 0.22), rgba(201, 52, 87, 0.12));
}

.timeline-card {
    position: relative;
    padding: 22px 22px 22px 54px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.timeline-card::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 18px;
    width: 12px;
    height: 12px;
    border: 3px solid #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--blue));
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(15, 159, 122, 0.2);
}

.timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.timeline-top span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 32px;
    padding: 0 10px;
    color: var(--emerald);
    background: rgba(15, 159, 122, 0.08);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 900;
}

.timeline-top i {
    color: var(--ruby);
    font-size: 1rem;
}

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: clamp(28px, 5vw, 56px);
    padding: clamp(28px, 5vw, 54px);
    color: #fff;
    background:
        linear-gradient(90deg, rgba(23, 33, 47, 0.92), rgba(23, 33, 47, 0.72)),
        url("Downlode-test-images/OIP.jpg") center / cover;
    border-radius: 10px;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px clamp(18px, 4vw, 56px);
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.footer span {
    color: var(--ink);
    font-weight: 900;
}

.footer p {
    margin: 0;
}

.app-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(15, 159, 122, 0.14), transparent 34%),
        linear-gradient(315deg, rgba(201, 52, 87, 0.12), transparent 38%),
        var(--surface-soft);
}

.app-topbar {
    position: static;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-weight: 800;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ruby);
    box-shadow: 0 0 0 5px rgba(201, 52, 87, 0.12);
    user-select: none;
}

.status-dot.active {
    background: var(--emerald);
    box-shadow: 0 0 0 5px rgba(15, 159, 122, 0.14);
}

.app-shell {
    display: grid;
    grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
    gap: 22px;
    width: min(1440px, calc(100% - 36px));
    margin: 22px auto 42px;
}

.side-panel,
.workspace {
    padding: clamp(22px, 3vw, 34px);
}

.side-panel {
    position: sticky;
    top: 22px;
    align-self: start;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(23, 33, 47, 0.78), rgba(23, 33, 47, 0.96)),
        url("Downlode-test-images/of-ruby-isolated-on-white-background-generative-ai-photo.jpg") center / cover;
    border: 0;
}

.side-panel p {
    color: rgba(255, 255, 255, 0.76);
}

.mini-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 28px 0;
}

.mini-gallery img {
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
}

.reference-list {
    padding: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.reference-list h2 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.reference-list div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reference-list span {
    padding: 7px 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.workspace {
    min-height: 720px;
}

.mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    margin-bottom: 24px;
    background: #eef3f7;
    border-radius: 10px;
}

.mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
}

.mode-btn.active {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 8px 18px rgba(23, 33, 47, 0.08);
}

.mode-section {
    display: none;
}

.mode-section.active {
    display: block;
}

.upload-area,
.batch-upload-area {
    display: grid;
    min-height: 430px;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: clamp(26px, 6vw, 70px);
    text-align: center;
    border: 2px dashed #b9c6d5;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 248, 251, 0.86)),
        repeating-linear-gradient(135deg, rgba(15, 159, 122, 0.08) 0 1px, transparent 1px 12px);
    cursor: pointer;
    transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.upload-area:hover,
.batch-upload-area:hover,
.upload-area.dragover,
.batch-upload-area.dragover {
    border-color: var(--emerald);
    background: #f0fbf7;
}

.upload-icon {
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--emerald), var(--blue));
    border-radius: 10px;
    box-shadow: 0 18px 38px rgba(15, 159, 122, 0.22);
    font-size: 1.7rem;
    user-select: none;
}

.upload-area h2,
.batch-upload-area h2 {
    margin: 8px 0 0;
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    letter-spacing: 0;
}

.upload-area p,
.batch-upload-area p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.upload-area small,
.batch-upload-area small,
.loading-container small {
    color: var(--muted);
    font-weight: 700;
}

.loading-container {
    display: grid;
    min-height: 430px;
    place-items: center;
    align-content: center;
    gap: 16px;
    text-align: center;
}

.spinner {
    width: 62px;
    height: 62px;
    border: 5px solid #dce3ea;
    border-top-color: var(--emerald);
    border-radius: 50%;
    animation: spin 900ms linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.result-container {
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1fr);
    gap: 22px;
}

.result-preview {
    display: grid;
    min-height: 520px;
    place-items: center;
    padding: 18px;
    border-radius: 10px;
    background: #101826;
}

.result-preview img {
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.result-details {
    display: grid;
    align-content: start;
    gap: 16px;
}

.prediction-card {
    padding: 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 159, 122, 0.95), rgba(37, 99, 235, 0.92)),
        var(--emerald);
    border: 0;
}

.prediction-card span,
.prediction-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.prediction-card h2 {
    margin: 10px 0;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: 0;
}

.probability-card {
    padding: 22px;
}

.probability-card h3 {
    margin: 0 0 16px;
}

.probability-list {
    display: grid;
    gap: 12px;
}

.probability-item {
    display: grid;
    grid-template-columns: minmax(98px, 150px) 1fr 54px;
    align-items: center;
    gap: 12px;
}

.probability-label,
.probability-value {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.probability-value {
    text-align: right;
}

.probability-bar {
    height: 12px;
    overflow: hidden;
    background: #e9eef4;
    border-radius: 999px;
}

.probability-fill {
    height: 100%;
    min-width: 2px;
    background: linear-gradient(90deg, var(--emerald), var(--blue));
    border-radius: inherit;
}

.batch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.batch-header h2 {
    margin: 0;
    font-size: 2rem;
}

.batch-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.batch-stats div {
    padding: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.batch-stats span,
.batch-stats strong {
    display: block;
}

.batch-stats span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.batch-stats strong {
    margin-top: 8px;
    font-size: 2rem;
}

.progress-bar {
    width: min(360px, 100%);
    height: 10px;
    overflow: hidden;
    background: #e9eef4;
    border-radius: 999px;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--emerald), var(--blue));
}

.batch-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.result-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(23, 33, 47, 0.08);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.result-card img,
.result-card-error-art {
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: #eef3f7;
}

.result-card-error-art {
    display: grid;
    place-items: center;
    color: var(--ruby);
    font-size: 2rem;
}

.result-card-content {
    padding: 14px;
}

.result-card-filename {
    overflow: hidden;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-card-class {
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 900;
}

.result-card-confidence {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.result-card-confidence strong {
    color: var(--emerald);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 40;
    max-width: min(520px, calc(100% - 32px));
    padding: 14px 18px;
    color: #fff;
    background: var(--ink);
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 18px);
    transition: opacity 180ms ease, transform 180ms ease;
    font-weight: 800;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast.success {
    background: var(--emerald);
}

.toast.warning {
    background: var(--amber);
}

.toast.danger {
    background: var(--ruby);
}

.gem-cursor,
.gem-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 120;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-999px, -999px, 0);
}

.gem-cursor {
    width: 12px;
    height: 12px;
    margin-left: -6px;
    margin-top: -6px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 245, 247, 0.95), rgba(255, 245, 247, 0.25) 24%, transparent 26%),
        linear-gradient(145deg, #e25576 0%, #b61f43 60%, #7f1028 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.35),
        0 0 14px rgba(201, 52, 87, 0.22);
    transition: opacity 160ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.gem-cursor-ring {
    width: 34px;
    height: 34px;
    margin-left: -17px;
    margin-top: -17px;
    border-radius: 50%;
    border: 1.5px solid rgba(201, 52, 87, 0.34);
    background: radial-gradient(circle, rgba(201, 52, 87, 0.08), transparent 70%);
    transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.gem-cursor.is-hover {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.45),
        0 0 18px rgba(201, 52, 87, 0.3);
}

.gem-cursor-ring.is-hover {
    border-color: rgba(15, 159, 122, 0.44);
    background: radial-gradient(circle, rgba(15, 159, 122, 0.12), transparent 70%);
    transform: translate3d(-999px, -999px, 0) scale(1.18);
}

.gem-cursor.is-pressed {
    transform: translate3d(-999px, -999px, 0) scale(0.9);
}

.gem-cursor-ring.is-pressed {
    transform: translate3d(-999px, -999px, 0) scale(0.92);
}

.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(16, 24, 38, 0.66);
}

.detail-modal.open {
    display: grid;
}

.detail-modal-panel {
    position: relative;
    width: min(620px, 100%);
    max-height: 88vh;
    overflow: auto;
    padding: 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.icon-button {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #eef3f7;
    cursor: pointer;
    user-select: none;
}

.modal-title {
    margin: 0 44px 8px 0;
    font-size: 1.8rem;
}

.modal-subtitle {
    margin: 0 0 18px;
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 1080px) {
    .hero,
    .split-section,
    .app-shell,
    .workflow-shell {
        grid-template-columns: 1fr;
    }

    .hero-content {
        grid-column: auto;
        grid-row: auto;
        padding-bottom: 0;
    }

    .hero-media {
        grid-column: auto;
        grid-row: auto;
    }

    .side-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
        font-size: 0.88rem;
    }

    .hero {
        min-height: auto;
    }

    .hero::before {
        background:
            linear-gradient(180deg, rgba(23, 33, 47, 0.86), rgba(23, 33, 47, 0.62)),
            url("Downlode-test-images/of-ruby-isolated-on-white-background-generative-ai-photo.jpg") center / cover;
    }

    .hero-media,
    .hero-panel,
    .feature-grid,
    .class-columns,
    .timeline,
    .result-container,
    .batch-stats {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        bottom: 18px;
    }

    .hero-panel {
        margin-top: 18px;
    }

    .cta-band,
    .footer,
    .batch-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-shell {
        width: min(100% - 24px, 1440px);
    }

    .mode-selector {
        grid-template-columns: 1fr;
    }

    .result-preview {
        min-height: 320px;
    }

    .probability-item {
        grid-template-columns: 1fr 48px;
    }

    .probability-bar {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 520px) {
    .nav-links a:not(.button) {
        display: none;
    }

    .nav-links,
    .nav-links .button {
        width: 100%;
    }

    .hero-actions .button,
    .cta-band .button,
    .batch-header .button {
        width: 100%;
    }

    .upload-area,
    .batch-upload-area,
    .loading-container {
        min-height: 360px;
    }
}

@media (pointer: coarse) {
    .gem-cursor,
    .gem-cursor-ring {
        display: none !important;
    }
}
