:root {
    --bg-color: #050913;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #FFD700; /* NT Yellow */
    --accent-secondary: #0056b3; /* NT Blue */
    --success-color: #00ff9d;
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at top right, #1a233a 0%, #050913 60%);
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2.5rem 2rem;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-nt {
    font-weight: 700;
    font-size: 2.1rem;
    color: var(--accent-color);
    letter-spacing: -1px;
}

.logo-text {
    font-weight: 300;
    font-size: 1.6rem;
    color: var(--text-primary);
}

.status-pill {
    background: var(--card-bg);
    padding: 0.4rem 1.2rem;
    border-radius: 999px;
    border: var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success-color);
}

/* Main Stage */
.main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gauge-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Gauge */
.gauge-container {
    margin-bottom: 1rem;
}

.gauge-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
}

/* ทำให้เกจเป็นปุ่มคลิก */
.clickable-gauge {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.clickable-gauge:hover:not(.testing) {
    transform: scale(1.04);
}

.clickable-gauge:hover:not(.testing) .progress-ring__circle {
    stroke: var(--accent-color);
}

.clickable-gauge.testing {
    cursor: default;
    opacity: 0.85;
}

/* วงแหวน */
.progress-ring__circle {
    transition: stroke-dashoffset 0.1s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 754; /* 2 * PI * 120 */
    stroke-dashoffset: 754;
    stroke-linecap: round;
}

.progress-ring__circle-bg {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-linecap: round;
}

/* เนื้อหาในเกจ */
.gauge-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}

.gauge-value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.gauge-unit {
    font-size: 1rem;
    color: var(--accent-color);
    margin-top: 0.4rem;
}

.instruction {
    margin-top: 1.4rem;
    color: var(--text-secondary);
    font-size: 0.98rem;
    letter-spacing: 0.5px;
}

/* Stats */
.stats-section {
    padding-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.25rem 1.3rem;
    border-radius: 16px;
    border: var(--glass-border);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.stat-value-group {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Footer Info Bar */
.info-bar {
    display: flex;
    justify-content: space-between;
    padding-top: 1.4rem;
    border-top: var(--glass-border);
    margin-top: 0.25rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon {
    font-size: 1.3rem;
    opacity: 0.7;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-text .label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.info-text .value {
    font-size: 0.98rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
    70% { box-shadow: 0 0 0 26px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.pulse-animation {
    animation: pulse 2.2s infinite;
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        padding: 1.2rem 1.2rem 1.6rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .info-bar {
        flex-direction: column;
        gap: 1.2rem;
    }
}

