
.lens-body {
    background: #0a0a0a;
    color: #fff;
    margin: 0;
    font-family: 'Outfit', sans-serif;
}

.lens-hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lens-hero-bg {
    position: absolute;
    inset: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-badge {
    background: rgba(95, 216, 255, 0.2);
    color: #5fd8ff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border: 1px solid rgba(95, 216, 255, 0.5);
    font-weight: 600;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin: 20px 0;
}

.hero-accent {
    color: #5fd8ff;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 30px;
}

.hero-btn {
    background: #5fd8ff;
    color: #000;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    transition: 0.3s;
    display: inline-block;
}

.hero-btn:hover {
    box-shadow: 0 0 20px rgba(95,216,255,0.6);
    transform: translateY(-2px);
}

.scanner-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.scanner-container {
    display: flex;
    gap: 40px;
    background: #111;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.scanner-view {
    flex: 1;
    background: #000;
    border-radius: 15px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px dashed #444;
}

.upload-placeholder {
    text-align: center;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.upload-btn {
    margin-top: 20px;
    background: transparent;
    color: #fff;
    border: 1px solid #5fd8ff;
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.upload-btn:hover {
    background: #5fd8ff;
    color: #000;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

canvas {
    max-width: 100%;
    max-height: 450px;
    cursor: crosshair;
    border-radius: 10px;
    object-fit: contain;
}

.lens-overlay {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: color;
    transition: background 0.3s ease;
    display: none;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.instruction-text {
    margin-top: 15px;
    color: #5fd8ff;
    font-weight: 600;
}

.scanner-controls {
    flex: 1;
}

.result-box h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1.5rem;
}

.color-match-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #000;
    border: 2px solid #333;
}

.color-details h4 {
    margin: 0;
    font-size: 1.2rem;
}

.color-details span {
    color: #888;
    font-family: monospace;
}

.health-tip {
    margin-top: 20px;
    background: rgba(95, 216, 255, 0.05);
    border-left: 3px solid #5fd8ff;
    padding: 15px;
    border-radius: 0 10px 10px 0;
}

.health-tip h5 {
    margin: 0 0 5px 0;
    color: #5fd8ff;
}

.health-tip p {
    margin: 0;
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.5;
}

.divider {
    border: none;
    border-top: 1px solid #333;
    margin: 30px 0;
}

.lens-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.lens-btn {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.lens-btn:hover, .lens-btn.active {
    border-color: #5fd8ff;
    background: #222;
}

.lens-btn.ghost {
    border-style: dashed;
}

.l-swatch {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
}

.sub-text {
    color: #888;
    margin-top: 5px;
}

.order-btn {
    margin-top: 30px;
    width: 100%;
    padding: 15px;
    border: none;
    background: #5fd8ff;
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.order-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.order-btn:not(:disabled):hover {
    background: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    .scanner-container {
        flex-direction: column;
    }
    .hero-title {
        font-size: 2.5rem;
    }
}


.ai-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #5fd8ff;
    box-shadow: 0 0 20px rgba(95,216,255,0.3);
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(95,216,255,0.3);
    border-top-color: #5fd8ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px auto;
}

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

.lens-overlay {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: color; /* Or overlay for stronger effect */
    transition: background 0.3s ease;
    display: none;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
    z-index: 5;
}


.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#live-video {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 10px;
}

.snap-btn {
    position: absolute;
    bottom: 20px;
    background: #ff3366;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255,51,102,0.5);
}

.canvas-wrapper {
    position: relative;
    display: inline-block; /* VERY IMPORTANT FOR BOUNDING BOX */
}

#eyeCanvas {
    display: block;
    max-width: 100%;
    max-height: 450px;
    border-radius: 10px;
}

.lens-overlay {
    position: absolute;
    border-radius: 75% 0;
    transform: rotate(45deg);
    pointer-events: none;
    mix-blend-mode: overlay; /* Much more realistic blending */
    display: none;
    z-index: 5;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.8), 0 0 5px rgba(0,0,0,0.3);
}

.retake-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: 1px solid #fff;
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    z-index: 20;
}


/* 3D Zoom Engine */
.lens-hero {
    height: 100vh; /* Make it full screen to allow zooming */
    perspective: 1000px;
    overflow: hidden;
}

#zoom-container {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    z-index: 1;
    pointer-events: none;
    transition: transform 0.1s linear;
}

.zoom-layer {
    position: absolute;
    inset: -50%; /* Make them huge so edges don't show when scaling */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
    will-change: transform, opacity;
}

/* Base positions */
.layer-bones {
    background-image: url('../images/external/layer_bones.png');
    transform: translateZ(-1000px) scale(0.5);
    opacity: 0;
}

.layer-vessels {
    background-image: url('../images/external/layer_vessels.png');
    transform: translateZ(-500px) scale(0.8);
    /* Create a hole in the center of the vessels to see bones */
    mask-image: radial-gradient(circle at center, transparent 15%, black 25%);
    -webkit-mask-image: radial-gradient(circle at center, transparent 15%, black 25%);
    opacity: 0;
}

.layer-eye {
    background-image: url('../images/external/layer_eye.png');
    transform: translateZ(0);
    /* Create the pupil hole */
    mask-image: radial-gradient(circle at center, transparent 10%, black 15%);
    -webkit-mask-image: radial-gradient(circle at center, transparent 10%, black 15%);
}

.zoom-instruction {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 10;
    animation: pulse 2s infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Ensure content stays above the 3D layers */
.hero-content {
    z-index: 10;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}


.target-ring {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px dashed #00ffff;
    border-radius: 75% 0;
    box-shadow: 0 0 10px rgba(0,255,255,0.5), inset 0 0 10px rgba(0,255,255,0.5);
    background: rgba(0,255,255,0.1);
    transform: translate(-50%, -50%) rotate(45deg);
    cursor: grab;
    z-index: 10;
    display: none;
    pointer-events: auto;
    touch-action: none;
}

.target-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #00ffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px #00ffff;
}

.target-ring.dragging {
    cursor: grabbing;
    border-color: #ff3366;
    background: rgba(255,51,102,0.1);
    box-shadow: 0 0 10px rgba(255,51,102,0.5), inset 0 0 10px rgba(255,51,102,0.5);
}

.target-ring.dragging::after {
    background: #ff3366;
    box-shadow: 0 0 5px #ff3366;
}

.confirm-btn {
    margin-top: 15px;
    background: linear-gradient(45deg, #00ffff, #0088ff);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0,255,255,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 300px;
}
.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0,255,255,0.6);
}
