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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #5DD9C1 0%, #00CCCC 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.lake-container {
    display: flex;
    align-items: stretch;
    margin: 30px 0;
    gap: 15px;
}

.gauge {
    position: relative;
    width: 60px;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.gauge-marker {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    display: flex;
    align-items: center;
}

.gauge-marker::before {
    content: '';
    width: 10px;
    height: 1px;
    background: #999;
    margin-right: 5px;
}

.gauge-marker span {
    font-size: 0.75em;
    color: #666;
    white-space: nowrap;
}

.lake-visual {
    position: relative;
    flex: 1;
    height: 300px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.water {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(180deg, #87CEEB 0%, #5DADE2 100%);
    transition: height 2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.water.low {
    background: linear-gradient(180deg, #87CEEB 0%, #5DADE2 100%);
}

.water.good {
    background: linear-gradient(180deg, #87CEEB 0%, #5DADE2 100%);
}

.water.excellent {
    background: linear-gradient(180deg, #87CEEB 0%, #5DADE2 100%);
}

.water.flood {
    background: linear-gradient(180deg, #87CEEB 0%, #5DADE2 100%);
}

.water.critical {
    background: linear-gradient(180deg, #87CEEB 0%, #5DADE2 100%);
}

.percentage {
    color: white;
    font-size: 3em;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    color: #333;
    font-size: 1.5em;
    font-weight: bold;
}

.status-message {
    text-align: center;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 1.2em;
    margin: 20px 0;
}

.status-message.low {
    background: #ffebee;
    color: #c62828;
}

.status-message.good {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-message.excellent {
    background: #e3f2fd;
    color: #1565c0;
}

.status-message.flood {
    background: #ffebee;
    color: #b71c1c;
}

.status-message.critical {
    background: #ffebee;
    color: #c62828;
}

.loading {
    text-align: center;
    color: #666;
    font-size: 1.2em;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-top: 20px;
}

@keyframes wave {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-25px) translateY(-5px); }
    100% { transform: translateX(0) translateY(0); }
}

.water::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -50%;
    width: 200%;
    height: 20px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: wave 3s infinite ease-in-out;
}

/* Navigation link styles */
.nav-link {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 20px;
    background: #00CCCC;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: #009999;
}

/* Chart container for historical data page */
.chart-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    max-width: 900px;
    width: 100%;
}

.chart-wrapper {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

/* Night Mode / Dusk Theme */
body.night-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    transition: background 1s ease-in-out;
}

body.night-mode .container {
    background: #1e1e2e;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

body.night-mode h1 {
    color: #e8e8f0;
}

body.night-mode #answer {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

body.night-mode .lake-visual {
    background: #2a2a3a;
}

body.night-mode .water {
    background: linear-gradient(180deg, #1e3a5f 0%, #0f2942 100%);
}

body.night-mode .percentage {
    color: #b8c5d6;
}

body.night-mode .stat-box {
    background: #2a2a3a;
    border: 1px solid #3a3a4a;
}

body.night-mode .stat-label {
    color: #a8a8b8;
}

body.night-mode .stat-value {
    color: #e8e8f0;
}

body.night-mode .status-message {
    background: #2a2a3a;
    color: #e8e8f0;
    border: 1px solid #3a3a4a;
}

body.night-mode .status-message.low {
    background: #3a1f1f;
    color: #ff8a80;
    border-color: #5a2f2f;
}

body.night-mode .status-message.good {
    background: #1f3a1f;
    color: #81c784;
    border-color: #2f5a2f;
}

body.night-mode .status-message.excellent {
    background: #1f2a3a;
    color: #64b5f6;
    border-color: #2f3a5a;
}

body.night-mode .status-message.flood {
    background: #3a1f1f;
    color: #ff5252;
    border-color: #5a2f2f;
}

body.night-mode .status-message.critical {
    background: #3a1f1f;
    color: #ff8a80;
    border-color: #5a2f2f;
}

body.night-mode .last-updated {
    color: #a8a8b8;
}

body.night-mode .loading {
    color: #a8a8b8;
}

body.night-mode .error {
    background: #3a1f1f;
    color: #ff8a80;
    border: 1px solid #5a2f2f;
}

body.night-mode .nav-link {
    background: #0f3460;
    color: #e8e8f0;
}

body.night-mode .nav-link:hover {
    background: #16213e;
}

body.night-mode .gauge-marker span {
    color: #a8a8b8;
}

body.night-mode .gauge-marker::before {
    background: #666;
}

/* Night mode for chart page */
body.night-mode .chart-container {
    background: #1e1e2e;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}