/* Ambient Light Tester Styles */

/* Light Meter Wrapper */
.light-meter-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}

#lightMeter {
    width: 100%;
    height: 100%;
    display: block;
}

/* Center Value Display */
.meter-center-value {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.lux-value {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    line-height: 1;
    color: var(--bs-body-color);
}

.lux-unit {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    margin-top: 0.25rem;
}

/* History Chart */
#historyChart {
    width: 100%;
    height: 100%;
    display: block;
}

/* Light Guide */
.light-guide {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.guide-item:hover {
    background-color: var(--bs-tertiary-bg);
}

.guide-badge {
    min-width: 100px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.guide-text {
    flex: 1;
    color: var(--bs-body-color);
}

/* Light Condition Badge */
#lightCondition {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    min-width: 120px;
    text-align: center;
}

/* Statistics Cards */
.card-body .fs-5 {
    font-family: 'Courier New', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .light-meter-wrapper {
        max-width: 320px;
    }

    .lux-value {
        font-size: 2.5rem;
    }

    .lux-unit {
        font-size: 1rem;
    }

    .guide-badge {
        min-width: 85px;
        font-size: 0.8rem;
    }

    .guide-text {
        font-size: 0.9rem;
    }

    #lightCondition {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
        min-width: 100px;
    }
}

@media (max-width: 576px) {
    .light-meter-wrapper {
        max-width: 280px;
    }

    .lux-value {
        font-size: 2rem;
    }

    .lux-unit {
        font-size: 0.9rem;
    }
}

/* Animation for meter needle */
@keyframes sweep {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(270deg);
    }
}

/* Pulse animation for active state */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(13, 110, 253, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(13, 110, 253, 0.6);
    }
}

.light-meter-wrapper.active {
    animation: pulse-glow 2s ease-in-out infinite;
    border-radius: 50%;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .guide-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .lux-value {
    color: #fff;
}

/* Smooth transitions */
canvas {
    transition: opacity 0.3s ease;
}

.badge {
    transition: all 0.3s ease;
}
