/* ═══ SHOWCASE FEATURE CARDS ═══
   Visual demo cards for each capability — 2 per row,
   each with a mini interactive mockup + text */

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.showcase-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
}

.showcase-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(99, 102, 241, 0.08);
}

/* Visual demo area */
.showcase-visual {
    aspect-ratio: 16/9;
    background:
        radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 206, 201, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #080b14 0%, #0f172a 50%, #080b14 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Text area */
.showcase-text {
    padding: 20px 24px 24px;
}

.showcase-text .feature-badge {
    margin-bottom: 8px;
}

.showcase-text .feature-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.showcase-text .feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ─── 1. RIVE GRAPHICS VISUAL ─── */
.svis-graphics {
    width: 100%;
    height: 100%;
    position: relative;
}

.svis-layer {
    position: absolute;
    animation: card-entry 0.6s var(--ease-out-expo);
}

.svis-lower-third {
    bottom: 18%;
    left: 8%;
    background: rgba(10, 12, 24, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-left: 3px solid var(--indigo);
    border-radius: 6px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.svis-lt-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    color: white;
}

.svis-lt-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.svis-lt-bar {
    height: 3px;
    width: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-red), var(--indigo), var(--cyan));
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
    margin-top: 6px;
}

.svis-bug {
    top: 10%;
    right: 8%;
    background: var(--accent-red);
    color: white;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 5px 14px;
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
}

.svis-ticker {
    bottom: 4%;
    left: 0;
    right: 0;
    background: rgba(10, 12, 24, 0.9);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
}

.svis-ticker span {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    animation: ticker-scroll 12s linear infinite;
}

/* ─── 2. CANVAS LAYOUT VISUAL ─── */
.svis-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    border: 1px dashed rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    touch-action: none;
}

.svis-canvas-layer {
    position: absolute;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.svis-canvas-layer:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.svis-canvas-layer.svis-matte {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}

.svis-clabel {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

/* resize handles on canvas layers */
.svis-canvas-layer::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(99, 102, 241, 0.4);
    border-bottom: 2px solid rgba(99, 102, 241, 0.4);
    pointer-events: none;
}

/* ─── EDITABLE LOWER THIRD (inside canvas) ─── */
.svis-canvas-lt {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 !important;
    background: transparent !important;
    border-color: transparent !important;
}

.svis-canvas-lt::after {
    display: none;
}

.svis-canvas-lt-inner {
    width: 90%;
    background: rgba(8, 10, 20, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-left: 3px solid var(--indigo);
    border-radius: 6px;
    padding: 10px 14px 8px;
    margin-bottom: 10%;
}

.svis-canvas-lt-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    color: white;
    outline: none;
    cursor: text;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
    line-height: 1.3;
}

.svis-canvas-lt-name:focus {
    border-bottom-color: var(--indigo);
}

.svis-canvas-lt-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    outline: none;
    cursor: text;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
    margin-top: 1px;
}

.svis-canvas-lt-title:focus {
    border-bottom-color: rgba(99, 102, 241, 0.3);
}

.svis-canvas-lt-bar {
    height: 3px;
    width: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-red), var(--indigo), var(--cyan));
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
    margin-top: 6px;
}

.svis-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    z-index: 10;
    background: transparent;
}

.svis-resize-handle::before {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--indigo);
    border-bottom: 2px solid var(--indigo);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.svis-resize-handle:hover::before {
    opacity: 1;
}

.svis-canvas-layer.active {
    border-color: var(--indigo) !important;
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.25), inset 0 0 12px rgba(99, 102, 241, 0.05);
    z-index: 100;
}

.svis-canvas-hint {
    position: absolute;
    bottom: 6px;
    right: 10px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(99, 102, 241, 0.4);
    letter-spacing: 0.02em;
    pointer-events: none;
    animation: pulse 3s ease-in-out infinite;
}

/* ─── 3. MULTI-VIEW VISUAL ─── */
.svis-multiview {
    display: grid;
    gap: 6px;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Default state: Quad */
.svis-multiview:not(.layout-solo):not(.layout-dual) {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.svis-multiview.layout-solo {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.svis-multiview.layout-solo .svis-mv-slot:not(:first-child) {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: scale(0.8);
    visibility: hidden;
}

.svis-multiview.layout-dual {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.svis-multiview.layout-dual .svis-mv-slot:nth-child(n+3) {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transform: scale(0.8);
    visibility: hidden;
}

.svis-mv-slot {
    background: rgba(10, 14, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 8px;
    position: relative;
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.svis-mv-slot.svis-mv-active {
    border-color: var(--tally-green);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.1);
}

.svis-mv-slot.svis-mv-active::before {
    content: 'ON AIR';
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--tally-green);
    color: #000;
    font-size: 8px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.08em;
}

.svis-mv-slot span {
    font-size: 10px;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 4px;
}

.svis-mv-vu {
    width: 60%;
    height: 3px;
    border-radius: 2px;
    background: rgba(0, 255, 136, 0.15);
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.svis-mv-vu::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 60%;
    background: var(--tally-green);
    border-radius: 2px;
    animation: vu-bounce 1.2s ease-in-out infinite;
}

.svis-mv-active .svis-mv-vu::after {
    width: 85%;
}

/* ─── 4. JOIN FLOW VISUAL ─── */
.svis-join-flow {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.svis-join-step {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    flex: 1;
    max-width: 200px;
}

.svis-join-url {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.svis-url-id {
    color: var(--cyan);
    font-weight: 800;
}

.svis-join-arrow {
    font-size: 18px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.svis-cam-preview {
    font-size: 28px;
    margin-bottom: 4px;
}

.svis-join-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
}

.svis-join-badge {
    background: var(--tally-green);
    color: #000;
    font-size: 11px;
    font-weight: 900;
    padding: 6px 14px;
    border-radius: 6px;
    letter-spacing: 0.08em;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ─── 5. TALKBACK & TALLY VISUAL ─── */
.svis-talkback {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.svis-tb-msg {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.svis-tb-director {
    border-left: 3px solid var(--indigo);
}

.svis-tb-guest {
    border-left: 3px solid var(--tally-green);
    align-self: flex-end;
    max-width: 70%;
}

.svis-tb-from {
    font-weight: 800;
    color: white;
    margin-right: 6px;
}

.svis-tb-tally {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 14px;
    background: rgba(10, 12, 24, 0.6);
    border-radius: 8px;
    margin-top: 4px;
}

.svis-tally-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.svis-tally-dot.green {
    background: var(--tally-green);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.svis-tally-dot.amber {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

/* ─── 6. MULTISTREAM RELAY VISUAL ─── */
.svis-relay {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    justify-content: center;
}

.svis-relay-source {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 800;
    color: white;
    white-space: nowrap;
}

.svis-relay-arrows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.svis-relay-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--indigo), var(--cyan));
    border-radius: 1px;
    position: relative;
}

.svis-relay-line::after {
    content: '›';
    position: absolute;
    right: -6px;
    top: -8px;
    font-size: 14px;
    color: var(--cyan);
}

.svis-relay-targets {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.svis-relay-pill {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    color: white;
    white-space: nowrap;
}

.svis-relay-pill.yt {
    background: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.svis-relay-pill.tw {
    background: rgba(145, 70, 255, 0.15);
    border: 1px solid rgba(145, 70, 255, 0.3);
}

.svis-relay-pill.custom {
    background: rgba(0, 206, 201, 0.1);
    border: 1px solid rgba(0, 206, 201, 0.25);
}

/* ─── 7. RECORDING VISUAL ─── */
.svis-recording {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.svis-rec-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.svis-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--recording-red);
    animation: pulse 1s ease-in-out infinite;
}

.svis-rec-text {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-red);
    letter-spacing: 0.05em;
}

.svis-rec-tracks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.svis-rec-track {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    padding: 8px 12px;
}

.svis-rec-track span {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    width: 80px;
    flex-shrink: 0;
}

.svis-rec-bar {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-red), #ff6b6b);
    animation: shimmer 2s ease-in-out infinite alternate;
}

/* ─── 8. SECURITY VISUAL ─── */
.svis-security {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.svis-sec-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    transition: border-color 0.3s ease;
}

.svis-sec-row:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.svis-sec-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase-visual {
        aspect-ratio: 16/10;
        padding: 14px;
    }

    .showcase-text {
        padding: 16px 18px 20px;
    }

    .showcase-text .feature-title {
        font-size: 17px;
    }

    .showcase-text .feature-desc {
        font-size: 13px;
    }

    .svis-join-flow {
        flex-direction: column;
        gap: 8px;
    }

    .svis-join-arrow {
        transform: rotate(90deg);
    }

    .svis-relay {
        flex-direction: column;
        gap: 10px;
    }

    .svis-relay-arrows {
        flex-direction: row;
    }

    .svis-relay-line {
        width: 20px;
        height: 2px;
    }

    .svis-relay-source {
        font-size: 12px;
        padding: 12px 16px;
    }

    .svis-relay-pill {
        font-size: 10px;
        padding: 6px 12px;
    }

    .svis-sec-row {
        padding: 10px 12px;
        font-size: 11px;
    }

    .svis-sec-icon {
        font-size: 16px;
    }

    .svis-rec-text {
        font-size: 14px;
    }

    .svis-rec-track span {
        font-size: 10px;
        width: 70px;
    }
}

/* ═══ INTERACTIVE RIVE DEMO ═══ */

.rive-demo-wrapper {
    position: relative;
    max-width: 960px;
    margin: var(--space-2xl) auto 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: var(--shadow-lg);
}

.rive-demo-stage {
    position: relative;
    aspect-ratio: 16/9;
    background: transparent;
    overflow: hidden;
}

.rive-demo-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.rive-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.8;
    /* Slight dim to help CG graphics pop */
    pointer-events: none;
}

.rive-demo-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
    z-index: 5;
}

/* ─── Scroll Highlight Animation ─── */
.highlight-active {
    animation: highlight-pulse 2.5s ease-in-out infinite;
    border-radius: 12px;
}

@keyframes highlight-pulse {
    0% {
        background: transparent;
        box-shadow: inset 0 0 0 1px transparent;
    }

    50% {
        background: rgba(99, 102, 241, 0.15);
        box-shadow: inset 0 0 0 1px var(--indigo);
    }

    100% {
        background: transparent;
        box-shadow: inset 0 0 0 1px transparent;
    }
}

/* ─── Control Panel ─── */
.rive-demo-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rive-demo-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rive-demo-panel-icon {
    font-size: 16px;
}

.rive-demo-panel-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.rive-demo-panel-hint {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    margin-left: auto;
}

.rive-demo-controls {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rive-loading {
    width: 100%;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    animation: pulse 2s ease-in-out infinite;
}

/* ─── Control Sections (Headline & Subtitle) ─── */
.rive-input-section {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    width: 100%;
}

.rive-section-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.rive-section-split {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.rive-split-left {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 16px;
}

.rive-split-right {
    flex: 1.5;
    min-width: 250px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

/* ─── Control Groups ─── */
.rive-control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
    flex: 0 0 auto;
}

.rive-control-group label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rive-control-group input[type="text"],
.rive-control-group input[type="number"] {
    width: 100%;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.rive-control-group input[type="text"]:focus,
.rive-control-group input[type="number"]:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Color input */
.rive-color-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rive-color-input input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.rive-color-input input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.rive-color-input input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.rive-color-hex {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Toggle */
.rive-toggle {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    border: none;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.rive-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    transition: transform 0.2s;
}

.rive-toggle:checked {
    background: var(--indigo);
}

.rive-toggle:checked::after {
    transform: translateX(18px);
}

/* Trigger Section */
.rive-trigger-section {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.rive-trigger-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
    color: #818cf8;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s var(--ease-out-expo);
    letter-spacing: 0.02em;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.rive-trigger-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(99, 102, 241, 0.12));
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.rive-trigger-btn:active {
    transform: translateY(0);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(99, 102, 241, 0.2));
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .rive-demo-panel-hint {
        display: none;
    }

    .rive-demo-panel-header {
        padding: 8px 12px;
        gap: 6px;
    }

    .rive-demo-panel-title {
        font-size: 12px;
    }

    .rive-demo-panel-icon {
        font-size: 13px;
    }

    .rive-demo-controls {
        padding: 8px 10px 10px;
        gap: 6px;
        /* Side-by-side headline + subtitle */
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .rive-input-section {
        padding: 8px 10px;
        border-radius: 8px;
    }

    .rive-section-label {
        font-size: 8px;
        margin-bottom: 4px;
        padding-bottom: 3px;
    }

    .rive-section-split {
        gap: 6px;
    }

    .rive-split-left {
        min-width: 0;
        gap: 4px;
        border-right: none;
        padding-right: 0;
    }

    .rive-split-right {
        min-width: 0;
        gap: 4px;
        flex: 1;
    }

    .rive-control-group {
        min-width: 0;
        gap: 2px;
    }

    .rive-control-group label {
        font-size: 7px;
        letter-spacing: 0.05em;
    }

    .rive-control-group input[type="text"],
    .rive-control-group input[type="number"] {
        padding: 5px 8px;
        font-size: 11px;
    }

    .rive-color-input {
        gap: 4px;
    }

    .rive-color-input input[type="color"] {
        width: 24px;
        height: 24px;
    }

    .rive-color-hex {
        font-size: 9px;
    }

    /* Trigger buttons — full width row at bottom */
    .rive-trigger-section {
        grid-column: 1 / -1;
        gap: 4px;
        padding-top: 4px;
        flex-wrap: nowrap;
    }

    .rive-trigger-btn {
        padding: 7px 8px;
        font-size: 10px;
        min-width: 0;
        letter-spacing: 0;
    }

    .rive-toggle {
        width: 32px;
        height: 18px;
    }

    .rive-toggle::after {
        width: 14px;
        height: 14px;
    }

    .rive-toggle:checked::after {
        transform: translateX(14px);
    }
}

/* ─── Pointer Auto-Click Animation ─── */
.rive-auto-pointer {
    pointer-events: none;
    z-index: 100;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Pulsing glow state — applied after Step 5 */
.rive-pointer-pulsing {
    animation: pointerPulse 1.6s ease-in-out infinite;
}

@keyframes pointerPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3)) drop-shadow(0 0 20px rgba(99, 102, 241, 0.0));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 30px rgba(99, 102, 241, 0.5));
    }
}

/* CTA text that appears below the pulsing pointer */
.rive-pointer-cta {
    position: absolute;
    pointer-events: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #ffffff;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 6px 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 10px rgba(99, 102, 241, 0.15);
    animation: ctaFadeIn 0.8s ease forwards, ctaPulse 2s ease-in-out 0.8s infinite;
    opacity: 0;
    z-index: 101;
}

@keyframes ctaFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ctaPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ─── Earthquake Ripple Effect ─── */
.rive-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin-top: -30px;
    margin-left: -30px;
    background: rgba(255, 255, 255, 0);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: earthquakeRipple 0.8s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes earthquakeRipple {
    0% {
        transform: scale(0.3);
        opacity: 1;
        border-width: 6px;
    }

    100% {
        transform: scale(4.0);
        opacity: 0;
        border-width: 0px;
        box-shadow: 0 0 50px rgba(255, 255, 255, 0);
    }
}