body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #2c3e50;
    color: #fff;
    overflow: auto;
    touch-action: pan-y;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 5px;
    background: rgba(0,0,0,0.7);
    position: sticky;
    top: 0;
    z-index: 100;
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #34495e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid rgba(255,255,255,0.2);
    font-size: 14px;
}

.step.active {
    background: #2ecc71;
    border-color: white;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
}

.step.completed {
    background: #27ae60;
    border-color: white;
}

.camera-selector {
    position: absolute;
    top: 60px;
    left: 10px;
    z-index: 100;
    display: none; /* Inicialmente escondido */
    align-items: center;
    gap: 10px;
}

.camera-selector label {
    font-size: 14px;
    font-weight: bold;
}

.camera-selector select {
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.example-photo-container {
    position: relative;
    z-index: 100;
}

#examplePhoto {
    border: 2px solid #2ecc71;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    user-select: none;
    touch-action: none;
}

#resizeControls {
    display: none;
    position: absolute;
    bottom: -510px;
    right: -50px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.resize-btn {
    width: 30px;
    height: 30px;
    background: rgba(46, 204, 113, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resize-btn:active {
    transform: scale(0.95);
}

.code-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    text-align: center;
    padding: 20px;
}

.code-input-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.code-input-container input {
    padding: 12px;
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    margin-bottom: 20px;
}

.code-input-container button {
    width: 100%;
    max-width: 300px;
}

#codeFeedback {
    margin-top: 20px;
    font-size: 14px;
}

#videoContainer, #videoContainer2, #videoContainer3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
}

#video, #video2, #video3 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#canvas {
    display: none;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.guide-box {
    position: absolute;
    width: 85%;
    height: 70%;
    top: 15%;
    left: 7.5%;
    pointer-events: none;
}

.glasses-outline {
    width: 90%;
    height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
}

.button {
    background: rgba(46, 204, 113, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 150;
}

.button.back {
    background: rgba(231, 76, 60, 0.9);
}

.button:active {
    transform: scale(0.95);
}

#controls {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 10px;
    z-index: 200;
}

#feedback {
    display: none;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    padding: 10px 20px;
    border-radius: 12px;
    max-width: 90%;
    text-align: center;
    backdrop-filter: blur(10px);
    font-size: 14px;
}

#debugLog {
    display: none;
    visibility: hidden;
    position: fixed;
    bottom: 120px;
    left: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

#debugLog p {
    margin: 5px 0;
    font-size: 12px;
}

.success { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.error { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }

.step-content {
    display: none;
    min-height: calc(100vh - 60px);
    overflow: visible;
}

.step-content.active {
    display: flex;
    flex-direction: column;
}

.scroll-container {
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    touch-action: pan-y;
}

.preview-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 60px;
    min-height: 120vh;
}

.preview-item {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.preview-item img {
    max-height: 35vh;
    width: 100%;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 10px;
}

#enlargeModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#enlargeModal > div {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 80%;
    max-height: 80%;
    text-align: center;
    position: relative;
}