:root {
    color-scheme: dark;
    --bg: #080b16;
    --panel: rgba(15, 23, 42, 0.74);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --text: #eef4ff;
    --muted: #9fb0ca;
    --line: rgba(148, 163, 184, 0.22);
    --accent: #76e4f7;
    --accent-2: #a78bfa;
    --good: #5ee6a7;
    --warn: #fbbf24;
    --bad: #ff6b7a;
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(118, 228, 247, 0.18), transparent 32rem),
        radial-gradient(circle at 80% 0%, rgba(167, 139, 250, 0.2), transparent 34rem),
        linear-gradient(135deg, #070914 0%, #111827 46%, #101624 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.orb {
    position: fixed;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    filter: blur(26px);
    opacity: 0.22;
    pointer-events: none;
}

.orb-one {
    right: -5rem;
    top: 12rem;
    background: #76e4f7;
}

.orb-two {
    left: -6rem;
    bottom: 2rem;
    background: #a78bfa;
}

.shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 72px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 28px;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 12px;
    border: 1px solid rgba(118, 228, 247, 0.35);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(118, 228, 247, 0.08);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

h1, h2, h3, p {
    margin: 0;
}

h1 {
    max-width: 780px;
    margin-top: 18px;
    font-size: clamp(38px, 5.8vw, 72px);
    line-height: 0.94;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 760px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.glass, .panel {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.56));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-card {
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: 32px;
}

.metric {
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.055);
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.workspace {
    display: grid;
    grid-template-columns: 410px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.panel {
    border-radius: 30px;
    padding: 24px;
}

.panel-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.panel-header.compact {
    align-items: center;
}

.panel-header h2 {
    font-size: 24px;
    letter-spacing: -0.03em;
}

.panel-header p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.5;
}

.step {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #06111f;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 900;
}

.field {
    display: grid;
    gap: 9px;
    margin-bottom: 16px;
}

.field span {
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    padding: 15px 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.46);
    outline: none;
    font: inherit;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    border-color: rgba(118, 228, 247, 0.75);
    box-shadow: 0 0 0 4px rgba(118, 228, 247, 0.12);
}

.dropzone {
    display: grid;
    place-items: center;
    gap: 9px;
    min-height: 184px;
    margin: 20px 0;
    border: 1px dashed rgba(118, 228, 247, 0.52);
    border-radius: 24px;
    background: rgba(118, 228, 247, 0.06);
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(118, 228, 247, 0.1);
}

.dropzone input {
    display: none;
}

.drop-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    font-size: 34px;
}

.dropzone small {
    color: var(--muted);
}

.switch {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    margin-bottom: 22px;
    cursor: pointer;
}

.switch input {
    display: none;
}

.switch span {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    transition: background 0.2s ease;
}

.switch span::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.switch input:checked + span {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.switch input:checked + span::after {
    transform: translateX(20px);
}

.primary, .download, .pin-form button {
    border: 0;
    border-radius: 18px;
    color: #06111f;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(118, 228, 247, 0.2);
}

.primary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 17px 18px;
    font: inherit;
}

.primary:disabled {
    opacity: 0.62;
    cursor: wait;
}

.status-panel {
    min-height: 548px;
}

.pin-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid rgba(251, 191, 36, 0.42);
    border-radius: 22px;
    background: rgba(251, 191, 36, 0.1);
}

.pin-box h3 {
    color: var(--warn);
}

.pin-box p {
    margin-top: 5px;
    color: var(--muted);
}

.pin-form {
    display: flex;
    gap: 10px;
}

.pin-form input {
    width: 130px;
}

.pin-form button {
    padding: 0 16px;
}

.log-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 700;
}

.log-toolbar button {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.logs {
    height: 385px;
    margin: 0;
    padding: 18px;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.6);
    color: #dbeafe;
    font: 13px/1.58 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
}

.log-line {
    display: block;
}

.log-line.error {
    color: var(--bad);
}

.log-line.warning {
    color: var(--warn);
}

.log-time {
    color: #64748b;
}

.muted {
    color: #64748b;
}

.result-panel {
    margin-top: 24px;
}

.download {
    margin-left: auto;
    padding: 13px 16px;
    text-decoration: none;
}

.table-wrap {
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th, td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    text-align: left;
}

th {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

td {
    color: #e5eefc;
}

.hidden {
    display: none !important;
}

@media (max-width: 920px) {
    .hero,
    .workspace {
        grid-template-columns: 1fr;
    }

    .pin-box {
        grid-template-columns: 1fr;
    }
}
