/* Modern Glassy Interactive Video Creator */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&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;
    --success-color: #22c55e;
    --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);
    --sidebar-width: 350px;
}

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

body {
    font-family: '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 Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--black-glass);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-clear);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.025em;
}

.mobile-menu-btn {
    background: var(--black-glass);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-clear);
    padding: 0.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: var(--glass-blur);
    display: none;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-btn {
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    color: var(--text-white);
    border: 1px solid var(--glass-border);
    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;
}

.header-btn.primary {
    background: var(--primary-gradient);
    border: none;
}

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

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 70px);
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(20, 20, 20, 0.9) 50%,
        rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 50;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.4;
}

.sidebar-section {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.sidebar-section:last-child::after {
    display: none;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-clear);
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    background: var(--primary-gradient);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* File Upload */
.file-upload {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 2.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.02) 100%);
}

.file-upload:hover,
.file-upload.dragover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.15) 0%, 
        rgba(99, 102, 241, 0.08) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.file-upload-text {
    color: var(--text-clear);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.file-upload-hint {
    color: rgba(241, 245, 249, 0.7);
    font-size: 0.75rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.file-input {
    display: none;
}

/* Form Controls */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-clear);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.form-input {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    color: var(--text-clear);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input::placeholder {
    color: rgba(241, 245, 249, 0.6);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.5) 0%, 
        rgba(0, 0, 0, 0.3) 100%);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3);
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%),
        rgba(255, 255, 255, 0.15);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

/* Color Picker Styles */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-input {
    width: 100%;
    height: 3rem;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: var(--border-radius-sm);
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: var(--border-radius-sm);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.color-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.color-preset {
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-preset:active {
    transform: scale(0.95);
}

.color-preset[data-color="#ffffff"] {
    border-color: rgba(0, 0, 0, 0.3);
}

.color-preset[data-color="#000000"] {
    border-color: rgba(255, 255, 255, 0.6);
}

/* Buttons */
.btn {
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.08) 100%);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

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

.btn-success:hover {
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Hotspot Form */
.hotspot-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.form-actions .btn {
    flex: 1;
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem;
}

/* End Screen Configuration */
.end-screen-actions-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.end-screen-action {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
}

.end-screen-action .action-label,
.end-screen-action .action-url {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-clear);
    font-size: 0.8125rem;
}

.end-screen-action .action-label {
    font-weight: 500;
}

.end-screen-action .action-url {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

.end-screen-action .action-label::placeholder,
.end-screen-action .action-url::placeholder {
    color: rgba(241, 245, 249, 0.4);
}

.end-screen-action .remove-action {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    align-self: flex-end;
    margin-top: 0.25rem;
}

.btn-small {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
}

/* Hotspots List */
.hotspots-list {
    max-height: 300px;
    overflow-y: auto;
}

.hotspot-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.hotspot-item:hover,
.hotspot-item.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.hotspot-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.hotspot-item-title {
    font-weight: 600;
    color: var(--text-clear);
    font-size: 0.875rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hotspot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.hotspot-header h4 {
    color: var(--text-clear);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hotspot-color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.hotspot-info {
    flex: 1;
}

.hotspot-info p {
    color: rgba(241, 245, 249, 0.9);
    font-size: 0.8125rem;
    line-height: 1.4;
    margin: 0.25rem 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hotspot-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.hotspot-item-time {
    font-size: 0.75rem;
    color: rgba(241, 245, 249, 0.8);
    background: var(--black-glass);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hotspot-item-text {
    color: rgba(241, 245, 249, 0.9);
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hotspot-item-actions {
    display: flex;
    gap: 0.5rem;
}

.hotspot-action-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.hotspot-action-btn.edit {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

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

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

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: calc(70px + 1rem);
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
    flex: 1;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.1) 0%, 
        rgba(0, 0, 0, 0.05) 100%);
}

/* Video Container */
.video-section {
    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: 0 12px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.video-section::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;
    overflow: hidden;
    margin-bottom: 2rem;
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    /* Fill all remaining vertical space; the video element preserves its own
       aspect ratio (width:auto) and is centered inside this container. */
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player {
    /* Maintain the video's native aspect ratio: scale by height first, let the
       width be derived. The container letterboxes horizontally if needed. */
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    background: #000;
}

/* Thumbnail upload field */
.thumbnail-upload-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.thumbnail-upload-group .form-label {
    display: flex;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
}

.thumbnail-upload-group .form-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
    margin-top: 2px;
}

.thumbnail-input {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    cursor: pointer;
}

.thumbnail-input:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.thumbnail-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.thumbnail-status {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.thumbnail-status.success {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.thumbnail-status.error {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.video-placeholder {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    text-align: center;
    padding: 4rem 2rem;
    width: 100%;
    min-height: 300px; /* Only placeholder has min-height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-placeholder div {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.video-placeholder h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 1rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.025em;
}

.video-placeholder p {
    font-size: 1rem;
    color: rgba(248, 250, 252, 0.8);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.5;
}

/* Hotspots Overlay */
.hotspots-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all; /* Allow clicks for hotspot creation */
    z-index: 10;
    cursor: crosshair; /* Show that area is clickable */
}

.hotspot {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    z-index: 20;
}

/* Hotspot dot - centered on the hotspot position */
.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);
    }
}

/* Selected and preview hotspot styling */

.hotspot-preview .hotspot-text {
    color: #f59e0b;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Video Controls */
.video-controls {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.control-btn.primary {
    background: var(--primary-gradient);
}

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

.timeline-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.timeline {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.timeline::-webkit-slider-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.timeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.timeline::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.6);
}

.timeline::-moz-range-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    border: none;
}

.timeline::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.1s ease;
}

.time-display {
    color: var(--text-white);
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.progress-text {
    color: rgba(241, 245, 249, 0.9);
    font-size: 0.875rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin-top: 0.5rem;
}

/* Export Section — floating panel that appears when a header button is used.
   It only contains the share-link / embed-code output (the trigger buttons
   live in the header now). When neither child is shown, the section collapses. */
.export-section {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 90;
    width: min(520px, calc(100vw - 2rem));
    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: 0 12px 40px rgba(0, 0, 0, 0.4);
    padding: 1rem 1.25rem;
    overflow: hidden;
}

.export-section:not(:has(> :not(.hidden))) {
    display: none;
}

.export-section::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;
}

/* Header export buttons */
.header-btn-export {
    background: var(--primary-gradient);
    border: none;
    color: var(--text-clear);
}

.export-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-clear);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.export-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Share Link Container */
.share-link-container, .embed-code-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
}

.share-link-container h3, .embed-code-container h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-clear);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group .form-input {
    flex: 1;
}

.input-group .btn {
    white-space: nowrap;
}

.hidden {
    display: none !important;
}

/* Status Messages */
.status-message {
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.status-message.success {
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%),
        rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.status-message.error {
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%),
        rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-message.warning {
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%),
        rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Modal */
.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);
}

.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;
}

.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.4);
}

.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.3);
}

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

/* 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);
    }
}

/* Upload Progress */
.upload-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.upload-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
}

.upload-progress .progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
    position: absolute;
    top: 0;
    left: 0;
}

.upload-progress .progress-text {
    display: block;
    text-align: center;
    color: var(--text-clear);
    font-size: 0.875rem;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: block !important;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-top: calc(70px + 1rem);
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 1rem;
    }

    .export-actions {
        grid-template-columns: 1fr;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .header-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }

    .main-content {
        padding-top: calc(70px + 1rem);
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 1rem;
    }

    .video-section {
        margin-bottom: 0;
    }

    .video-placeholder {
        padding: 2rem 1rem;
    }

    .video-placeholder h3 {
        font-size: 1.25rem;
    }

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

    .time-inputs {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .video-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.1rem;
    }

    .header-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .main-content {
        padding-top: calc(70px + 0.5rem);
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .video-placeholder {
        padding: 1.5rem 0.5rem;
    }

    .sidebar-section {
        padding: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 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;
    margin-bottom: 5px;
}

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