:root {
    color-scheme: dark;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #101114;
    color: #f4f4f5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.22), transparent 34rem),
        linear-gradient(135deg, #101114 0%, #161922 100%);
}

button,
input {
    font: inherit;
}

.app-shell {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
}

.hero-card,
.video-card,
.status-card {
    background: rgba(24, 26, 34, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.hero-card {
    padding: 28px;
}

.hero-top {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
}

.eyebrow {
    margin: 0 0 8px;
    color: #93c5fd;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: -0.06em;
}

h1 {
    font-size: clamp(2.6rem, 6vw, 5rem);
}

h2 {
    font-size: clamp(1.7rem, 4vw, 3rem);
}

.tagline {
    max-width: 680px;
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.55;
}

.version-pill {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid rgba(147, 197, 253, 0.28);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #bfdbfe;
    font-size: 0.9rem;
    font-weight: 800;
}

.room-panel {
    margin-top: 26px;
}

.private-v2-panel {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #7367f0;
    border-radius: 0.75rem;
    background: rgba(45, 39, 84, 0.72);
}

.private-v2-heading,
.private-v2-sign-in,
.private-v2-room-row {
    display: flex;
    gap: 0.75rem;
    align-items: end;
    flex-wrap: wrap;
}

.private-v2-heading {
    justify-content: space-between;
    align-items: start;
}

.private-v2-heading p {
    margin: 0;
    font-weight: 700;
}

.private-v2-panel label {
    display: grid;
    gap: 0.35rem;
    min-width: 14rem;
}

.private-v2-panel input,
.private-v2-panel select {
    min-height: 2.5rem;
}

.room-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #dbeafe;
    font-weight: 750;
}

.room-help {
    margin: 0 0 12px;
    color: #94a3b8;
    line-height: 1.45;
}

.room-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 10px;
}

input {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 1rem;
}

button {
    padding: 14px 16px;
    border: 0;
    border-radius: 14px;
    background: #2563eb;
    color: white;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

button:hover:not(:disabled) {
    filter: brightness(1.08);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.small-button {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.92rem;
}

.invite-box {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
}

.invite-box span {
    color: #93c5fd;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invite-box code {
    color: #dbeafe;
    overflow-wrap: anywhere;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.device-panel {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
}

.device-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.device-panel-heading p,
.device-preview-card span,
.device-grid label span {
    display: block;
    margin: 0 0 6px;
    color: #dbeafe;
    font-weight: 850;
}

.device-panel-heading span {
    color: #94a3b8;
    font-size: 0.92rem;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.device-grid select {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 12px;
    background: #020617;
    color: #dbeafe;
}

.device-preview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 12px;
}

.device-preview-card {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.52);
}

.device-preview-frame {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #020617;
}

.device-preview-frame video {
    width: 100%;
    height: clamp(150px, 18vw, 240px);
    object-fit: cover;
}

.device-preview-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 14px;
    background: #020617;
    color: #94a3b8;
    text-align: center;
}

.mic-meter {
    overflow: hidden;
    height: 18px;
    margin: 12px 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.94);
}

.mic-level-bar {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    transition: width 80ms linear;
}

.device-preview-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.45;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.status-card {
    padding: 14px;
    border-radius: 18px;
    box-shadow: none;
}

.status-card span {
    display: block;
    margin-bottom: 6px;
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-card p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.4;
}

.session-layout {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

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

.screen-row {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.18fr);
    gap: 18px;
}

.video-card {
    overflow: hidden;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    min-height: 72px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-heading p {
    margin: 0;
    color: #dbeafe;
    font-weight: 850;
}

.card-heading span {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.35;
}

.video-frame {
    position: relative;
    background: #020617;
}

video {
    display: block;
    width: 100%;
    background: #020617;
}

.camera-frame video {
    height: clamp(260px, 26vw, 380px);
    object-fit: cover;
}

.screen-frame video {
    height: clamp(320px, 40vw, 620px);
    object-fit: contain;
}

.priority-screen-card .screen-frame video {
    height: clamp(380px, 48vw, 720px);
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: #020617;
    color: #64748b;
    text-align: center;
    padding: 24px;
    line-height: 1.45;
}

.video-placeholder.hidden {
    display: none;
}

.focus-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    background: #050814;
}

.focus-overlay.hidden {
    display: none;
}

.focus-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.94);
}

.focus-screen-stage {
    position: relative;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    overflow: hidden;
    background: #020617;
}

.focus-screen-stage video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.focus-camera-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 320px));
    justify-content: center;
    gap: 14px;
}

.focus-camera-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: #020617;
}

.focus-camera-card video {
    height: clamp(120px, 16vh, 190px);
    object-fit: cover;
}

.focus-camera-card span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #dbeafe;
    font-size: 0.85rem;
    font-weight: 850;
}

@media (max-width: 980px) {
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .screen-row {
        grid-template-columns: 1fr;
    }

    .priority-screen-card {
        order: -1;
    }
}

@media (max-width: 760px) {
    .app-shell {
        width: min(100% - 20px, 1320px);
        padding: 20px 0;
    }

    .hero-card {
        padding: 20px;
    }

    .hero-top,
    .room-panel-heading {
        flex-direction: column;
    }

    .room-row,
    .camera-row,
    .status-grid,
    .device-grid,
    .device-preview-grid {
        grid-template-columns: 1fr;
    }

    .device-panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

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

    .focus-camera-strip {
        grid-template-columns: 1fr 1fr;
    }
}

.advanced-room-details {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.advanced-room-details summary {
  cursor: pointer;
  user-select: none;
}

.advanced-room-row {
  margin-top: 0.75rem;
}

.primary-invite-row {
  justify-content: flex-start;
}

/* Flux Session v0.1.4 Focus Screen Workspace */
.focus-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    background:
        radial-gradient(circle at top left, rgba(91, 141, 255, 0.16), transparent 34%),
        linear-gradient(135deg, #05070d, #101626 55%, #060912);
}

.focus-overlay.hidden {
    display: none;
}

.focus-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(11, 16, 28, 0.82);
    backdrop-filter: blur(18px);
}

.focus-header h2 {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
}

.focus-header .eyebrow {
    margin: 0 0 2px;
}

.focus-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.focus-header-actions button {
    white-space: nowrap;
}

.focus-screen-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: #02040a;
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.focus-screen-stage > video,
.focus-demo-screen {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.focus-screen-stage > video {
    background: #02040a;
}

.focus-screen-stage > video.hidden,
.focus-demo-screen.hidden {
    display: none;
}

.focus-screen-stage .video-placeholder {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: min(520px, calc(100% - 40px));
    min-height: 160px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.24);
}

.focus-camera-tray {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
}

.focus-camera-tray.hidden {
    display: none;
}

.focus-camera-card {
    position: absolute;
    width: clamp(170px, 18vw, 280px);
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(8, 12, 22, 0.88);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(16px);
    cursor: grab;
    pointer-events: auto;
    user-select: none;
    touch-action: none;
}

.focus-camera-card.is-dragging {
    cursor: grabbing;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.focus-local-camera-card {
    left: 18px;
    bottom: 18px;
}

.focus-remote-camera-card {
    right: 18px;
    bottom: 18px;
}

.focus-camera-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.08);
}

.focus-camera-title small {
    color: rgba(255, 255, 255, 0.52);
    text-transform: uppercase;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
}

.focus-camera-card video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #050812;
}

.focus-demo-screen {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 20% 15%, rgba(91, 141, 255, 0.22), transparent 28%),
        #070b14;
    background-size: 44px 44px, 44px 44px, auto, auto;
}

.focus-demo-topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(0, 0, 0, 0.28);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
}

.focus-demo-content {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.28fr);
    grid-template-rows: minmax(0, 1fr) minmax(90px, 0.18fr);
    gap: 14px;
    padding: 16px;
}

.focus-demo-main-panel,
.focus-demo-side-panel,
.focus-demo-bottom-panel {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.focus-demo-main-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: clamp(18px, 4vw, 54px);
}

.focus-demo-main-panel strong {
    max-width: 780px;
    font-size: clamp(1.6rem, 4vw, 4.4rem);
    line-height: 1.03;
    color: rgba(255, 255, 255, 0.94);
}

.focus-demo-main-panel p {
    max-width: 640px;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(0.95rem, 1.35vw, 1.35rem);
}

.focus-demo-label {
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
}

.focus-demo-side-panel {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px;
}

.focus-demo-side-panel span,
.focus-demo-bottom-panel span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
}

.focus-demo-side-panel div {
    height: 70px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
}

.focus-demo-bottom-panel {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    padding: 16px;
}

@media (max-width: 760px) {
    .focus-overlay {
        padding: 8px;
    }

    .focus-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .focus-header-actions {
        justify-content: flex-start;
    }

    .focus-camera-card {
        width: clamp(140px, 42vw, 210px);
    }

    .focus-demo-content {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto auto;
    }

    .focus-demo-bottom-panel {
        grid-column: auto;
    }
}

/* Flux Session v0.2.0 Remote Pointer Guidance */
.remote-pointer-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
}

.focus-pointer-layer {
    z-index: 6;
}

.focus-screen-stage.pointer-guidance-ready {
    cursor: crosshair;
}

.focus-pointer-status {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid rgba(147, 197, 253, 0.26);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.remote-pointer-marker {
    position: absolute;
    width: 1px;
    height: 1px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.remote-pointer-marker::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    border: 3px solid rgba(96, 165, 250, 0.95);
    border-radius: 999px;
    transform: translate(-50%, -50%);
    animation: remotePointerPulse 1.35s ease-out infinite;
    box-shadow: 0 0 26px rgba(96, 165, 250, 0.55);
}

.remote-pointer-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: #bfdbfe;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(191, 219, 254, 0.9);
}

.remote-pointer-marker-received::before {
    border-color: rgba(74, 222, 128, 0.95);
    box-shadow: 0 0 26px rgba(74, 222, 128, 0.55);
}

.remote-pointer-marker-received::after {
    background: #bbf7d0;
    box-shadow: 0 0 20px rgba(187, 247, 208, 0.9);
}

.remote-pointer-label {
    position: absolute;
    left: 18px;
    top: 18px;
    min-width: max-content;
    max-width: 240px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

@keyframes remotePointerPulse {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.58);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.55);
    }
}

@media (max-width: 760px) {
    .focus-pointer-status {
        width: 100%;
        justify-content: center;
    }
}
/* Flux Session v0.3.3 browser shared-control consent UI */
.shared-control-panel {
    margin: 18px 0 0;
    padding: 16px;
    border: 1px solid rgba(147, 197, 253, 0.25);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.shared-control-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.shared-control-heading p {
    margin: 0;
    color: #f8fafc;
    font-weight: 900;
}

.shared-control-heading span {
    display: block;
    margin-top: 4px;
    color: #bfdbfe;
    font-size: 0.9rem;
    line-height: 1.35;
}

.shared-control-heading strong {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(147, 197, 253, 0.4);
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.9);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.shared-control-heading strong.offered {
    color: #fef3c7;
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(120, 53, 15, 0.75);
}

.shared-control-heading strong.active {
    color: #fee2e2;
    border-color: rgba(248, 113, 113, 0.65);
    background: rgba(127, 29, 29, 0.8);
}

.shared-control-help {
    margin: 12px 0 0;
    color: #dbeafe;
    line-height: 1.45;
}

.shared-control-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.shared-control-actions button {
    min-height: 42px;
}

.shared-control-actions .danger-button {
    grid-column: 1 / -1;
    min-height: 50px;
    color: white;
    background: #b91c1c;
    border-color: #ef4444;
    font-weight: 950;
}

@media (max-width: 760px) {
    .shared-control-heading,
    .shared-control-actions {
        grid-template-columns: 1fr;
    }

    .shared-control-heading {
        display: block;
    }

    .shared-control-heading strong {
        display: inline-block;
        margin-top: 10px;
    }
}

/* Flux Session v0.3.4 pointer guidance restore */
.remote-screen-frame,
.remote-screen-frame video,
.remote-screen-frame .remote-pointer-layer {
    cursor: crosshair;
}

.remote-screen-frame .remote-pointer-layer {
    pointer-events: auto;
}

/* Flux Session v0.3.4 pointer guidance received visibility fix */
.screen-frame.pointer-guidance-flash,
.focus-screen-stage.pointer-guidance-flash {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.85), 0 0 32px rgba(96, 165, 250, 0.45);
}

#localScreenPointerLayer,
#remoteScreenPointerLayer,
#focusPointerLayer {
    z-index: 999;
}
