body {
    margin: 0;
    padding: 20px;
    background-color: rgba(26, 26, 46, 0.1);
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(26, 26, 46, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(44, 62, 80, 0.3);
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.header-title {
    color: #00ff00;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.countdown-timer {
    color: #00ff00;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 6px 12px;
    border-radius: 5px;
}

.breathing-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.3);
        opacity: 0.7;
    }
}

#gauge-container {
    width: 100%;
    height: 320px;
    margin-top: -10px;
}

.legend-bar-container {
    position: relative;
    margin: -10px auto 15px;
    max-width: 800px;
}

#legend-bar {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap;
    position: relative;
}

.legend-item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 10px 4px;
    font-weight: bold;
    font-size: 12px;
    color: #000;
    border: 2px solid #fff;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.legend-poor { background-color: #ff3333; }
.legend-marginal { background-color: #ff9900; }
.legend-fair { background-color: #ffcc00; }
.legend-good { background-color: #66cc00; }
.legend-excellent { background-color: #00cc00; }

.position-indicator {
    position: absolute;
    top: -15px;
    width: 4px;
    height: calc(100% + 20px);
    background-color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
    transition: left 0.5s ease;
    z-index: 10;
}

.position-indicator::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ff0000;
}

.position-indicator::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ff0000;
}

.time-range-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px auto;
    flex-wrap: wrap;
}

.time-btn {
    background-color: rgba(44, 62, 80, 0.3);
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.time-btn:hover {
    background-color: rgba(0, 255, 0, 0.5);
    color: #000;
}

.time-btn.active {
    background-color: rgba(0, 255, 0, 0.5);
    color: #000;
}

#chart-container {
    width: 100%;
    height: 300px;
    margin: 15px auto;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid #00ff00;
    border-radius: 8px;
}

#update-info {
    text-align: center;
    color: #00ff00;
    font-size: 16px;
    margin-top: 15px;
    background-color: rgba(44, 62, 80, 0.3);
    padding: 10px;
    border-radius: 5px;
}

@media (max-width: 500px) {
    .header-title {
        font-size: 18px;
    }
    .countdown-timer {
        font-size: 12px;
        padding: 5px 8px;
    }
    .legend-item {
        font-size: 10px;
        padding: 8px 2px;
    }
    .time-btn {
        padding: 5px 12px;
        font-size: 11px;
    }
}