/* * {
  margin: 0;
  padding: 0;
  
}
 */

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #f0f0f0;
    margin: 0;
    background-color: #000;
    overflow: hidden;
    font-weight: 300;
    /* Light weight by default for that clean Swiss look */
}

/* Global Link Styles */
a {
    color: #00becd;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #11e0ef;
    text-decoration: underline;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    /* Solid black background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    font-family: sans-serif;
}

.progress-container {
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    align-items: center;
    gap: 10px;
    /* Adjust gap */
    width: 30%;
    max-width: 600px;
    /* Increased max-width to accommodate title */
}

.loading-title {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    /* Thin font */
    color: white;
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.progress-bar {
    width: 100%;
    /* Full width of container */
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

#loading-message {
    font-size: 1em;
    font-family: sans-serif;
    color: white;
    font-weight: 300;
    /* Thin font */
    min-width: 40px;
    text-align: right;
}



/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 85px;
    /* Moved down below navbar */
    left: 10px;
    z-index: 1000;
    background-color: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(70, 70, 70, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    box-shadow: none;
    /* Flatter Swiss style */
}

.sidebar-toggle:hover {
    background-color: rgba(66, 133, 244, 0.8);
    border-color: rgba(66, 133, 244, 1);
    transform: scale(1.05);
}

.sidebar-toggle svg {
    transition: transform 0.3s ease;
}

.sidebar-hidden .sidebar-toggle {
    left: 10px;
}

/* Preview Toggle Button */
/* Preview Toggle Button Updated for Navbar */
.preview-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #00becd;
    /* Cyan default to match links */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, opacity 0.2s ease;
    width: auto;
    height: auto;
    box-shadow: none;
}

/* Glow effect for active preview */
.preview-toggle.glow {
    color: #ffffff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    }

    50% {
        /* Stacked drop-shadows for higher intensity */
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 1)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
    }

    100% {
        filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
    }
}

.preview-toggle:hover {
    background: none;
    color: #ffffff;
    /* White on hover like links */
    transform: none;
    /* Remove scale for cleaner feel */
}

.separator {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 10px;
    font-size: 1.2rem;
    font-weight: 200;
}

.preview-toggle svg {
    transition: none;
    /* Remove internal transition to rely on parent color */
    fill: currentColor;
    /* Ensure SVG uses text color */
}

/* Preview disabled state - when preview is hidden */
.preview-toggle.preview-disabled {
    background: none;
    color: rgba(255, 255, 255, 0.4);
    /* Dimmed state */
}

.preview-toggle.preview-disabled:hover {
    background: none;
    color: rgba(255, 255, 255, 0.6);
}

/* Slider container removed */

/* Footer removed and merged into header */
/* .footer {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.0rem;
}

.footer a {
    color: #00becd;
}

.footer a:hover {
    color: #11e0ef;
} */

/* Close button for center image */
.close-center-image-button {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%);
}

.close-center-image-button:hover {
    background: rgba(255, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
}

.close-center-image-button:active {
    transform: translate(-50%, -50%) scale(0.9);
}

.close-center-image-button.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.close-center-image-button svg {
    width: 20px;
    height: 20px;
}

/* Camera Debug Window */
.camera-debug-window {
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: 300px;
    background-color: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px 8px 0 0;
}

.debug-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #00becd;
}

.debug-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.debug-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.debug-content {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.debug-content.collapsed {
    display: none;
}

.debug-section {
    margin-bottom: 12px;
}

.debug-section:last-child {
    margin-bottom: 0;
}

.debug-section h4 {
    margin: 0 0 6px 0;
    font-size: 11px;
    font-weight: bold;
    color: #00becd;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.debug-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.debug-row:last-child {
    border-bottom: none;
}

.debug-row span:first-child {
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
}

.debug-row span:last-child {
    color: white;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.debug-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.debug-control input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
}

.debug-control input[type="range"]:hover {
    background: rgba(255, 255, 255, 0.3);
}

.debug-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00becd;
    cursor: pointer;
    transition: background 0.2s;
}

.debug-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #11e0ef;
    transform: scale(1.1);
}

.debug-control input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00becd;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.debug-control input[type="range"]::-moz-range-thumb:hover {
    background: #11e0ef;
    transform: scale(1.1);
}

.debug-control span {
    min-width: 50px;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #00becd;
    font-weight: bold;
}

.range-controls {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.range-input {
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    color: white;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    text-align: center;
    padding: 2px;
}

.range-input:focus {
    outline: none;
    border-color: #00becd;
    background: rgba(255, 255, 255, 0.15);
}

.range-input::-webkit-outer-spin-button,
.range-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ratio-input {
    width: 60px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    color: white;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    text-align: center;
    padding: 2px;
}

.ratio-input:focus {
    outline: none;
    border-color: #00becd;
    background: rgba(255, 255, 255, 0.15);
}

.range-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Scrollbar styling for debug content */
.debug-content::-webkit-scrollbar {
    width: 6px;
}

.debug-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.debug-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

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

/* Canvas interaction styles */
canvas {
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

canvas:hover {
    cursor: grab;
}

canvas:active {
    cursor: grabbing;
}


.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Swiss Design: minimal, functional, structural */
    /* Match carousel style: dark strip with blur */
    background-color: rgba(0, 0, 0, 0.6);
    /* More padding on bottom to push content up relative to the visual fading edge */
    padding: 12px 40px 20px 40px;
    /* More horizontal padding */
    justify-content: space-between;
    /* Space between title and links */
    /* Center content */
    box-sizing: border-box;
    z-index: 900;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
    /* Removed for cleaner strip look */
    display: flex;
    align-items: center;
    backdrop-filter: blur(5px);

    /* Fade out the bottom edge */
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);

    /* Disable text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    /* Increased size for readability */
    color: rgba(255, 255, 255, 0.7);
    align-items: center;
    letter-spacing: 0.02em;
    /* Airy spacing for light text */
}

.nav-links a {
    color: #00becd;
    text-decoration: none;
    font-weight: 300;
    /* Light weight */
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #ffffff;
    text-decoration: none;
}

.navbar h1 {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1.25rem;
    /* Increased size */
    font-weight: 500;
    /* Medium weight as requested */
    /* Regular weight, not bold */
    color: #ffffff;
    letter-spacing: -0.04em;
    /* Tight tracking for graphic look */
    text-transform: none;
    /* User requested specific casing */
    text-align: center;
}

.connection-warning {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    font-weight: 300;
}

/* Mode Selector Styles (Swiss Design) */
/* Carousel Mode Selector Styles */
.carousel-container {
    position: fixed;
    bottom: 80px;
    /* Above the footer */
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    /* Wide enough for 3 items */
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;

    /* Dark background strip for visibility */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 30px;
    /* Rounded ends for the strip */

    /* Gradient mask for seamless blending at edges (Horizontal + Vertical) */
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-composite: intersect;
    pointer-events: auto;
}

.carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 30px;
    /* Pill shape */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 300;
    letter-spacing: 0.05em;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Center Item (Active) */
.carousel-item.center {
    left: 50%;
    transform: translateX(-50%) scale(1.2);
    opacity: 1;
    z-index: 2;
    color: white;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Left Item */
.carousel-item.left {
    left: 15%;
    /* Positioned to the left */
    transform: translateX(-50%) scale(0.9);
    opacity: 0.5;
    z-index: 1;
    color: rgba(255, 255, 255, 0.7);
}

.carousel-item.left:hover {
    opacity: 0.8;
    color: white;
}

/* Right Item */
.carousel-item.right {
    left: 85%;
    /* Positioned to the right */
    transform: translateX(-50%) scale(0.9);
    opacity: 0.5;
    z-index: 1;
    color: rgba(255, 255, 255, 0.7);
}

.carousel-item.right:hover {
    opacity: 0.8;
    color: white;
}

/* Hidden items (for swapping) */
.carousel-item.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scale(0.5);
}

/* Info Modal Styles (Swiss Design - Horizontal Carousel) */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.info-modal.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.info-modal-content {
    background-color: rgba(15, 15, 15, 0.98);
    width: 90%;
    height: 90%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.info-modal.hidden .info-modal-content {
    transform: scale(0.95);
}

.close-modal-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-button:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Navigation Arrows */
.guide-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.guide-nav-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.guide-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.guide-nav-prev {
    left: 20px;
}

.guide-nav-next {
    right: 20px;
}

/* Carousel Wrapper */
.guide-carousel-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.guide-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    height: 100%;
    width: 100%;
}

/* Individual Slides */
.guide-slide {
    width: 100%;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 100px;
    box-sizing: border-box;
    text-align: center;
}

.guide-slide h2 {
    margin: 0 0 20px 0;
    font-size: 2.2rem;
    font-weight: 500;
    color: white;
    letter-spacing: -0.02em;
}

.guide-slide h3 {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 500;
    color: #00becd;
}

.guide-slide p {
    margin: 0 0 20px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
}

.guide-slide .guide-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    font-style: italic;
}

.guide-slide img {
    max-width: 100%;
    max-height: 60%;
    /* object-fit: contain; */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Slide Indicators (Dots) */
.guide-indicators {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.guide-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.guide-indicator-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.guide-indicator-dot.active {
    background: #00becd;
    transform: scale(1.2);
}