:root {
    color-scheme: dark;
    --bg: #101820;
    --text: #f8fbfb;
    --muted: #b9c9c7;
    --surface: rgba(16, 24, 32, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.16);
    --accent: #51d6c6;
    --accent-dark: #bff7ef;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 82% 18%, rgba(81, 214, 198, 0.16), transparent 30%),
        linear-gradient(135deg, #101820, #1c2c31 52%, #2d3430);
    color: var(--text);
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(100% - 32px, 1080px);
    margin: 0 auto;
    padding: 24px 0 10px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 40px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 1.25rem;
    line-height: 1.2;
}

main {
    width: min(100% - 32px, 1080px);
    margin: 0 auto;
    padding: 28px 0 48px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: stretch;
}

.hero-copy {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 6vw, 56px);
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(81, 214, 198, 0.15), rgba(255, 255, 255, 0.05)),
        rgba(16, 24, 32, 0.62);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.hero-copy h2 {
    max-width: 780px;
    margin-bottom: 18px;
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 1.02;
}

.description {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.55;
}

.viewer-panel {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
}

.device-icon {
    width: 112px;
    height: 112px;
    margin-bottom: 24px;
    object-fit: contain;
}

.panel-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.device-name {
    margin-bottom: 12px;
    color: var(--accent-dark);
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.05;
}

.device-detail {
    margin-bottom: 20px;
    color: var(--muted);
    line-height: 1.5;
}

.capability-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.capability-list div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-strong);
}

.capability-list dt {
    margin-bottom: 4px;
    color: #91aaa6;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.capability-list dd {
    margin: 0;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.model-section {
    margin-top: 22px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin-bottom: 10px;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    line-height: 1.08;
}

.section-heading p:not(.eyebrow) {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.5;
}

.format-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin: 0 0 18px;
}

.format-pill {
    min-height: 36px;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    line-height: 1.1;
}

.format-pill.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #10211f;
}

.format-pill:not(.is-active):hover {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text);
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.model-message {
    grid-column: 1 / -1;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
}

.model-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    text-align: left;
    backdrop-filter: blur(16px);
}

.model-card.is-selected {
    grid-column: span 2;
    border-color: rgba(81, 214, 198, 0.76);
    box-shadow: 0 0 0 3px rgba(81, 214, 198, 0.14);
}

.model-card.is-selected .model-select-button {
    min-height: auto;
}

.model-select-button {
    display: grid;
    gap: 12px;
    width: 100%;
    min-height: 210px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.model-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.model-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.model-select-button strong {
    font-size: 1rem;
    line-height: 1.25;
}

.model-select-button span {
    justify-self: start;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(81, 214, 198, 0.14);
    color: var(--accent-dark);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.item-selected {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.item-preview-frame {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.item-model-preview,
.item-model-poster {
    width: 100%;
    height: 100%;
    min-height: 100%;
    border-radius: 6px;
    background: transparent;
}

.item-model-poster {
    display: block;
    object-fit: contain;
}

.launch-button {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #10211f;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.launch-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.launch-button:not(:disabled):hover {
    background: #6de5d8;
}

.model-select-button p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

@media (max-width: 820px) {
    .site-header {
        align-items: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .viewer-panel {
        min-height: auto;
    }

    .model-grid {
        grid-template-columns: 1fr;
    }

    .model-card.is-selected {
        grid-column: span 1;
    }

}

@media (max-width: 480px) {
    .site-header {
        width: min(100% - 24px, 1080px);
        gap: 12px;
        padding-top: 16px;
    }

    .back-link {
        min-width: 58px;
        padding: 9px 12px;
    }

    main {
        width: min(100% - 24px, 1080px);
        padding-top: 18px;
    }

    .hero-copy,
    .viewer-panel,
    .model-card {
        padding: 20px;
    }

}
