:root {
    --primary-purple: #8b5cf6;
    --dark-purple: #6d28d9;
    --light-purple: #a78bfa;
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --text-gray: #e5e7eb;
}

body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 100%);
    color: var(--text-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.browser-not-supported {
    display: none;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.card-body {
    color: var(--text-gray);
}

.form-control, .form-select {
    background: rgba(139, 92, 246, 0.1) !important;
    border: 2px solid rgba(139, 92, 246, 0.3) !important;
    color: var(--text-gray) !important;
}

.form-select {
    color: var(--text-gray) !important;
}

.form-select option {
    background: #1a1a2e !important;
    color: var(--text-gray) !important;
}

.form-control:focus, .form-select:focus {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: var(--primary-purple) !important;
    color: var(--text-gray) !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3) !important;
}

.border-purple {
    border-color: var(--primary-purple) !important;
}

.bg-dark {
    background: rgba(139, 92, 246, 0.1) !important;
}

.text-primary {
    color: var(--primary-purple) !important;
}

.text-muted {
    color: var(--text-gray) !important;
}

.text-light {
    color: var(--text-gray) !important;
}

.form-label {
    color: var(--text-gray) !important;
}

::placeholder {
    color: var(--text-gray) !important;
}
:-ms-input-placeholder {
    color: var(--text-gray) !important;
}
::-ms-input-placeholder {
    color: var(--text-gray) !important;
}

.logo-header {
    text-align: center;
    padding: 20px 0;
}

.logo-header img {
    height: 60px;
}

.hero-section {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15), transparent),
                radial-gradient(ellipse at bottom, rgba(109, 40, 217, 0.1), transparent);
    position: relative;
    overflow: hidden;
}


.hero-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-purple), var(--light-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    border: none;
    padding: 1rem 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 50px;
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6);
}

.btn-outline-primary {
    color: var(--primary-purple) !important;
    border-color: var(--primary-purple) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    color: white !important;
    background-color: var(--primary-purple) !important;
    border-color: var(--primary-purple) !important;
}

.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: white !important;
    background-color: var(--dark-purple) !important;
    border-color: var(--dark-purple) !important;
    box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple)) !important;
    border: none !important;
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-purple), var(--primary-purple)) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4) !important;
}

.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, var(--dark-purple), var(--primary-purple)) !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5) !important;
}

.alert-info {
    color: #e9d5ff !important;
    background-color: rgba(139, 92, 246, 0.15) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.alert-info .alert-link {
    color: var(--light-purple) !important;
}

.builder-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 4rem;
}

.progress-container {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.custom-progress {
    height: 8px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.custom-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--light-purple));
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.step-circle.active {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    border-color: var(--light-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.step-circle.completed {
    background: var(--primary-purple);
}

.step-label {
    font-size: 0.9rem;
    text-align: center;
    color: #9ca3af;
}

.step-label.active {
    color: var(--light-purple);
    font-weight: 600;
}

.builder-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-tabs {
    border: none;
    display: none;
}

.tab-content {
    padding: 2rem 0;
}

.select-area {
    border: 3px dashed rgba(139, 92, 246, 0.5);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(139, 92, 246, 0.05);
}

.select-area:hover {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.select-icon {
    font-size: 4rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.search-input {
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50px;
    padding: 1rem 1.5rem;
    color: var(--text-gray);
    width: 100%;
}

.search-input:focus {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary-purple);
    color: var(--text-gray);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

.video-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    flex: 0 0 calc(33.333% - 20px);
}

.video-item:hover {
    transform: scale(1.05);
}

.video-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-orientation-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 2;
}

.video-duration-icon {
    position: absolute;
    top: 10px;
    left: 45px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 2;
}

@media (max-width: 576px) {
    .video-orientation-icon {
        font-size: 12px;
        padding: 4px 6px;
    }
    .video-duration-icon {
        font-size: 12px;
        padding: 4px 6px;
    }
}

.video-item.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-purple);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.video-item:hover .video-play-overlay {
    opacity: 1;
}

.video-play-overlay i {
    color: white;
    font-size: 2rem;
    margin-left: 4px;
}

.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#previewVideo {
    width: 100%;
    max-height: 300px;
}

.orientation-option {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.orientation-option:hover {
    border-color: var(--primary-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
}

.orientation-option.selected {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.quality-option {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quality-option:hover {
    border-color: var(--primary-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
}

.quality-option.selected {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.sync-container {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.graph-container {
    position: relative;
    height: 120px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    margin-bottom: 1rem;
    overflow: hidden;
    cursor: grab;
}

.graph-container:active {
    cursor: grabbing;
}

.audio-graph {
    background: linear-gradient(180deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
    overflow: hidden; /* Ensure content is clipped to show only video-duration portion */
}

.graph-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.audio-graph .graph-content {
    width: 200%;
}

.graph-content canvas {
    pointer-events: none;
}

.graph-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--light-purple);
    margin-bottom: 0.5rem;
}

.video-graph {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.audio-graph {
    background: linear-gradient(180deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
}

.waveform-canvas, .framegraph-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.waveform-canvas {
    width: 200%; /* Make canvas twice as wide to allow sliding */
}

.graph-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 49px,
        rgba(139, 92, 246, 0.1) 49px,
        rgba(139, 92, 246, 0.1) 50px
    );
}

.time-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-purple);
    z-index: 4;
    pointer-events: none;
    display: block;
}

#audioIndicator {
    display: none; /* Audio indicator hidden by default */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

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

.modal-content {
    background-color: #1a1a1a;
    border: 2px solid var(--primary-purple);
    border-radius: 12px;
    width: 95%;
    max-width: 800px;
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    background: linear-gradient(90deg, #1a1a1a, #2a2a2a);
}

.modal-header h5 {
    margin: 0;
    color: #fff;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #333;
    background: #2a2a2a;
}

.text-overlay-timeline {
    display: none;
}

.text-overlay-timeline.has-overlays {
    display: block;
}

.overlay-track {
    position: relative;
    height: 44px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    overflow: hidden;
}

.overlay-item {
    position: absolute;
    top: 10px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-purple), #9b59b6);
    border: 1px solid #fff;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.overlay-item:hover {
    background: linear-gradient(135deg, #9b59b6, #7d3c98);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.overlay-item.selected {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 4px 8px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.overlay-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    transition: width 0.4s ease;
}

.overlay-item:hover::after {
    width: 100%;
}

.text-overlay-item {
    position: absolute;
    z-index: 10;
    background-color: transparent;
    color: white;
    padding: 3px 5px;
    border-radius: 0px;
    font-weight: bold;
    pointer-events: none;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    z-index: 100;
    box-sizing: border-box;
}

.text-overlay-item.fade-out {
    animation: fadeOut 0.2s ease-in-out;
    opacity: 0;
}

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

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

.text-overlay-item.hidden {
    opacity: 0;
    pointer-events: none;
}

.text-overlay-item {
    position: absolute;
    z-index: 10;
    background-color: transparent;
    color: white;
    padding: 3px 5px;
    border-radius: 0px;
    font-weight: bold;
    pointer-events: none;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.text-overlay-item.hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .builder-container, .builder-card, .sync-container {
        padding: 0.5rem;
    }

    .overlay-track {
    height: 60px;
    }

    .overlay-item {
    top: 15px;
    height: 30px;
    font-size: 11px;
    padding: 0 6px;
    }

    .video-grid {
    gap: 10px;
    }

    .video-item {
    flex: 0 0 calc(50% - 5px) !important;
    }
}

.overlay-item.draggable {
    cursor: grab;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.overlay-item.draggable:hover {
    opacity: 0.9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.overlay-item.dragging {
    opacity: 0.8;
    cursor: grabbing;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    transition: none;
}

.overlay-item.dragging::after {
    width: 100%;
}

.overlay-item {
    position: relative;
}

.resize-handle {
    position: absolute;
    top: 0;
    height: 100%;
    width: 8px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: ew-resize;
    z-index: 5;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.resize-handle.left {
    left: -2px;
    border-left: 2px solid rgba(255, 255, 255, 0.8);
}

.resize-handle.right {
    right: -2px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
}

.overlay-item:hover .resize-handle {
    background-color: rgba(255, 255, 255, 0.8);
    width: 10px;
}

.resize-handle.dragging {
    background-color: #9b59b6;
    box-shadow: 0 0 8px rgba(155, 89, 182, 0.6);
    width: 12px;
    border-color: #7d3c98;
}

.overlay-item.resizing {
    opacity: 0.95;
    outline: 2px dashed rgba(155, 89, 182, 0.6);
}

.overlay-track {
    position: relative;
    height: auto;
    min-height: 44px;
    background: linear-gradient(to bottom, #2a2a2a, #252525);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 0;
}

.overlay-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(
    rgba(255, 255, 255, 0.05) 44px,
    transparent 50px
    );
    background-size: 100% 44px;
    pointer-events: none;
    z-index: 0;
}

.overlay-item {
    position: absolute;
    top: auto;
    height: 40px;
    margin: 0;
    z-index: 2;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
}

.overlay-text {
    /*flex: 1;*/
    cursor: pointer;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overlay-text:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.overlay-item:hover {
    z-index: 3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.btn-edit {
    position: absolute;
    top: 2px;
    right: 10px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 6;
}

.overlay-item .btn-edit {
    opacity: 1;
}

.btn-edit:hover {
    background: rgba(52, 152, 219, 0.9);
    transform: scale(1.1);
}

.btn-edit i {
    font-size: 12px;
}

.overlay-track::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(
    transparent 49px,
    rgba(255, 255, 255, 0.1) 44px,
    transparent 51px
    );
    background-size: 100% 44px;
    pointer-events: none;
    z-index: 1;
}

.overlay-item {
    min-width: 30px;
}

.overlay-item.small-duration .resize-handle {
    display: none;
}

.text-overlay-timeline {
    position: relative;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    padding-top: 15px;
}

.overlay-track {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.center-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0%;
    width: 2px;
    background: rgba(139, 92, 246, 0.5);
    pointer-events: none;
    z-index: 5;
}

.offset-display {
    background: var(--primary-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Specific styling for video duration display */
#videoOffset {
    background: var(--primary-green);
    color: white;
}

.sync-instructions {
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid var(--primary-purple);
    padding: 1rem;
    border-radius: 0 10px 10px 0;
    margin-bottom: 1.5rem;
}

.playback-controls {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.playback-controls .btn {
    min-width: 120px;
    font-weight: 600;
}

.playback-controls .btn-success {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    border: none;
}

.playback-controls .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.btn-next, .btn-prev {
    background: linear-gradient(135deg, var(--primary-purple), var(--dark-purple));
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 1.5rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-next:hover, .btn-prev:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4);
}

.btn-prev {
    background: rgba(139, 92, 246, 0.2);
}

.preview-container {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.preview-container video {
    width: 100%;
    max-height: 500px;
}

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

.hidden {
    display: none;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-main {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-gray);
}

.footer-description {
    margin-bottom: 2rem;
    color: var(--text-gray);
    opacity: 0.8;
}

.footer-services {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.footer-services p {
    color: var(--text-gray);
    opacity: 0.7;
    margin-bottom: 1rem;
}

#homepage .footer {
    position: relative;
}

.footer {
    position: relative;
    background: var(--bg-card);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.image-upload-area {
    border: 2px dashed var(--primary-purple);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(139, 92, 246, 0.05);
}

.image-upload-area:hover {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.upload-text {
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.position-btn {
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-gray);
    margin: 2px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.position-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-1px);
}

.position-btn.active {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.image-overlay-item {
    position: absolute;
    background: rgba(139, 92, 246, 0.8);
    border: 2px solid var(--primary-purple);
    border-radius: 8px;
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    top: auto;
}

.image-overlay-item:hover {
    box-shadow: 0 6px 12px rgba(139, 92, 246, 0.5);
}

.image-overlay-item.selected {
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.image-overlay-thumbnail {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.image-overlay-info {
    font-size: 0.75rem;
    color: white;
    text-align: left;
}

.image-overlay-render {
    position: absolute;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99;
}

.image-overlay-render img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
