/* Import digital font */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

.gauge {
    display: inline-block;
}

.gauge_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gauge_container:hover {
    transform: translateY(-2px);
}

/* Gauge Meter */
.gauge>div[role=meter] {
    border-radius: 8rem 8rem 0 0;
    width: 12rem;
    height: 6rem;
    position: relative;
    overflow: hidden;
    background: conic-gradient(
        from 0deg at 50% 100%,
        #CC0033F2 30deg,          /* Red - hazardous */
        #660099F2 30deg 60deg,    /* Purple - very unhealthy */
        #7E0023F2 60deg 91deg,    /* Deep red - unhealthy */
        transparent 91deg 269deg,
        #009966F2 269deg 300deg,  /* Green - good */
        #FFDE33F2 300deg 330deg,  /* Yellow - moderate */
        #FF9933F2 330deg 360deg   /* Orange - unhealthy for sensitive groups */
    );
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 0px solid rgba(0, 0, 0, 0.1);
}

    
/* Dial (Inner Circle) */
.dial {
    background-color: #ffffff;
    transition: background-color 0.5s ease;
    border-radius: 8rem 8rem 0 0;
    width: 72%;
    height: 72%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    left: 14%;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dial.white {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.9);
}

/* Digital Value Display */
.aqi-num {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 600;
    font-size: 1.6rem;
    margin-top: 0.7rem;
    margin-bottom: 0rem;
    color: #2c3e50;
    text-shadow: 0 0 2px rgba(44, 62, 80, 0.2);
    letter-spacing: 1.2px;
    /* padding: 2px 2px;
    background: rgba(255, 255, 255, 0.5); 
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05); */
    /* position: relative; */
}

.aqi-num::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(44, 62, 80, 0.1),
        transparent
    );
}

.aqi-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
    text-shadow: 0 0 1px rgba(102, 102, 102, 0.2);
}

/* Digital Gauge Label */
.gauge-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: #2c3e50;
    margin-top: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 1px rgba(44, 62, 80, 0.2);
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Arrow - Original Design */
.dial>.arrow {
    position: absolute;
    left: calc(50% - .25rem);
    bottom: 0;
    width: .5rem;
    height: calc(100% + 1px);
    background-color: transparent;
    transform-origin: bottom center;
    transform: rotate(-90deg);
    transition: transform 1s;
}

.dial>.arrow:after {
    content: "";
    border-left: .5rem solid transparent;
    border-right: .5rem solid transparent;
    border-top: .5rem solid #000;
    position: absolute;
    left: calc(50% - .5rem);
    top: 0;
    width: 0;
    height: 0;
    transition: border-color .25s;
}

.dial.white>.arrow:after {
    border-top-color: #fff;
}

/* Color States */
.dial[data-state="good"] { background-color: rgba(76, 175, 80, 0.1); }
.dial[data-state="moderate"] { background-color: rgba(255, 193, 7, 0.1); }
.dial[data-state="unhealthy-sensitive"] { background-color: rgba(255, 152, 0, 0.1); }
.dial[data-state="unhealthy"] { background-color: rgba(255, 23, 68, 0.1); }
.dial[data-state="very-unhealthy"] { background-color: rgba(156, 39, 176, 0.1); }
.dial[data-state="hazardous"] { background-color: rgba(255, 68, 68, 0.1); }

/* Digital Segment Effect */
@keyframes segment-fade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.92; }
}

.aqi-num, .gauge-label {
    animation: segment-fade 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gauge>div[role=meter] {
        width: 12rem;
        height: 6rem;
    }
    
    .aqi-num {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
    }
    
    .gauge-label {
        font-size: 0.8rem;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 480px) {
    .gauge>div[role=meter] {
        width: 10rem;
        height: 5rem;
    }
    
    .aqi-num {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
    
    .gauge-label {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    
    .gauge_container {
        padding: 15px;
    }
}

.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.admin-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.admin-container nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.admin-container nav a {
    text-decoration: none;
    color: #333;
    padding: 5px 10px;
    border-radius: 4px;
}

.admin-container nav a:hover {
    background-color: #f0f0f0;
}