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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    overflow: hidden;
    cursor: grab;
}

body:active {
    cursor: grabbing;
}

#container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Loading screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
    body {
        cursor: default;
    }
}

@media (max-width: 480px) {
    .loading-spinner {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }
}

/* Navigation steps */
.nav-steps {
    position: fixed;
    bottom: 3.125%;
    left: 3.125%;
    display: flex;
    gap: 2rem;
    z-index: 1000;
    pointer-events: none;
}

.nav-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.15s ease;
}

.step-circle {
    width: 120px;
    height: 120px;
    background: #c7c7c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.15s ease;
    border: 3px solid transparent;
}

.nav-step.active .step-circle {
    background: #ffffff;
    border: 3px solid #F3E831;
}

.nav-step:hover .step-circle {
    transform: scale(1.05);
}

.step-number {
    font-size: 48px;
    font-weight: 600;
    color: #333;
    user-select: none;
}

.nav-step.active .step-number {
    color: #F3E831;
}

.step-label {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    text-align: center;
    white-space: nowrap;
    user-select: none;
}

.nav-step.active .step-label {
    color: #F3E831;
    font-weight: 500;
}

@media (max-width: 768px) {
    .nav-steps {
        bottom: 20px;
        left: 20px;
        gap: 1.5rem;
    }
    
    .step-circle {
        width: 100px;
        height: 100px;
    }
    
    .step-number {
        font-size: 40px;
    }
    
    .step-label {
        font-size: 12px;
    }
}

/* Top logo - only visible when slider is open */
.top-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.top-logo.visible {
    opacity: 1;
}

.top-logo img {
    height: 40px;
    width: auto;
}

@media (max-width: 768px) {
    .top-logo {
        top: 15px;
        left: 15px;
    }
    
    .top-logo img {
        height: 30px;
    }
}

/* Step slider interface */
.step-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Canvas areas with different backgrounds */
.step-slider::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: var(--slider-left, 75vw);
	height: 100%;
	background: var(--left-canvas-bg, #ffffff); /* Step 1 canvas - white by default */
	z-index: -1;
	transition: background 0.6s ease-out;
}

.step-slider::after {
	content: '';
	position: absolute;
	top: 0;
	left: var(--slider-left, 75vw);
	width: calc(100% - var(--slider-left, 75vw));
	height: 100%;
	background: var(--right-canvas-bg, #000000); /* Step 2 canvas - black by default */
	z-index: -1;
	transition: background 0.6s ease-out;
}

/* Next step badge (white circle outline with white number) */
.next-step-badge {
	position: absolute;
	left: var(--slider-left, 75vw); /* Position it on the left side of the 2nd canvas */
	top: 114px; /* Same level as the "1" circle (70px + 16px + 10px + 18px) */
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: transparent;
	border: 2px solid #fff;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 18px;
	z-index: 15;
	margin-left: 24px; /* space after the slider */
}

.next-step-badge.hidden { display: none; }

/* Progress line that slides left to right */
.progress-line {
	position: absolute;
	left: var(--slider-left, 75vw);
	top: 0;
	width: 4px;
	height: 100vh;
	background: #F3E831;
	transition: left 0.6s ease-out;
	z-index: 10;
}

/* Progress circle that moves along the line */
.progress-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #ffffff; /* white background */
    border: 2px solid #000; /* black border */
    border-radius: 50%;
    top: 50%;
    left: -30px; /* Center on the line */
    transform: translateY(-50%);
    transition: all 0.6s ease-out;
    z-index: 11;
    cursor: grab;
}

.progress-circle:active {
    cursor: grabbing;
}

/* Arrow indicator pointing towards step 2 (right side) */
.progress-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 28px; /* arrow shaft length */
    height: 4px;  /* arrow shaft thickness */
    background: #000; /* black shaft */
    border-radius: 2px;
    pointer-events: none;
}

.progress-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 62%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid #000; /* black head */
    pointer-events: none;
}

/* Hidden manual slider for dragging functionality */
.manual-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 12;
    pointer-events: none;
}

.slider-input {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 60px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transform: translateY(-50%);
    pointer-events: all;
    cursor: grab;
}

.slider-input:active {
    cursor: grabbing;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    cursor: grab;
}

.slider-input::-moz-range-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    cursor: grab;
    border: none;
}

/* Hide the labels */
.slider-labels {
    display: none;
}

/* Step title in bottom left */
.step-title-bottom {
    position: absolute;
    bottom: 40px;
    left: 40px;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    z-index: 5;
}

@media (max-width: 768px) {
    .step-title-bottom {
        bottom: 30px;
        left: 30px;
        font-size: 16px;
    }
}

.step-slider.hidden {
    opacity: 0;
    pointer-events: none;
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.step-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 100%;
    transition: transform 0.5s ease-in-out;
    padding: 40px;
    box-sizing: border-box;
    transform: translateX(0);
}

.step-slide.active {
    left: 0;
    transform: translateX(0);
}

.step-slide.prev {
    left: 0;
    transform: translateX(-100%);
}

.step-slide.next {
    left: 0;
    transform: translateX(100%);
}

/* Step header with navigation */
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    overflow: hidden;
}

.step-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-circle.current {
    background: #ffffff;
    border: 2px solid #333;
}

.step-circle.current img {
    filter: brightness(0) invert(1); /* Make image white for current step */
}

.step-circle.next {
    background: #000000;
    border: 2px solid #000000;
}

.step-circle.next img {
    filter: brightness(0); /* Make image black for next step */
}

.step-title {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.next-step-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
}

.arrow-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.arrow-button:hover {
    background: #f0f0f0;
}

/* Upload area */
.upload-area {
    position: fixed;
    top: 114px; /* Align with the top of the "1" circle */
    left: calc(var(--slider-left, 75vw) / 2);
    transform: translateX(-50%);
    z-index: 5;
}

.upload-box {
    width: 520px;
    height: 520px;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* L-shaped corner brackets */
.upload-box::before,
.upload-box::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    pointer-events: none;
}

/* Top-left corner */
.upload-box::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

/* Bottom-right corner */
.upload-box::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Top-right corner */
.upload-box .corner-tr {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-left: none;
    border-bottom: none;
    pointer-events: none;
}

/* Bottom-left corner */
.upload-box .corner-bl {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #000;
    border-right: none;
    border-top: none;
    pointer-events: none;
}

.upload-box.has-image {
    padding: 0;
}

.upload-box.has-image .upload-icon,
.upload-box.has-image .upload-text {
    display: none;
}

.upload-box img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* fit to square without cropping */
    display: none;
}

.upload-box.has-image img {
    display: block;
}

.upload-box:hover {
    background: #f5f5f5;
    border-color: #000;
}

.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.plus-icon {
    background: #000;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.upload-text {
    text-align: center;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Bottom image thumbnails */
.bottom-images {
    position: fixed;
    top: calc(50% + 220px); /* below the upload box */
    left: calc(var(--slider-left, 75vw) / 2);
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 5;
}

.image-thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.image-thumbnail:hover {
    transform: scale(1.05);
}

.image-thumbnail img {
    width: 110px;
    height: 160px; /* vertical rectangle */
    object-fit: cover;
    display: block;
}

.selection-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: #F3E831;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Step content for other steps */
.step-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.step-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.step-content p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .step-slide {
        padding: 20px;
    }
    
    .upload-box {
        width: 90%;
        height: 250px;
    }
    
    .bottom-images {
        gap: 10px;
    }
    
    .image-thumbnail img {
        width: 100px;
        height: 70px;
    }
    
    .step-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
}

/* Top-left step indicator */
.step-top-left {
    position: fixed;
    top: 70px; /* under the logo */
    left: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center; /* Center all elements horizontally */
}

.step-top-left-label {
    font-size: 16px;
    letter-spacing: 0.02em;
    color: #000;
    text-align: center;
}

.step-top-left-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #F3E831;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #000;
    background: #fff;
}

.step-top-left-title {
    font-size: 16px;
    color: #000;
    text-align: center;
    margin-left: 0;
    position: relative;
    left: 0; /* Reset to center with the container */
}

@media (max-width: 768px) {
    .step-top-left {
        top: 60px;
        left: 15px;
    }
    .step-top-left-circle {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }
    .step-top-left-title {
        font-size: 14px;
    }
}

/* Force black color for top-left step number and title */
#step-top-left-number { color: #000 !important; }
#step-top-left-title { color: #000 !important; }