body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f4f4;
    color: #222;
}

header {
    position: relative;
    width: 100vw;
    height: 30vh;
    overflow: hidden;
    background: #000;
    transition: height 0.6s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header Logo */
.header-logo-link {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.header-logo {
    height: 44px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.header-logo-link:hover .header-logo {
    opacity: 0.8;
}

header.video-hidden {
    height: 0;
    overflow: hidden;
}

.header-video, #headerVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    position: static;
    opacity: 0.7;
}

/* Video Toggle Buttons */
.video-toggle-btn {
    position: fixed;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.video-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Hide Video Button - positioned in upper right corner of screen */
.hide-video-btn {
    top: 20px;
    right: 20px;
}

/* Show Video Button - positioned in upper right of screen */
.show-video-btn {
    top: 20px;
    right: 20px;
}

.title-section {
    padding: 20px;
    text-align: center;
    background: #f4f4f4;
}

.title-section h1 {
    color: #222;
    font-size: 2.5rem;
    margin: 0;
}

main {
    max-width: 2600px;
    margin: 40px auto;
    padding: 0 20px;
}

.model-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.layer-controls {
    order: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background: #000;
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 12px 24px;
    margin-bottom: 20px;
    width: auto;
    max-width: none;
}

.layer-controls h2 {
    display: none;
}

.layer-controls ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.layer-controls li {
    margin-bottom: 0;
    white-space: nowrap;
}

.layer-controls label {
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-weight: 500;
}

.layer-controls input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    border: 2px solid #fff;
    background: #000;
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
    pointer-events: auto;
    z-index: 10;
}

.layer-controls input[type="checkbox"]:checked {
    background: #00ff00;
    border: 2px solid #000;
}

.layer-controls input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    color: #000;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.layer-controls input[type="checkbox"]:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* Vertical divider between individual controls and toggle all */
.vertical-divider {
    width: 2px;
    height: 40px;
    background: #00ff00;
    margin: 0 20px;
    align-self: center;
}

/* Toggle All Section */
.toggle-all-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.toggle-all-button {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
}

.toggle-all-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.toggle-all-button.all-on {
    color: #00ff00;
    border-color: #00ff00;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.toggle-all-button.all-on:hover {
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.toggle-all-button.mixed {
    color: #888;
    border-color: #666;
    opacity: 0.7;
    cursor: pointer;
}

.toggle-all-button.mixed:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(136, 136, 136, 0.3);
}

/* Responsive design for layer controls */
@media (max-width: 768px) {
    .layer-controls {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 10px;
        justify-content: space-between;
    }
    
    .layer-controls ul {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .layer-controls label {
        font-size: 12px;
        gap: 4px;
    }
    
    .layer-controls input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }
    
    /* Stack vertically on mobile */
    .vertical-divider {
        display: none;
    }
    
    .toggle-all-section {
        order: -1;
        width: 100%;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .toggle-all-button {
        width: 100%;
        max-width: 200px;
        padding: 10px 20px;
        font-size: 12px;
    }
}

.sketchfab-embed-wrapper {
    order: 2;
    flex: none;
    min-width: 700px;
    max-width: 2500px;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    background: #222;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px #0002;
    border: 2px solid #fff !important;
}

.sketchfab-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none; /* Initially disable interaction */
    transition: pointer-events 0.3s ease;
}

.sketchfab-embed-wrapper.active iframe {
    pointer-events: auto; /* Enable interaction when activated */
}

/* Model activation overlay */
.model-activation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.model-activation-overlay.hidden {
    opacity: 0;
    /* pointer-events: none;  <-- allow pointer events so tap always works on mobile */
}

.activation-message {
    display: none; /* Hide the message completely */
}

@media (max-width: 600px) {
    .hide-video-btn,
    .show-video-btn {
        display: none !important;
    }
    .sketchfab-embed-wrapper {
        width: 90vw !important;
        min-width: 0 !important;
        max-width: 90vw !important;
        height: 126vw !important;
        aspect-ratio: unset !important;
        border-radius: 8px;
        padding-bottom: 0 !important;
        position: relative;
        border: 2px solid #fff !important;
    }
    .sketchfab-embed-wrapper iframe {
        width: 90vw !important;
        height: 126vw !important;
        min-height: 0 !important;
        max-height: none !important;
        position: absolute;
        top: 0;
        left: 0;
    }
    .model-activation-overlay,
    .model-activation-overlay.hidden {
        pointer-events: auto !important;
    }
}

/* Media query for screens between 900px and 2000px to improve UI responsiveness */
@media (min-width: 900px) and (max-width: 2000px) {
    .layer-controls {
        flex-direction: column;
        flex-wrap: wrap;
        max-width: 95vw;
        padding: 16px 28px;
        justify-content: center;
        gap: 12px;
    }
    
    /* Put toggle all button at the top */
    .toggle-all-section {
        order: -1;
        margin: 0 0 8px 0;
        align-self: center;
    }
    
    /* Main controls row with checkboxes and divider */
    .layer-controls > *:not(.toggle-all-section) {
        order: 1;
    }
    
    .layer-controls ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
        max-width: 100%;
    }
    
    .layer-controls li {
        flex: 0 0 auto;
    }
    
    .layer-controls label {
        font-size: 13px;
        white-space: nowrap;
    }
    
    .vertical-divider {
        display: none; /* Hide divider when stacked vertically */
    }
    
    /* Ensure the 3D model wrapper is properly sized */
    .sketchfab-embed-wrapper {
        max-width: 95vw;
        width: 100%;
    }
}

@media (max-width: 900px) {
    .model-section {
        flex-direction: column;
        align-items: stretch;
    }
    .sketchfab-embed-wrapper, .layer-controls {
        max-width: 100%;
        width: 100%;
    }
    header {
        height: 180px;
    }
}
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    color: #e0e0e0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    align-items: center;
    overflow-x: hidden;
}

/* Video Header Hero Section */
.video-header {
    position: relative;
    width: 100%;
    height: 30vh; /* 30% of viewport height for smaller screens */
    overflow: hidden;
    background: #000;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Desktop video - show by default, hide on mobile */
.hero-video-desktop {
    display: block;
}

/* Mobile video - hide by default, show on mobile */
.hero-video-mobile {
    display: none;
}

/* Title Section */
.title-section {
    background: #0a0a0a;
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid #333;
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.title-section p {
    font-size: 1.2rem;
    color: #e0e0e0;
}

/* Controls Section */
.controls-section-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.controls-panel {
    border: 2px solid #ffffff;
    border-radius: 8px;
}

.controls-panel {
    position: static !important;
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 15px 20px !important;
    z-index: 1001 !important;
    width: auto;
    height: auto;
    overflow: visible;
    margin: 0;
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
    min-width: 300px !important;
}

.main-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 2000px;
    margin: 0 auto;
    padding: 0 20px;
    flex-shrink: 0;
}

.model-container {
    background: #111;
    border: 2px solid #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 20px 0;
    max-width: 100%;
}

#sketchfab-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none; /* Disable interaction until clicked */
}

#sketchfab-viewer.loaded {
    opacity: 1;
}

/* Loading and UI Elements */
.model-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.model-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #333;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Controls Layout */
.controls-headers {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 0;
    padding: 0;
}

.section-header {
    color: white;
    font-size: 13px;
    font-weight: normal;
    margin: 0;
    white-space: nowrap;
}

.section-header:first-child {
    flex: 1;
}

.section-header:last-child {
    flex: 0 0 auto;
    text-align: left;
    margin-left: auto;
    padding-left: 8px;
}

.controls-separator {
    width: 100%;
    height: 1px;
    background: white;
    margin: 2px 0;
}

.vertical-separator {
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 8px;
    align-self: stretch;
    min-height: 20px;
}

.controls-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Collection Controls */
.collections-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    max-width: none;
    width: auto;
    flex-wrap: nowrap;
    overflow-x: visible;
}

.collection-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    color: #ffffff;
    white-space: nowrap;
}

.collection-item:hover {
    opacity: 0.8;
}

.collection-item.visible {
    color: #ffffff;
}

.collection-item.hidden {
    color: #888;
    opacity: 0.6;
}

.collection-name {
    color: white;
    font-size: 13px;
    font-weight: normal;
    margin: 0;
    white-space: nowrap;
}

.collection-toggle {
    display: flex;
    align-items: center;
    margin: 0;
}

.collection-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 14px;
    height: 14px;
    margin: 0;
    margin-right: 4px;
    cursor: pointer;
    border: 1px solid white;
    background: transparent;
    border-radius: 2px;
    position: relative;
}

.collection-toggle input[type="checkbox"]:checked {
    background: transparent;
}

.collection-toggle input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Global Controls */
.global-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.global-controls .btn {
    margin: 0;
}

.btn {
    padding: 0;
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    text-decoration: underline;
    margin: 0;
    transition: opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.7;
}

/* Button States */
.btn.btn-all-on {
    color: #28a745 !important;
    background: transparent !important;
}

.btn.btn-all-on:hover {
    color: #218838 !important;
    background: rgba(40, 167, 69, 0.1) !important;
}

.btn.btn-all-off {
    color: #dc3545 !important;
    background: transparent !important;
}

.btn.btn-all-off:hover {
    color: #c82333 !important;
    background: rgba(220, 53, 69, 0.1) !important;
}

.btn.btn-mixed {
    color: #6c757d !important;
    background: transparent !important;
}

.btn.btn-mixed:hover {
    color: #5a6268 !important;
    background: rgba(108, 117, 125, 0.1) !important;
}

/* Responsive Design */
@media (max-width: 2040px) {
    .main-content {
        padding: 0 20px;
    }
}

@media (max-width: 1024px) {
    .video-header {
        height: 396px; /* Doubled from 198px */
    }
    
    .title-section {
        padding: 20px 15px;
    }
    
    .title-section h1 {
        font-size: 2rem;
    }
    
    .title-section p {
        font-size: 1rem;
    }
    
    .controls-section-wrapper {
        padding: 12px 15px;
    }
    
    .main-content {
        flex-direction: column;
        padding: 0 15px;
    }
    
    .model-container {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 56.25%;
        margin: 10px 0;
        max-width: 90vw;
    }
}

@media (max-width: 768px) {
    .video-header {
        height: 316px; /* Doubled from 158px */
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        transition: height 0.6s ease-in-out;
    }
    
    .video-header.video-hidden {
        height: 0;
    }
    
    /* Adjust button positioning for mobile */
    .hide-video-btn {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .show-video-btn {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    /* Hide desktop video on mobile */
    .hero-video-desktop {
        display: none;
    }
    
    /* Show mobile video on mobile */
    .hero-video-mobile {
        display: block;
    }
    
    .title-section {
        padding: 15px 10px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .title-section h1 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .title-section p {
        font-size: 0.9rem;
    }
    
    .controls-section-wrapper {
        padding: 10px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .main-content {
        padding: 0 10px; /* Reduce padding to prevent overflow */
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .model-container {
        position: relative;
        width: 100%;
        max-width: calc(100vw - 20px); /* Ensure it fits within viewport */
        height: 0;
        padding-bottom: 112.5%; /* 100% taller than standard 56.25% */
        margin: 10px 0;
        box-sizing: border-box;
    }
    
    /* Make the iframe fill the entire taller container on mobile */
    #sketchfab-viewer {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: 100% !important; /* Fill the entire container */
    }
    
    /* Also adjust the loading overlay to fill the entire container */
    .model-loading-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Mobile-optimized controls panel */
    .controls-panel {
        min-width: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
        margin: 0 !important;
    }
    
    /* Stack the headers vertically on mobile - HIDDEN */
    .controls-headers {
        display: none !important;
    }
    
    .section-header {
        display: none !important;
    }
    
    .section-header:first-child {
        display: none !important;
    }
    
    .section-header:last-child {
        display: none !important;
    }
    
    /* Remove separator to save space on mobile */
    .controls-separator {
        display: none !important;
    }
    
    /* Stack controls vertically with reduced gap */
    .controls-row {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
    }
    
    /* Remove vertical separator */
    .vertical-separator {
        display: none !important;
    }
    
    /* Compact mobile grid layout */
    .collections-list {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 350px !important;
        justify-items: center !important;
    }
    
    .collection-item {
        width: 100% !important;
        justify-content: center !important;
        padding: 6px 4px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border-radius: 3px !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        min-height: 28px !important;
        display: flex !important;
        align-items: center !important;
        flex-direction: column !important;
        gap: 12px !important; /* Increased gap significantly between checkbox and text */
    }
    
    .collection-name {
        font-size: 9px !important;
        text-align: center !important;
        line-height: 1.1 !important;
        font-weight: 500 !important;
    }
    
    .collection-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .collection-toggle input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
        margin: 0 !important;
    }
    
    /* Global controls styling for mobile */
    .global-controls {
        width: 100% !important;
        max-width: 180px !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .btn {
        width: 100% !important;
        padding: 10px !important;
        font-size: 13px !important;
        border-radius: 5px !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: white !important;
    }
    
    .btn:hover {
        background: rgba(255, 255, 255, 0.25) !important;
    }
}

/* Extra small mobile devices (480px and below) */
@media (max-width: 480px) {
    .video-header {
        height: 250px;
    }
    
    /* Ensure mobile video is shown on extra small devices too */
    .hero-video-desktop {
        display: none;
    }
    
    .hero-video-mobile {
        display: block;
    }
    
    .title-section {
        padding: 10px;
    }
    
    .title-section h1 {
        font-size: 1.3rem;
    }
    
    .controls-section-wrapper {
        padding: 5px;
    }
    
    .controls-panel {
        padding: 10px !important;
        margin: 0 !important;
        min-width: auto !important;
    }
    
    .section-header {
        font-size: 11px !important;
    }
    
    /* Compact layout for very small screens */
    .collections-list {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 280px !important;
        gap: 5px !important;
    }
    
    .collection-item {
        padding: 5px 3px !important;
        min-height: 26px !important;
        gap: 10px !important; /* Increased gap significantly for extra small devices */
    }
    
    .collection-name {
        font-size: 8px !important;
        line-height: 1 !important;
    }
    
    .collection-toggle input[type="checkbox"] {
        width: 12px !important;
        height: 12px !important;
    }
    
    .btn {
        padding: 10px !important;
        font-size: 12px !important;
    }
    
    .global-controls {
        max-width: 150px !important;
    }
    .collection-name {
        font-size: 11px;
    }
    
    .global-controls {
        gap: 8px;
    }
    
    .btn {
        font-size: 11px;
    }
    
    .collection-toggle input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        width: 12px;
        height: 12px;
        margin: 0;
        margin-right: 3px;
        cursor: pointer;
        border: 1px solid white;
        background: transparent;
        border-radius: 2px;
        position: relative;
    }

    .collection-toggle input[type="checkbox"]:checked {
        background: transparent;
    }

    .collection-toggle input[type="checkbox"]:checked::after {
        content: '✓';
        position: absolute;
        top: -1px;
        left: 1px;
        color: white;
        font-size: 10px;
        font-weight: bold;
        line-height: 1;
    }
}

/* Custom scrollbar for dark theme */
.controls-panel::-webkit-scrollbar,
.collections-list::-webkit-scrollbar {
    width: 6px;
}

.controls-panel::-webkit-scrollbar-track,
.collections-list::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb,
.collections-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb:hover,
.collections-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* AB Slider Section */
.ab-slider-section {
    background: #0a0a0a;
    padding: 30px 20px;
    border-top: 1px solid #333;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.ab-slider-title {
    text-align: center;
    margin-bottom: 30px;
}

.ab-slider-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.ab-slider-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    padding: 0; /* Remove any inherited padding */
}

.ab-slider-wrapper {
    position: relative;
    width: 100%;
    height: auto; /* Allow height to be determined by content */
    max-width: 2000px;
    min-width: 600px;
    border: 2px solid #ffffff;
    border-radius: 8px;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #383838 0%, #383838 40%, #000000 100%);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
    z-index: 0; /* Establish stacking context */
    display: flex;
    align-items: center;
    justify-content: center;
}

.ab-image-container {
    position: relative; /* Keep relative for content-based sizing */
    width: 100%;
    height: auto; /* Allow height to be determined by content */
    background: transparent; /* Let the wrapper gradient show through */
    z-index: 1; /* Ensure it's above the wrapper background */
}

/* Create a sizing reference that determines container height */
.ab-image-container::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9; /* Use aspect-ratio for consistent sizing */
}

.ab-image {
    position: absolute; /* Both images should be absolutely positioned */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    user-select: none;
    pointer-events: none;
}

/* Make the "before" image show left portion (default 50%) */
.ab-image-before {
    z-index: 2;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%); /* Show left portion */
}

/* Make the "after" image show right portion (default 50%) */
.ab-image-after {
    z-index: 1;
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%); /* Show right portion */
}

/* Date label styling - should follow same clipping as images */
.ab-date-before {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 4; /* Above main images */
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%); /* Show left portion */
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.ab-date-after {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 3; /* Above main images but below left date */
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%); /* Show right portion */
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.ab-slider-divider {
    position: absolute;
    top: 0;
    left: 50%; /* Default center position */
    width: 30px;
    height: 100%;
    background: url('https://a3edrone.com/web-contents/site-details/ab-handle-II.svg') no-repeat center center, transparent !important;
    background-size: auto 30px;
    cursor: ew-resize;
    z-index: 5; /* Above all other elements */
    transform: translateX(-50%);
    transition: opacity 0.2s;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    pointer-events: auto; /* Ensure it can be interacted with */
}

.ab-slider-divider:hover {
    filter: invert(1); /* Invert colors on hover - white becomes black, black becomes white */
    background-color: transparent !important;
}

.ab-slider-divider:focus,
.ab-slider-divider:active,
.ab-slider-divider:focus-visible,
.ab-slider-divider:focus-within {
    outline: none !important; /* Remove focus outline */
    border: none !important; /* Remove focus border */
    box-shadow: none !important; /* Remove any box shadow */
    background-color: transparent !important;
    background: url('https://a3edrone.com/web-contents/site-details/ab-handle.svg') no-repeat center center, transparent !important;
}

.ab-slider-divider::-moz-focus-inner {
    border: 0 !important; /* Remove Firefox focus border */
}

.ab-slider-handle {
    display: none; /* Hide the separate handle since the divider is now the full slider */
}

.ab-slider-handle::before {
    content: ''; /* Remove text content since we're using image */
    color: #000;
    font-size: 16px; /* Increased font size */
    font-weight: bold;
    letter-spacing: -2px; /* Tighter spacing between arrows */
}

.ab-slider-handle:hover {
    opacity: 0.8; /* Slight transparency on hover */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6); /* Enhanced shadow on hover */
    transform: translate(-50%, -50%);
}

/* Responsive styles for AB Slider */
@media (min-width: 2048px) {
    .ab-slider-wrapper {
        width: 85vw;
        max-width: 1800px;
        min-width: 800px;
    }
}

@media (max-width: 2048px) and (min-width: 1200px) {
    .ab-slider-wrapper {
        width: 90vw;
        min-width: 800px;
    }
}

@media (max-width: 1199px) and (min-width: 1024px) {
    .ab-slider-section {
        padding: 25px 15px;
    }
    
    .ab-slider-title h2 {
        font-size: 1.8rem;
    }
    
    .ab-slider-wrapper {
        width: 92vw;
        min-width: 800px;
    }
}

@media (max-width: 1023px) and (min-width: 768px) {
    .ab-slider-section {
        padding: 25px 15px;
    }
    
    .ab-slider-title h2 {
        font-size: 1.8rem;
    }
    
    .ab-slider-wrapper {
        width: 95vw;
        min-width: 600px;
    }
}

@media (max-width: 767px) {
    .ab-slider-section {
        padding: 20px 10px; /* Reduce side padding to prevent overflow */
    }
    
    .ab-slider-title h2 {
        font-size: 1.5rem;
    }
    
    .ab-slider-wrapper {
        width: calc(100vw - 20px); /* Account for section padding */
        max-width: calc(100vw - 20px);
        min-width: 280px; /* Smaller minimum for mobile */
        height: 0;
        padding-bottom: 56.25% !important; /* Keep 16:9 aspect ratio only for mobile */
    }
    
    /* Restore absolute positioning for mobile since it works well there */
    .ab-image-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .ab-image {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
    }
    
    .ab-slider-handle {
        width: 24px;
        height: 24px;
    }
    
    .ab-slider-divider {
        width: 6px;
    }
}

/* Responsive Footer for Small Screens */
@media (max-width: 480px) {
    .responsive-footer {
        padding: 10px 5px !important;
    }
    
    .footer-content-responsive {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: center !important;
    }
    
    .footer-icon-michigan,
    .footer-icon-drone {
        height: 40px !important;
    }
    
    .footer-icon-logo {
        height: 24px !important;
    }
    
    .footer-text-phone,
    .footer-text-email {
        font-size: 14px !important;
        line-height: 20px !important;
    }
}

/* Additional Footer Styles (Alternative/Backup) */
.footer {
  background-color: #3c4156;
  padding: 15px 0;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
}

.footer-icon {
  height: 28px !important;
  width: auto !important;
  max-height: 28px !important;
  filter: brightness(0) invert(1) !important;
  vertical-align: middle;
}

.footer-text {
  color: white !important;
  font-size: 16px;
  text-decoration: none;
  vertical-align: middle;
  line-height: 28px;
}

.footer-text:hover {
  text-decoration: underline;
}

/* Footer Section */
.footer {
    width: 100%;
    background: 
        radial-gradient(ellipse at center, rgba(56, 56, 56, 0.5) 0%, rgba(0, 0, 0, 0.5) 100%),
        #0a0a0a;
    padding: 30px 0;
    border-top: 1px solid #333;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-item a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-item a:hover {
    color: #ffffff;
}

.footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Footer responsive design */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-logo {
        height: 35px;
    }
    
    .footer-item a {
        font-size: 0.9rem;
    }
}

/* 4K and large monitor adjustments */
@media (min-width: 768px) {
    .video-header {
        height: 40vh; /* 40% of viewport height for larger screens */
    }
}

@media (min-width: 1920px) {
    .video-header {
        height: 35vh; /* Slightly reduced for very large 4K monitors */
    }
}

/* Embed Code Section */
.embed-section {
    width: 100%;
    max-width: 100vw;
    background: #0a0a0a;
    padding: 40px 0;
    border-top: 1px solid #333;
    margin-top: 40px;
    overflow-x: hidden;
}

.embed-section-title {
    text-align: center;
    margin-bottom: 30px;
}

.embed-section-title h2 {
    font-size: 2rem;
    color: #e0e0e0;
    margin: 0;
}

.embed-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.embed-box {
    background: #111;
    border: 2px solid #ffffff;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.embed-box h3 {
    color: #e0e0e0;
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    text-align: center;
}

.embed-code {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #c9c9c9;
    white-space: pre;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 300px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.embed-code.highlight {
    background: #222;
    color: #fff;
    border: 2px solid #00ff00;
    box-shadow: 0 0 8px #00ff00;
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
}

.copy-btn {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    min-width: 150px;
}

.copy-btn:hover {
    background: #444;
    border-color: #666;
    color: #ffffff;
}

.copy-btn:active {
    background: #555;
    transform: translateY(1px);
}

/* Responsive design for embed section */
@media (max-width: 768px) {
    .embed-section {
        padding: 20px 10px; /* Reduce side padding to prevent overflow */
        width: 100%;
        max-width: 100vw;
        margin: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .embed-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0;
        max-width: calc(100vw - 20px); /* Account for section padding */
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    
    .embed-box {
        padding: 12px;
        margin: 0;
        width: 100%;
        max-width: calc(100vw - 30px); /* Account for section padding and borders */
        box-sizing: border-box;
        border-width: 1px;
    }
    
    .embed-box h3 {
        font-size: 1rem; /* Smaller heading */
        margin-bottom: 8px; /* Reduce margin */
    }
    
    .embed-code {
        font-size: 0.55rem;
        max-height: 160px;
        padding: 8px;
        margin-bottom: 12px;
        line-height: 1.2;
        overflow-x: auto;
        word-break: break-all;
        width: 100%;
        box-sizing: border-box;
        white-space: pre-wrap; /* Allow text wrapping */
    }
    
    .copy-btn {
        padding: 6px 12px; /* Smaller button padding */
        font-size: 0.8rem; /* Smaller button text */
        min-width: 100px; /* Smaller minimum width */
        max-width: 140px; /* Maximum width to prevent overflow */
    }
    
    .embed-section-title h2 {
        font-size: 1.2rem; /* Smaller section title */
        margin-bottom: 15px; /* Reduce margin */
        padding: 0 5px; /* Small side padding for title */
    }
}

/* Extra small mobile devices - even more compact */
@media (max-width: 480px) {
    .embed-section {
        padding: 15px 8px; /* Minimal side padding for extra small devices */
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .embed-container {
        gap: 8px;
        padding: 0;
        max-width: calc(100vw - 16px); /* Account for section padding */
    }
    
    .embed-box {
        padding: 10px;
        max-width: calc(100vw - 24px); /* Account for section padding and borders */
        border-width: 1px;
    }
    
    .embed-box h3 {
        font-size: 0.9rem; /* Even smaller heading */
        margin-bottom: 6px; /* Less margin */
    }
    
    .embed-code {
        font-size: 0.5rem; /* Extra small text */
        max-height: 140px; /* Smaller max height */
        padding: 6px; /* Minimal padding */
        margin-bottom: 10px; /* Less margin */
    }
    
    .copy-btn {
        padding: 5px 10px; /* Extra small button */
        font-size: 0.75rem; /* Extra small button text */
        min-width: 80px; /* Smaller minimum width */
        max-width: 120px; /* Smaller maximum width */
    }
    
    .embed-section-title h2 {
        font-size: 1rem; /* Extra small section title */
        margin-bottom: 12px; /* Less margin */
    }
}

@media (min-width: 901px) {
  .embed-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: none;
  }
  .embed-box {
    width: 1000px;
    max-width: 98vw;
    min-width: 400px;
    margin: 0 auto;
    border-radius: 12px;
    padding: 24px 32px;
    box-sizing: border-box;
  }
  .embed-box .embed-code {
    font-size: 1.1rem;
    white-space: pre;
    overflow-x: auto;
    padding: 10px 18px;
  }
  .embed-box:first-child .embed-code {
    min-height: 32px;
    max-height: 32px;
    height: 32px;
    overflow-y: hidden;
  }
  .embed-box:nth-child(2) .embed-code {
    min-height: 60px;
    max-height: 60px;
    height: 60px;
    font-size: 1rem;
    overflow-y: auto;
    line-height: 1.2;
  }
}
