/* Modern Glassy Interactive Video Player */

/* Zoho Puvi font family (local files in client/puvi/) */
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Extralight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Regular Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Semibold Italic.ttf') format('truetype');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Bold Italic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Extrabold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zoho Puvi';
    src: url('./puvi/OpenType-TT/Zoho Puvi Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --black-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --black-glass: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    --secondary-color: #f8fafc;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-white: #ffffff;
    --text-clear: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --black-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-blur: blur(20px);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Zoho Puvi', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Particle Background */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(odd) {
    animation-delay: -2s;
    animation-duration: 8s;
}

.particle:nth-child(even) {
    animation-delay: -4s;
    animation-duration: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* Main Container */
.interactive-video-player {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.interactive-video-player.minimal {
    max-width: 100%;
    padding: 1rem;
}

/* Hide particle background in minimal mode */
.interactive-video-player.minimal ~ .particles-bg {
    display: none;
}

/* Alternative: hide particles when body contains minimal player */
body:has(.interactive-video-player.minimal) .particles-bg {
    display: none;
}

/* Hide body background gradient in minimal mode */
body:has(.interactive-video-player.minimal) {
    background: transparent;
}

/* Header */
.video-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--black-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: var(--black-shadow);
    position: relative;
    overflow: hidden;
}

.video-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

.video-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-clear);
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.025em;
}

.video-description {
    font-size: 1.125rem;
    color: rgba(241, 245, 249, 0.95);
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Dashboard */
.dashboard {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--black-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: var(--black-shadow);
    position: relative;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--primary-gradient);
    opacity: 0.6;
}

.dashboard-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-clear);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.create-tour-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.create-tour-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Video Tours Grid */
.video-tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.video-tour-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.video-tour-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.video-tour-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.video-tour-thumbnail::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-tour-info {
    padding: 1.5rem;
}

.video-tour-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-tour-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.video-tour-actions {
    display: flex;
    gap: 0.75rem;
}

.tour-btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.tour-btn.primary {
    background: var(--primary-gradient);
    color: var(--text-white);
}

.tour-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tour-btn.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.tour-btn:hover {
    transform: translateY(-1px);
}

.tour-btn.primary:hover {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.tour-btn.danger:hover {
    background: rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Video Container */
.video-wrapper {
    margin-bottom: 2rem;
    background: var(--black-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    box-shadow: var(--black-shadow);
    overflow: hidden;
    position: relative;
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--black-gradient);
    z-index: 1;
}

.video-container {
    position: relative;
    width: 100%;
    background: 
        radial-gradient(circle at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%),
        #000;
    border-radius: 0;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

/* Hotspots Overlay */
.hotspots-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
    z-index: 15;
}

.hotspot {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    z-index: 20;
    /* Removed transform - dot will be positioned precisely at click point */
}

.hotspot-dot {
    width: 24px;
    height: 24px;
    /* Center the dot at the hotspot position */
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, #ff4444 40%, rgba(255, 68, 68, 0.6) 70%, rgba(255, 68, 68, 0.2) 100%);
    border-radius: 50%;
    border: none;
    box-shadow: 
        0 4px 15px rgba(255, 68, 68, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 0 0 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
    z-index: 25;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        box-shadow: 
            0 4px 15px rgba(255, 68, 68, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.8),
            0 0 0 2px rgba(0, 0, 0, 0.3),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.9;
        box-shadow: 
            0 6px 20px rgba(255, 68, 68, 0.6),
            0 3px 12px rgba(0, 0, 0, 0.9),
            0 0 0 2px rgba(0, 0, 0, 0.4),
            inset 0 1px 3px rgba(255, 255, 255, 0.4);
    }
}

.hotspot-tooltip {
    position: absolute;
    background: var(--black-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--black-shadow);
    padding: 1rem;
    min-width: 280px;
    max-width: 350px;
    opacity: 1;
    visibility: visible;
    transition: var(--transition);
    z-index: 30;
    pointer-events: all;
}

/* Tooltip positioning classes - positioned relative to the dot at (0,0) */
.hotspot-tooltip.tooltip-top {
    bottom: 20px; /* Position above the dot with more space */
    left: 50%;
    transform: translateX(-50%);
}

.hotspot-tooltip.tooltip-bottom {
    top: 20px; /* Position below the dot with more space */
    left: 50%;
    transform: translateX(-50%);
}

.hotspot-tooltip.tooltip-left {
    right: 20px; /* Position to the left of the dot with more space */
    top: 0; /* Align to top, constrained by max-height */
    transform: none;
}

.hotspot-tooltip.tooltip-right {
    left: 20px; /* Position to the right of the dot with more space */
    top: 0; /* Align to top, constrained by max-height */
    transform: none;
}

/* Ensure tooltips stay within video area and don't interfere with controls */
.hotspot-tooltip {
    max-width: min(350px, 40vw);
    max-height: 80vh;
    word-wrap: break-word;
    box-sizing: border-box;
    overflow: hidden; /* Hide overflow, no scrollbar */
}

/* Arrow indicators for tooltips */
.hotspot-tooltip.tooltip-top::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: rgba(30, 41, 59, 0.9) transparent transparent transparent;
    z-index: 35;
}

.hotspot-tooltip.tooltip-bottom::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent rgba(30, 41, 59, 0.9) transparent;
    z-index: 35;
}

.hotspot-tooltip.tooltip-left::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    margin-top: -5px;
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(30, 41, 59, 0.9);
    z-index: 35;
}

.hotspot-tooltip.tooltip-right::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    margin-top: -5px;
    border-width: 5px 5px 5px 0;
    border-style: solid;
    border-color: transparent rgba(30, 41, 59, 0.9) transparent transparent;
    z-index: 35;
}

.hotspot-text {
    font-weight: 600;
    color: var(--text-clear);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hotspot-description {
    color: rgba(241, 245, 249, 0.9);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hotspot-navigation {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

/* Use end-screen-btn styles for hotspot navigation buttons */
.hotspot-navigation .end-screen-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Compact button style for hotspot navigation */
.end-screen-btn--compact {
    padding: 0.5rem 1rem !important;
    font-size: 0.8125rem !important;
    min-width: auto;
}

.hotspot-navigation .prev-btn {
    flex: 0 0 auto;
}

.hotspot-navigation .continue-btn {
    flex: 0 0 25%;
    max-width: 25%;
}

/* Legacy nav-btn styles (kept for backwards compatibility) */
.nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.nav-btn.prev-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn.continue-btn {
    background: var(--accent-color);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.nav-btn:hover {
    transform: scale(1.1);
}

.nav-btn.prev-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-btn.continue-btn:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Demo Start Overlay */
.demo-start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.9) 100%),
        var(--black-gradient);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: var(--transition);
    overflow: hidden; /* keep the thumbnail layer clipped to the overlay */
}

/* Thumbnail layer rendered BEHIND the start button at 30% opacity.
   The image URL is supplied via the --demo-thumb CSS variable, set
   by player.js applyDemoStartThumbnail(). */
.demo-start-overlay.has-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--demo-thumb);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* When a thumbnail is present, soften the overlay's heavy dark gradient
   so the image actually shows through. */
.demo-start-overlay.has-thumbnail {
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.55) 100%);
    backdrop-filter: none;
}

/* Ensure the start button sits above the thumbnail layer. */
.demo-start-overlay > * {
    position: relative;
    z-index: 1;
}

/* Hide hotspots (and any tooltips inside them) until the demo has started.
   The .pre-start class is added to .video-container in player.js when the
   player is built, and removed inside startInteractiveDemo(). Using
   display:none rather than visibility:hidden ensures partially-rendered
   tooltips can never bleed through the start-overlay. */
.video-container.pre-start .hotspots-overlay {
    display: none !important;
}

.demo-start-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.demo-start-btn {
    padding: 1.25rem 2.5rem;
    /* Zoho Analytics-style red CTA */
    background: #DD3932;
    color: #ffffff;
    border: 1px solid #DD3932;
    border-radius: var(--border-radius);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow:
        0 8px 25px rgba(221, 57, 50, 0.35),
        0 4px 15px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: none;
    position: relative;
    overflow: hidden;
}

.demo-start-btn::before {
    content: '▶';
    font-size: 1.25rem;
    color: inherit;
}

.demo-start-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s;
}

.demo-start-btn:hover::after {
    left: 100%;
}

.demo-start-btn:hover,
.demo-start-btn:focus-visible {
    background: #ffffff;
    color: #DD3932;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.35),
        0 8px 25px rgba(0, 0, 0, 0.25);
    outline: none;
}

/* Export Controls */
.export-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
}

.export-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.export-btn:hover {
    transform: translateY(-2px);
}

.export-btn:not(.export-btn--secondary):hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.export-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Modal */
.hotspot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at center, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.hotspot-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--black-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    box-shadow: var(--black-shadow);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: var(--transition);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.hotspot-modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-clear);
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-body {
    color: rgba(241, 245, 249, 0.95);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* End Screen Overlay */
.end-screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.end-screen-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.end-screen-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.end-screen-description {
    font-size: 1.125rem;
    color: rgba(241, 245, 249, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.end-screen-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.end-screen-btn {
    padding: 0.875rem 1.75rem;
    background: #DD3932;
    color: #ffffff;
    border: 1px solid #DD3932;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(221, 57, 50, 0.3);
}

.end-screen-btn:hover,
.end-screen-btn:focus-visible {
    background: #ffffff;
    color: #DD3932;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    outline: none;
}

.end-screen-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.end-screen-btn--secondary:hover,
.end-screen-btn--secondary:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--black-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--border-radius);
    box-shadow: 
        var(--black-shadow),
        0 0 20px rgba(239, 68, 68, 0.2);
    position: relative;
}

.error-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.error-message h2 {
    color: #fca5a5;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.error-message p {
    color: rgba(241, 245, 249, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .interactive-video-player {
        padding: 1rem;
    }

    .video-title {
        font-size: 2rem;
    }

    .video-description {
        font-size: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .video-tours-grid {
        grid-template-columns: 1fr;
    }

    .hotspot-tooltip {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        min-width: 280px;
        max-width: 90vw;
        z-index: 1000;
    }

    .hotspot-tooltip::after {
        display: none !important;
    }

    .hotspot-tooltip.tooltip-top,
    .hotspot-tooltip.tooltip-bottom,
    .hotspot-tooltip.tooltip-left,
    .hotspot-tooltip.tooltip-right {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
    }

    .export-controls {
        flex-direction: column;
        align-items: center;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-white);
    animation: spin 1s ease-in-out infinite;
}

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

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-white);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Preview hotspot styling - identical to player with subtle preview indicator */
.hotspot-preview {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    z-index: 25;
    /* No transform here - let the dot handle centering like regular hotspots */
}

.hotspot-preview .hotspot-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    animation: pulse 1.5s ease-in-out infinite;
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 25;
}

/* Add subtle preview indicator - small rotating border around the dot */
.hotspot-preview::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 2px dashed rgba(99, 102, 241, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 3s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
