#lens-app-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1d1d1f;
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.lp-card { padding: 40px 20px; text-align: center; }
.lp-logo { max-width: 150px; margin-bottom: 20px; }
.lp-btn {
    display: block; width: 100%; padding: 15px; margin: 10px 0;
    border-radius: 15px; border: none; cursor: pointer; font-size: 16px; font-weight: 600;
}
.lp-btn-primary { background: #8644a7; color: white; max-width: 170px; margin: auto !important; }
.lp-btn-secondary { background: #8444fb; color: #ffffff; max-width: 170px;margin: auto !important; margin-top: 11px !important; }

.camera-wrapper {
    position: relative;
    background: #000;
    aspect-ratio: 3/4;
    width: 100%;
}
.viewport {
    width: 100%; 
    height: 100%; 
    position: relative; 
    overflow: hidden;
    background: #000;
}

canvas.output_canvas {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    position: absolute; 
    top: 0;
    left: 0;
    z-index: 0; 
    display: block;
}

#topLogo, .back-btn, #loadingScreen, #notification, #lensNameDisplay, .capture-btn, .upload-trigger-btn, .reset-btn {
    z-index: 10;
}
#notification {
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85); 
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    z-index: 99999; 
    display: none; 
    opacity: 0;
    transition: opacity 0.3s ease;
    min-width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}
#topLogo { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); max-width: 139px; height: auto; pointer-events: none; }

#opacityDebug {
    display:none !important;
    position: absolute;
    top: 60px; 
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #00ff00; 
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-family: monospace;
    z-index: 20;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.back-btn {
    position: absolute;
    top: 0px;
    left: 0px;
    background: none !important;
    border: none !important;
}
.upload-trigger-btn {
    position: absolute; top: 70%; left: 50%; transform: translate(-50%, -50%);
    background: #8644a7; color: white; padding: 15px 30px; border-radius: 30px; cursor: pointer; font-weight: bold;
}
.reset-btn {
    position: absolute; top: 20px; right: 20px; background: rgb(255 44 227 / 80%);
    color: #ffffff; padding: 8px 15px; border-radius: 20px; font-size: 12px; font-weight: bold;
    cursor: pointer; display: none;
}
#loadingScreen {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: rgba(255,255,255,0.9); padding: 20px; border-radius: 15px;
}
.hidden { display: none !important; }
.capture-btn {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 60px; background: rgba(255,255,255,0.5); border-radius: 50%; border: 4px solid white; cursor: pointer; box-shadow: #2e015654 0 0 10px 6px;
}
#lensNameDisplay {
    position: absolute; bottom: 35px; right: 20px; background: rgb(66 43 155 / 40%); color: white; padding: 6px 12px; border-radius: 15px; font-size: 12px;
}
.capture-flash { position: absolute; inset:0; background: white; opacity:0; pointer-events:none; z-index: 99; }
@keyframes flashAnim { 0% { opacity: 0.8; } 100% { opacity: 0; } }
.ui-panel {
    background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); border-top: 3px solid #8644a7;
    padding: 10px; height: 140px; position: relative; z-index: 30;
}
.selector-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; padding-top:3px; }
.lens-option { min-width: 60px; text-align: center; cursor: pointer; }
.lens-circle { width: 50px; height: 50px; border-radius: 50%; background-size: cover; margin: 0 auto; }
.lens-option.active .lens-circle { border-color: #00b894; transform: scale(1.1); }
.lens-name { font-size: 11px; margin-top: 5px; color: #666; }
.takephoto {position: absolute; top: -30px; left: 0; width: 100%; text-align: center; color: #fe78ff; font-size: 14px; font-weight: 500;}