:root {
    --bg: #0c1018;
    --panel: rgba(16, 23, 36, 0.86);
    --panel-strong: #111927;
    --text: #eef3ff;
    --muted: #9aa7bb;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #ff5f45;
    --accent-soft: rgba(255, 95, 69, 0.14);
    --accent-2: #5fd6ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(95, 214, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 95, 69, 0.18), transparent 32%),
        linear-gradient(180deg, #0b1018 0%, #121b2a 100%);
}

.landing-shell,
.case-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.landing-card,
.case-header-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.landing-card,
.case-header-card {
    padding: 28px;
}

.support-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.language-picker {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.language-picker-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-weight: 700;
}

.language-select-wrap {
    position: relative;
}

.language-select {
    min-width: 170px;
    min-height: 44px;
    padding: 10px 40px 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 166, 62, 0.34);
    background:
        linear-gradient(180deg, rgba(255, 188, 92, 0.1), rgba(255, 188, 92, 0.04)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23f5f7ff' d='M3.1 4.9 7 8.8l3.9-3.9.9.9L7 10.6 2.2 5.8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, calc(100% - 14px) 50%;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    appearance: none;
    outline: none;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.language-select:focus {
    border-color: rgba(255, 188, 92, 0.62);
    box-shadow: 0 0 0 3px rgba(255, 188, 92, 0.12), 0 12px 32px rgba(0, 0, 0, 0.18);
}

.language-select option {
    background: #151c2d;
    color: var(--text);
}

.landing-card {
    max-width: 760px;
    margin: 12vh auto 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
}

.brand-red {
    color: #ff4c4c;
}

h1,
h2,
h3 {
    margin: 0;
}

h1 {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 0.95;
}

h2 {
    font-size: 20px;
    margin-bottom: 18px;
}

h3 {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 10px;
}

.lead {
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.7;
    max-width: 70ch;
}

.access-note,
.meta-chip-auth {
    color: #ffd28f;
    border-color: rgba(255, 176, 79, 0.26);
    background: rgba(255, 176, 79, 0.1);
}

.access-note {
    margin: 18px 0 0;
    padding: 14px 16px;
    border: 1px solid rgba(255, 176, 79, 0.26);
    border-radius: 16px;
    line-height: 1.65;
}

.landing-actions {
    margin-top: 24px;
}

.landing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: 14px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #ff8f38);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 12px 32px rgba(255, 95, 69, 0.28);
}

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

.landing-list {
    margin: 28px 0 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.8;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.meta-chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.meta-chip {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--line);
}

.status-chip {
    color: var(--status-color, #95a5a6);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.grid-two {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.panel {
    padding: 24px;
}

.section-block + .section-block {
    margin-top: 24px;
}

.info-grid + .section-block,
.section-block-after-grid {
    margin-top: 30px;
}

.split-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.content-pre {
    margin: 0;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    min-height: 76px;
    font: 14px/1.6 "Consolas", "Courier New", monospace;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 0;
}

.info-grid div,
.patch-plan-grid div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}

.info-grid dt,
.patch-plan-grid dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 6px;
}

.info-grid dd,
.patch-plan-grid dd {
    margin: 0;
    font-size: 15px;
}

.patch-plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0;
}

.working-flag {
    margin: 0;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    line-height: 1.7;
}

.working-flag[data-working="active"] {
    color: #79f0b2;
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.28);
}

.working-flag[data-working="waiting"] {
    color: #f9d36f;
    background: rgba(243, 156, 18, 0.1);
    border-color: rgba(243, 156, 18, 0.28);
}

.working-flag[data-working="waiting_player"] {
    color: #caa8ff;
    background: rgba(155, 89, 182, 0.12);
    border-color: rgba(155, 89, 182, 0.3);
}

.working-flag[data-working="resolved"] {
    color: #79f0b2;
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.32);
}

.working-flag[data-working="closed"] {
    color: #ff9bb2;
    background: rgba(255, 122, 154, 0.12);
    border-color: rgba(255, 122, 154, 0.3);
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

#case-screenshots-panel {
    margin-top: 28px;
}

.screenshot-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        rgba(9, 15, 24, 0.36);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.screenshot-card:hover {
    transform: translateY(-1px);
    border-color: rgba(95, 214, 255, 0.24);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.24);
}

.screenshot-card-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(95, 214, 255, 0.14);
    border: 1px solid rgba(95, 214, 255, 0.24);
    color: #dff8ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.screenshot-card-title {
    font-size: 18px;
    line-height: 1.3;
    color: var(--text);
}

.screenshot-card-hint {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.error-panel {
    margin-top: 20px;
    border-color: rgba(255, 95, 69, 0.36);
    background: rgba(255, 95, 69, 0.12);
}

.hidden {
    display: none;
}

.screenshot-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
    background: rgba(4, 7, 15, 0.92);
    backdrop-filter: blur(10px);
}

.screenshot-modal.hidden {
    display: none;
}

.screenshot-modal-shell {
    width: min(100%, 1500px);
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-modal-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 96px);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    background: rgba(10, 14, 24, 0.86);
}

.screenshot-modal-image[src=""] {
    display: none;
}

.screenshot-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.screenshot-modal-close:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.12);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .grid-two,
    .split-block,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .landing-shell,
    .case-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 20px;
    }

    .landing-card,
    .case-header-card,
    .panel {
        padding: 20px;
        border-radius: 20px;
    }

    .support-card-top {
        flex-direction: column;
        align-items: stretch;
    }

    .language-picker {
        align-items: stretch;
    }

    .language-select {
        width: 100%;
        min-width: 0;
    }

    .screenshot-modal {
        padding: 18px;
    }

    .screenshot-modal-close {
        top: 16px;
        right: 16px;
    }
}
