/* body-scan.css */
.scan-container {
    max-width: 600px;
    margin: 0 auto;
    color: #1f2937;
    /* Dark text for visibility */
    text-align: center;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 60vh;
    /* Ensure reasonable height */
}

.scan-visual {
    position: relative;
    /* Responsive height: 40vh but min 250px and max 400px */
    height: clamp(250px, 40vh, 400px);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.body-outline {
    height: 100%;
    width: auto;
    /* Maintain aspect ratio */
    max-width: 100%;
    opacity: 0.3;
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
    transition: all 0.5s;
}

.scan-indicator {
    position: absolute;
    width: 40%;
    /* Reduced width to match human outline better */
    height: 4px;
    background: #10b981;
    box-shadow: 0 0 15px #10b981;
    top: 50%;
    /* Will be animated */
    left: 30%;
    /* Centered better */
    border-radius: 4px;
    opacity: 0;
    transition: top 1s ease-in-out, opacity 0.5s;
    z-index: 10;
}

.scan-text {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    width: 100%;
}

.scan-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.btn-scan {
    background: transparent;
    border: 1px solid #10b981;
    color: #10b981;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-scan:hover {
    background: rgba(16, 185, 129, 0.1);
}

.btn-scan.primary {
    background: #10b981;
    color: white;
}

.btn-scan.primary:hover {
    background: #059669;
}

/* Animation for active scanning */
.scanning .scan-indicator {
    opacity: 1;
    animation: scan-pulse 2s infinite;
}

@keyframes scan-pulse {
    0% {
        box-shadow: 0 0 5px #10b981;
        opacity: 0.8;
    }

    50% {
        box-shadow: 0 0 20px #10b981;
        opacity: 1;
    }

    100% {
        box-shadow: 0 0 5px #10b981;
        opacity: 0.8;
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .scan-container {
        padding: 0.5rem;
    }

    .scan-visual {
        margin: 0.5rem 0;
        height: clamp(200px, 50vh, 300px);
    }

    .scan-text {
        padding: 1rem;
        font-size: 1rem;
        min-height: 80px;
        margin-bottom: 1rem;
    }

    .btn-scan {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
}