:root {
    --optic-gradient-start: rgba(52, 209, 255, 0.3);
    --optic-gradient-stop: rgba(10, 20, 36, 0.9);
    --optic-border: rgba(255, 255, 255, 0.08);
    --optic-panel: rgba(255, 255, 255, 0.02);
    --optic-radius-lg: 24px;
    --optic-radius-md: 18px;
    --optic-spacing-lg: 4rem;
    --optic-spacing-md: 2rem;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(
            circle at top,
            var(--optic-gradient-start),
            transparent 60%
        )
        var(--pm-app-ground-color, #04070f);
    color: var(--pm-app-font-color, #f7fbff);
}

.site-header,
.site-footer {
    border-bottom: 1px solid var(--optic-border);
    backdrop-filter: blur(16px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .pm-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer {
    border-bottom: none;
    border-top: 1px solid var(--optic-border);
    text-align: center;
}

.container,
.pm-container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.tagline {
    max-width: 36rem;
    margin: 0.35rem 0 0;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0;
}

.nav-list a {
    font-weight: 600;
}

.primary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.primary-nav .pm-button {
    justify-content: center;
    min-width: 7rem;
    font-weight: 600;
    border-radius: 999px;
}

.primary-nav .pm-button[aria-current="page"] {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.section {
    padding: var(--optic-spacing-lg) 0 var(--optic-spacing-lg);
}

.section.alt {
    background: rgba(255, 255, 255, 0.015);
    border-radius: var(--optic-radius-lg);
    margin-top: var(--optic-spacing-md);
    padding: var(--optic-spacing-lg) var(--optic-spacing-md);
}

.hero-grid {
    display: grid;
    gap: var(--optic-spacing-md);
    align-items: center;
}

@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }
}

.hero-media {
    padding: 1.5rem;
    border-radius: var(--optic-radius-lg);
    border: 1px solid var(--optic-border);
    background: linear-gradient(
        135deg,
        var(--optic-gradient-start),
        var(--optic-gradient-stop)
    );
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.hero-content p {
    max-width: 38rem;
}

.eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 720px) {
    .feature-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.feature-list li {
    border-radius: var(--optic-radius-md);
    border: 1px solid var(--optic-border);
    background: var(--optic-panel);
    padding: 1.5rem;
    min-height: 100%;
}

.gallery-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 720px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.gallery-grid img {
    border-radius: var(--optic-radius-md);
    border: 1px solid var(--optic-border);
    background: rgba(255, 255, 255, 0.05);
}

.pm-button {
    border-radius: 999px;
    padding-inline: 1.75rem;
}

.pm-btn-gradient {
    background: linear-gradient(120deg, #34d1ff, #ffd34f);
    color: #041427;
    border: none;
}

.pm-btn-gradient:hover {
    opacity: 0.92;
}

.narrow {
    max-width: 700px;
    margin: 0 auto;
    border-radius: var(--optic-radius-lg);
    border: 1px solid var(--optic-border);
    background: var(--optic-panel);
    padding: clamp(1.5rem, 3vw, 2.75rem);
}

@media (max-width: 600px) {
    .site-header {
        text-align: center;
    }

    .nav-list {
        justify-content: center;
    }

    .section,
    .section.alt {
        padding: var(--optic-spacing-md) 0;
    }
}

.redirect-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.redirect-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Viewer-specific styles */
:root {
    --viewer-header-height: clamp(3.25rem, 4vw, 4.25rem);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex !important;
    align-items: flex-start;
    flex-wrap: nowrap !important;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem clamp(1rem, 3vw, 2rem);
    backdrop-filter: blur(22px);
    background: rgba(4, 7, 15, 0.85);
    border-bottom: 1px solid var(--optic-border, rgba(255, 255, 255, 0.12));
}

.primary-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding-inline: 0.75rem;
    padding-block: 0.35rem;
    flex: 0 0 6rem;
    white-space: nowrap;
    margin-top: calc(0.75rem * 2 + 0.25rem);
}

.primary-link--left {
    justify-content: flex-start;
    text-align: left;
}

.primary-link--right {
    justify-content: flex-end;
    text-align: right;
}

.viewer-controls {
    flex: 1 1 auto;
    min-width: 0;
    display: flex !important;
    gap: 0.5rem;
    align-items: flex-end;
    overflow: hidden;
}

.viewer-controls .selector {
    flex: 1 1 0;
    min-width: 0;
}

.selector {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    justify-content: flex-end;
}

.selector label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(247, 251, 255, 0.8);
}

.selector select {
    padding-block: 0.35rem;
    min-width: 0;
    width: 100%;
    text-overflow: ellipsis;
    color: rgba(247, 251, 255, 0.95);
    background-color: rgba(20, 30, 50, 0.7);
}

.selector.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.75rem;
    width: 1rem;
    height: 1rem;
    margin-top: 0.125rem;
    border: 2px solid rgba(120, 180, 255, 0.3);
    border-top-color: rgba(120, 180, 255, 0.9);
    border-radius: 50%;
    animation: spinner-rotate 0.6s linear infinite;
    pointer-events: none;
    z-index: 10;
}

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

main.viewer-split {
    flex: 1 1 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(0.75rem, 2vw, 1.5rem);
    padding: clamp(0.75rem, 2vw, 1.5rem);
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.pane {
    border: 1px solid var(--optic-border, rgba(255, 255, 255, 0.12));
    border-radius: 0 0 var(--optic-radius-lg, 24px) var(--optic-radius-lg, 24px);
    overflow: hidden;
    background: linear-gradient(
        145deg,
        rgba(220, 220, 220, 0.65),
        rgba(255, 255, 255, 0.4)
    );
    display: flex;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    height: 100%;
}

.pane.is-hidden {
    display: none;
}

.pane iframe {
    border: none;
    width: 100%;
    height: 100%;
    flex: 1;
    background: transparent;
}

.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    text-align: center;
    height: 100%;
    overflow-y: auto;
}

.welcome-screen.is-hidden {
    display: none;
}

.welcome-content {
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(
        145deg,
        rgba(4, 7, 15, 0.95),
        rgba(4, 7, 15, 0.85)
    );
    border: 1px solid var(--optic-border, rgba(255, 255, 255, 0.12));
    border-radius: var(--optic-radius-lg, 24px);
    padding: clamp(2rem, 5vw, 3.5rem);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.welcome-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: rgba(247, 251, 255, 0.95);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.welcome-content h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: rgba(247, 251, 255, 0.9);
    font-weight: 500;
}

.welcome-content strong {
    color: rgba(247, 251, 255, 0.95);
}

.welcome-content p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.7;
    color: rgba(247, 251, 255, 0.75);
    margin-bottom: 1rem;
}

.welcome-content .highlight {
    color: rgba(120, 180, 255, 0.95);
    font-weight: 500;
}

.welcome-content ul {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.welcome-content li {
    font-size: clamp(0.95rem, 1.5vw, 1.0625rem);
    line-height: 1.7;
    color: rgba(247, 251, 255, 0.75);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.welcome-content li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: rgba(120, 180, 255, 0.8);
    font-weight: bold;
}

.welcome-content .note {
    background: rgba(120, 180, 255, 0.1);
    border-left: 3px solid rgba(120, 180, 255, 0.5);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
}

.welcome-content .note p {
    margin: 0;
    color: rgba(247, 251, 255, 0.85);
}

.welcome-content kbd {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.875em;
    font-family: monospace;
    line-height: 1;
    color: rgba(247, 251, 255, 0.95);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
    margin: 0 0.1rem;
}

@media (max-width: 960px) {
    .viewer-header {
        flex-wrap: wrap;
    }

    .primary-link {
        flex: 1 1 100%;
        max-width: none;
    }

    .viewer-controls {
        flex: 1 1 100%;
        max-width: 100%;
        margin-inline: 0;
        grid-template-columns: repeat(2, minmax(8.5rem, 1fr));
    }
}

@media (max-width: 720px) {
    .viewer-controls {
        grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    }
}

/* Navigation Line Styles */
.nav-line {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 800px;
    width: 15px;
    transform: translate(-50%, -50%);
    z-index: 15;
    pointer-events: auto;
}

.nav-line.is-hidden {
    display: none;
}

.nav-line-svg {
    width: 100%;
    height: 100%;
}

.nav-circle {
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-circle:hover {
    fill: rgba(120, 180, 255, 1);
    r: 3;
    filter: drop-shadow(0 0 4px rgba(120, 180, 255, 0.8));
}

.nav-circle:active {
    r: 2.5;
}

@media (max-width: 960px) {
    .nav-line {
        display: none !important;
    }
}
