/**
 * Feature Demos - Animated showcases for landing page
 * Simplified to match actual product UI
 */

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.feature-demos-section {
    padding: 80px 0;
    overflow: hidden;
}

.feature-demos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .feature-demos-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

.feature-demo {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-demo:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-demo-stage {
    height: 320px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.feature-demo-info {
    padding: 24px;
}

.feature-demo-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.feature-demo-info p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   DEVICE DROP DEMO
   ============================================ */

.demo-drop-container {
    width: 100%;
    max-width: 260px;
    position: relative;
}

.demo-drop-panel {
    background: var(--bg-glass, rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.demo-drop-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, rgba(42, 0, 229, 0.08), rgba(236, 7, 209, 0.08));
}

.demo-drop-header i {
    color: var(--link-color);
    font-size: 0.875rem;
}

.demo-drop-header span {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.demo-drop-content {
    padding: 12px;
}

/* File Card */
.demo-drop-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 10px;
}

.demo-drop-file-icon {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 0.9375rem;
}

.demo-drop-file-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.demo-drop-file-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Device List */
.demo-drop-devices {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.demo-drop-device {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    border: 2px solid transparent;
    border-radius: 8px;
    opacity: 0;
    transform: translateX(-10px);
}

.demo-drop-device-icon {
    width: 30px;
    height: 30px;
    background: var(--bg-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.demo-drop-device-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.demo-drop-device-type {
    font-size: 0.625rem;
    color: var(--text-muted);
}

/* Progress Indicator */
.demo-drop-progress {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-glass, rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    opacity: 0;
    transform: translateY(10px);
}

.demo-drop-progress-icon {
    width: 28px;
    height: 28px;
    background: var(--gradient, linear-gradient(135deg, #2A00E5, #EC07D1));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.6875rem;
}

.demo-drop-progress-info {
    flex: 1;
}

.demo-drop-progress-text {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.demo-drop-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.demo-drop-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient, linear-gradient(135deg, #2A00E5, #EC07D1));
    border-radius: 2px;
}

/* Device Drop Animations */
@keyframes dropDeviceAppear1 {
    0% { opacity: 0; transform: translateX(-10px); }
    15% { opacity: 1; transform: translateX(0); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes dropDeviceAppear2 {
    0%, 10% { opacity: 0; transform: translateX(-10px); }
    25% { opacity: 1; transform: translateX(0); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes dropDeviceSelect {
    0%, 30% { border-color: transparent; }
    35%, 100% { border-color: var(--link-color); }
}

@keyframes dropProgressAppear {
    0%, 40% { opacity: 0; transform: translateY(10px); }
    50%, 95% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

@keyframes dropProgressFill {
    0%, 50% { width: 0%; }
    90% { width: 100%; }
    100% { width: 100%; }
}

.demo-drop-container.animate .demo-drop-device:nth-child(1) {
    animation: dropDeviceAppear1 5s ease-out infinite, dropDeviceSelect 5s ease-out infinite;
}

.demo-drop-container.animate .demo-drop-device:nth-child(2) {
    animation: dropDeviceAppear2 5s ease-out infinite;
}

.demo-drop-container.animate .demo-drop-progress {
    animation: dropProgressAppear 5s ease-out infinite;
}

.demo-drop-container.animate .demo-drop-progress-fill {
    animation: dropProgressFill 5s ease-out infinite;
}

/* ============================================
   DEVICE PLAY DEMO - Side by side layout
   ============================================ */

.demo-play-container {
    width: 100%;
    max-width: 320px;
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* Host Control Panel */
.demo-play-host {
    flex: 0 0 120px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.demo-play-host-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.demo-play-host-header i {
    color: var(--link-color);
    font-size: 0.75rem;
}

.demo-play-host-header span {
    font-weight: 600;
    font-size: 0.6875rem;
    color: var(--text-primary);
}

.demo-play-host-badge {
    display: none;
}

.demo-play-btn {
    width: 100%;
    padding: 8px 6px;
    background: var(--gradient, linear-gradient(135deg, #2A00E5, #EC07D1));
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.demo-play-btn i {
    font-size: 0.5rem;
}

.demo-play-sources {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.demo-play-source {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    border: 2px solid transparent;
    border-radius: 6px;
    opacity: 0;
    transform: translateX(-5px);
}

.demo-play-source i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.demo-play-source span {
    font-size: 0.5625rem;
    color: var(--text-muted);
}

/* Viewer Display */
.demo-play-viewer {
    flex: 1;
    background: #0a0a12;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.demo-play-viewer-header {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-play-viewer-header i {
    color: var(--text-muted);
    font-size: 0.625rem;
}

.demo-play-viewer-header span {
    font-size: 0.5625rem;
    color: var(--text-secondary);
}

.demo-play-viewer-badge {
    margin-left: auto;
    font-size: 0.4375rem;
    padding: 2px 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.demo-play-screen {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.demo-play-screen-waiting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.3);
}

.demo-play-screen-waiting i {
    font-size: 1rem;
}

.demo-play-screen-waiting span {
    font-size: 0.5rem;
}

.demo-play-stream {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e1e2e 0%, #141420 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.demo-play-stream-content {
    width: 70%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.demo-play-stream-line {
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin-bottom: 5px;
}

.demo-play-stream-line:nth-child(2) { width: 65%; }
.demo-play-stream-line:nth-child(3) { width: 80%; margin-bottom: 0; }

.demo-play-live {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 2px 6px;
    background: #ef4444;
    border-radius: 3px;
    font-size: 0.4375rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0;
}

.demo-play-live::before {
    content: '';
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: livePulse 1s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Device Play Animations */
@keyframes playSourceAppear1 {
    0% { opacity: 0; transform: translateX(-5px); }
    20% { opacity: 1; transform: translateX(0); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes playSourceAppear2 {
    0%, 15% { opacity: 0; transform: translateX(-5px); }
    35% { opacity: 1; transform: translateX(0); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes playSourceSelect {
    0%, 40% { border-color: transparent; }
    45%, 100% { border-color: var(--link-color); }
}

@keyframes playStreamAppear {
    0%, 50% { opacity: 0; }
    60%, 95% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes playLiveAppear {
    0%, 55% { opacity: 0; }
    65%, 95% { opacity: 1; }
    100% { opacity: 0; }
}

.demo-play-container.animate .demo-play-source:nth-child(1) {
    animation: playSourceAppear1 6s ease-out infinite, playSourceSelect 6s ease-out infinite;
}

.demo-play-container.animate .demo-play-source:nth-child(2) {
    animation: playSourceAppear2 6s ease-out infinite;
}

.demo-play-container.animate .demo-play-stream {
    animation: playStreamAppear 6s ease-out infinite;
}

.demo-play-container.animate .demo-play-live {
    animation: playLiveAppear 6s ease-out infinite;
}

/* ============================================
   ORGANISATION ALERTS DEMO - Toast Notifications
   ============================================ */

.demo-alerts-container {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Toast Notification */
.demo-alert-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--link-color);
    opacity: 0;
    transform: translateX(20px);
}

.demo-alert-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(42, 0, 229, 0.1), rgba(236, 7, 209, 0.1));
    color: var(--link-color);
    font-size: 0.875rem;
}

.demo-alert-toast-content {
    flex: 1;
    min-width: 0;
}

.demo-alert-toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.demo-alert-toast-msg {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.demo-alert-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 4px;
    font-size: 0.75rem;
    opacity: 0.6;
    cursor: pointer;
    flex-shrink: 0;
}

/* Emergency Toast Variant */
.demo-alert-toast-emergency {
    border-left-color: #ef4444;
}

.demo-alert-toast-emergency .demo-alert-toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Toast Animations */
@keyframes toastSlideIn1 {
    0% { opacity: 0; transform: translateX(20px); }
    15% { opacity: 1; transform: translateX(0); }
    80% { opacity: 1; transform: translateX(0); }
    95%, 100% { opacity: 0; transform: translateX(20px); }
}

@keyframes toastSlideIn2 {
    0%, 25% { opacity: 0; transform: translateX(20px); }
    40% { opacity: 1; transform: translateX(0); }
    80% { opacity: 1; transform: translateX(0); }
    95%, 100% { opacity: 0; transform: translateX(20px); }
}

.demo-alerts-container.animate .demo-alert-toast:nth-child(1) {
    animation: toastSlideIn1 5s ease-out infinite;
}

.demo-alerts-container.animate .demo-alert-toast:nth-child(2) {
    animation: toastSlideIn2 5s ease-out infinite;
}

/* ============================================
   REAL-TIME COLLABORATION DEMO
   ============================================ */

.demo-collab-container {
    width: 100%;
    max-width: 280px;
}

.demo-collab-canvas {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.demo-collab-users {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-light);
}

.demo-collab-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
    margin-left: -8px;
}

.demo-collab-avatar:first-child {
    margin-left: 0;
}

.demo-collab-count {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-left: auto;
}

.demo-collab-content {
    position: relative;
    height: 180px;
    background: var(--bg-card);
}

.demo-collab-drawing {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.demo-collab-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
}

/* Cursors */
.demo-collab-cursor {
    position: absolute;
    display: flex;
    flex-direction: column;
    opacity: 0;
}

.demo-collab-cursor-1 {
    top: 35%;
    left: 60%;
}

.demo-collab-cursor-2 {
    top: 55%;
    left: 25%;
}

.demo-collab-cursor-name {
    font-size: 0.5rem;
    font-weight: 500;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
    white-space: nowrap;
}

/* Collaboration Animations */
@keyframes collabDrawPath {
    0%, 10% { stroke-dashoffset: 300; }
    50%, 100% { stroke-dashoffset: 0; }
}

@keyframes collabCursor1Move {
    0%, 10% { opacity: 0; top: 35%; left: 60%; }
    20% { opacity: 1; top: 35%; left: 60%; }
    40% { opacity: 1; top: 45%; left: 40%; }
    60% { opacity: 1; top: 50%; left: 55%; }
    80% { opacity: 1; top: 40%; left: 70%; }
    95%, 100% { opacity: 0; top: 40%; left: 70%; }
}

@keyframes collabCursor2Move {
    0%, 15% { opacity: 0; top: 55%; left: 25%; }
    25% { opacity: 1; top: 55%; left: 25%; }
    45% { opacity: 1; top: 60%; left: 45%; }
    65% { opacity: 1; top: 45%; left: 35%; }
    85% { opacity: 1; top: 55%; left: 50%; }
    95%, 100% { opacity: 0; top: 55%; left: 50%; }
}

.demo-collab-container.animate .demo-collab-path {
    animation: collabDrawPath 5s ease-out infinite;
}

.demo-collab-container.animate .demo-collab-cursor-1 {
    animation: collabCursor1Move 5s ease-in-out infinite;
}

.demo-collab-container.animate .demo-collab-cursor-2 {
    animation: collabCursor2Move 5s ease-in-out infinite;
}

/* ============================================
   IMPORT FILES DEMO
   ============================================ */

.demo-import-container {
    width: 100%;
    max-width: 280px;
    position: relative;
    height: 220px;
}

/* File being dragged */
.demo-import-file {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
}

.demo-import-file-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b35;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.2);
}

.demo-import-file-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Drop zone */
.demo-import-zone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 100px;
    border: 2px dashed var(--border-light);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
}

.demo-import-zone-icon {
    font-size: 1.5rem;
    color: var(--link-color);
}

.demo-import-zone-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Result pages */
.demo-import-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
}

.demo-import-pages {
    display: flex;
    gap: 8px;
}

.demo-import-page {
    width: 60px;
    height: 80px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.demo-import-page-content {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.demo-import-page-line {
    height: 4px;
    background: var(--text-muted);
    opacity: 0.2;
    border-radius: 2px;
}

.demo-import-page-line.short {
    width: 60%;
}

.demo-import-page-box {
    width: 70%;
    height: 30px;
    background: var(--link-color);
    opacity: 0.15;
    border-radius: 4px;
    margin: auto;
}

.demo-import-page span {
    text-align: center;
    font-size: 0.5rem;
    padding: 4px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}

.demo-import-success {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 500;
}

.demo-import-success i {
    font-size: 0.875rem;
}

/* Import Animations */
@keyframes importFileDrop {
    0% { opacity: 1; top: 10px; transform: translateX(-50%) scale(1); }
    25% { opacity: 1; top: 80px; transform: translateX(-50%) scale(0.9); }
    35%, 100% { opacity: 0; top: 80px; transform: translateX(-50%) scale(0.5); }
}

@keyframes importZoneShow {
    0%, 5% { opacity: 0; border-color: var(--border-light); }
    10%, 30% { opacity: 1; border-color: var(--link-color); }
    40%, 100% { opacity: 0; }
}

@keyframes importResultShow {
    0%, 40% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    50%, 90% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

.demo-import-container.animate .demo-import-file {
    animation: importFileDrop 5s ease-out infinite;
}

.demo-import-container.animate .demo-import-zone {
    animation: importZoneShow 5s ease-out infinite;
}

.demo-import-container.animate .demo-import-result {
    animation: importResultShow 5s ease-out infinite;
}

/* ============================================
   MULTI-DEVICE SYNC DEMO
   ============================================ */

.demo-sync-container {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.demo-sync-devices {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

/* Device frames */
.demo-sync-device {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.demo-sync-laptop .demo-sync-screen {
    width: 100px;
    height: 65px;
    background: #0a0a12;
    border: 2px solid #333;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.demo-sync-laptop .demo-sync-base {
    width: 120px;
    height: 8px;
    background: linear-gradient(to bottom, #444, #333);
    border-radius: 0 0 4px 4px;
}

.demo-sync-tablet .demo-sync-screen {
    width: 70px;
    height: 90px;
    background: #0a0a12;
    border: 3px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.demo-sync-phone .demo-sync-screen {
    width: 40px;
    height: 75px;
    background: #0a0a12;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.demo-sync-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
}

.demo-sync-shape {
    width: 40%;
    height: 40%;
    background: var(--gradient, linear-gradient(135deg, #2A00E5, #EC07D1));
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.5);
}

/* Sync indicator */
.demo-sync-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 100px;
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
}

.demo-sync-indicator i {
    font-size: 0.75rem;
}

/* Sync Animations */
@keyframes syncShapeAppear {
    0%, 15% { opacity: 0; transform: scale(0.5); }
    30%, 85% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

@keyframes syncShapeAppear2 {
    0%, 25% { opacity: 0; transform: scale(0.5); }
    40%, 85% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

@keyframes syncShapeAppear3 {
    0%, 35% { opacity: 0; transform: scale(0.5); }
    50%, 85% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

@keyframes syncIndicatorShow {
    0%, 45% { opacity: 0; }
    55%, 85% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes syncSpin {
    0%, 45% { transform: rotate(0deg); }
    55% { transform: rotate(360deg); }
    100% { transform: rotate(360deg); }
}

.demo-sync-container.animate .demo-sync-laptop .demo-sync-shape {
    animation: syncShapeAppear 5s ease-out infinite;
}

.demo-sync-container.animate .demo-sync-tablet .demo-sync-shape {
    animation: syncShapeAppear2 5s ease-out infinite;
}

.demo-sync-container.animate .demo-sync-phone .demo-sync-shape {
    animation: syncShapeAppear3 5s ease-out infinite;
}

.demo-sync-container.animate .demo-sync-indicator {
    animation: syncIndicatorShow 5s ease-out infinite;
}

.demo-sync-container.animate .demo-sync-indicator i {
    animation: syncSpin 5s ease-out infinite;
}

/* ============================================
   PAUSE ANIMATIONS WHEN NOT VISIBLE
   ============================================ */

.feature-demo-stage.paused * {
    animation-play-state: paused !important;
}

/* ============================================
   LIGHT MODE ADJUSTMENTS
   ============================================ */

[data-theme="light"] .demo-play-viewer {
    background: #f0f0f5;
}

[data-theme="light"] .demo-play-screen {
    background: #e8e8ed;
}

[data-theme="light"] .demo-play-stream {
    background: linear-gradient(135deg, #f5f5f8 0%, #e8e8ed 100%);
}

[data-theme="light"] .demo-play-stream-content {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .demo-play-stream-line {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .demo-alert-toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

/* ============================================
   RESPOND - FORMS & QUIZZES DEMO
   ============================================ */

.demo-respond-container {
    display: flex;
    gap: 16px;
    padding: 20px;
    width: 100%;
    max-width: 340px;
}

.demo-respond-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px;
    width: 120px;
    flex-shrink: 0;
}

.demo-respond-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.demo-respond-header i {
    color: var(--link-color);
    font-size: 0.65rem;
}

.demo-respond-qr {
    background: white;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
}

.demo-respond-qr-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    aspect-ratio: 1;
}

.demo-respond-qr-grid div {
    background: #000;
    border-radius: 1px;
    opacity: 0;
}

.demo-respond-code {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.demo-respond-results {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px;
}

.demo-respond-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
}

.demo-respond-count {
    background: var(--link-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
}

.demo-respond-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-respond-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-respond-bar-label {
    width: 16px;
    height: 16px;
    background: var(--bg-secondary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
}

.demo-respond-bar-track {
    flex: 1;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.demo-respond-bar-fill {
    height: 100%;
    background: var(--link-color);
    border-radius: 6px;
    width: 0;
}

/* Respond Animation */
@keyframes respondQrAppear {
    0%, 10% { opacity: 0; }
    15%, 100% { opacity: 1; }
}

@keyframes respondBarGrow {
    0%, 30% { width: 0; }
    50%, 100% { width: var(--target-width); }
}

@keyframes respondCountUp {
    0%, 30% { content: "0"; }
    40% { content: "5"; }
    50% { content: "12"; }
    60% { content: "18"; }
    70%, 100% { content: "24"; }
}

.demo-respond-container.animate .demo-respond-qr-grid div {
    animation: respondQrAppear 4s ease-out infinite;
}

.demo-respond-container.animate .demo-respond-qr-grid div:nth-child(odd) {
    animation-delay: 0.05s;
}

.demo-respond-container.animate .demo-respond-bar-fill {
    animation: respondBarGrow 4s ease-out infinite;
}

.demo-respond-container.animate .demo-respond-bar:nth-child(2) .demo-respond-bar-fill {
    animation-delay: 0.1s;
}

.demo-respond-container.animate .demo-respond-bar:nth-child(3) .demo-respond-bar-fill {
    animation-delay: 0.2s;
}

/* ============================================
   MIND MAP DEMO
   ============================================ */

.demo-mindmap-container {
    position: relative;
    width: 200px;
    height: 140px;
}

.demo-mindmap-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.demo-mindmap-line {
    stroke: var(--link-color);
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    opacity: 0.5;
}

.demo-mindmap-node {
    position: absolute;
    background: var(--bg-card);
    border: 2px solid var(--link-color);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.8);
}

.demo-mindmap-center {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--link-color);
    color: white;
    border-color: var(--link-color);
}

.demo-mindmap-branch-1 {
    left: 5%;
    top: 10%;
}

.demo-mindmap-branch-2 {
    right: 5%;
    top: 10%;
}

.demo-mindmap-branch-3 {
    left: 5%;
    bottom: 10%;
}

.demo-mindmap-branch-4 {
    right: 5%;
    bottom: 10%;
}

/* Mind Map Animation */
@keyframes mindmapNodeAppear {
    0%, 10% { opacity: 0; transform: scale(0.8); }
    20%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes mindmapCenterAppear {
    0%, 5% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    15%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes mindmapLineGrow {
    0%, 20% { stroke-dashoffset: 100; }
    40%, 100% { stroke-dashoffset: 0; }
}

.demo-mindmap-container.animate .demo-mindmap-center {
    animation: mindmapCenterAppear 5s ease-out infinite;
}

.demo-mindmap-container.animate .demo-mindmap-branch {
    animation: mindmapNodeAppear 5s ease-out infinite;
}

.demo-mindmap-container.animate .demo-mindmap-branch-1 {
    animation-delay: 0.3s;
}

.demo-mindmap-container.animate .demo-mindmap-branch-2 {
    animation-delay: 0.5s;
}

.demo-mindmap-container.animate .demo-mindmap-branch-3 {
    animation-delay: 0.7s;
}

.demo-mindmap-container.animate .demo-mindmap-branch-4 {
    animation-delay: 0.9s;
}

.demo-mindmap-container.animate .demo-mindmap-line {
    animation: mindmapLineGrow 5s ease-out infinite;
}

.demo-mindmap-container.animate .demo-mindmap-line:nth-child(1) {
    animation-delay: 0.2s;
}

.demo-mindmap-container.animate .demo-mindmap-line:nth-child(2) {
    animation-delay: 0.4s;
}

.demo-mindmap-container.animate .demo-mindmap-line:nth-child(3) {
    animation-delay: 0.6s;
}

.demo-mindmap-container.animate .demo-mindmap-line:nth-child(4) {
    animation-delay: 0.8s;
}

/* ============================================
   QR SIGN-IN DEMO
   ============================================ */

.demo-qrsignin-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px;
    position: relative;
}

.demo-qrsignin-phone {
    width: 60px;
    height: 100px;
    background: #1a1a2e;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.demo-qrsignin-phone-screen {
    width: 100%;
    height: 100%;
    background: #0d0d1a;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.demo-qrsignin-camera {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0;
}

.demo-qrsignin-viewfinder {
    width: 36px;
    height: 36px;
    border: 2px solid var(--link-color);
    border-radius: 4px;
    opacity: 0;
}

.demo-qrsignin-display {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.demo-qrsignin-display-header {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.demo-qrsignin-qr {
    background: white;
    border-radius: 6px;
    padding: 8px;
    width: 70px;
    height: 70px;
}

.demo-qrsignin-qr-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    width: 100%;
    height: 100%;
}

.demo-qrsignin-qr-grid div {
    background: #000;
    border-radius: 1px;
}

.demo-qrsignin-success {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    white-space: nowrap;
}

.demo-qrsignin-success i {
    font-size: 0.8rem;
}

/* QR Sign-in Animation */
@keyframes qrPhoneAppear {
    0%, 5% { opacity: 0; transform: translateX(-20px); }
    15%, 100% { opacity: 1; transform: translateX(0); }
}

@keyframes qrCameraShow {
    0%, 15% { opacity: 0; }
    25%, 100% { opacity: 1; }
}

@keyframes qrViewfinderShow {
    0%, 20% { opacity: 0; transform: scale(0.8); }
    30%, 60% { opacity: 1; transform: scale(1); }
    70%, 100% { opacity: 0; transform: scale(1.1); }
}

@keyframes qrSuccessShow {
    0%, 55% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    65%, 90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(0); }
}

.demo-qrsignin-container.animate .demo-qrsignin-phone {
    animation: qrPhoneAppear 5s ease-out infinite;
}

.demo-qrsignin-container.animate .demo-qrsignin-camera {
    animation: qrCameraShow 5s ease-out infinite;
}

.demo-qrsignin-container.animate .demo-qrsignin-viewfinder {
    animation: qrViewfinderShow 5s ease-out infinite;
}

.demo-qrsignin-container.animate .demo-qrsignin-success {
    animation: qrSuccessShow 5s ease-out infinite;
}
