    :root {--bg: #f6f7fb;--text: #222;--grid: #ccc;--card-bg: #fff;--card-shadow: rgba(0,0,0,.06);--flash-color: rgba(0,255,0,0.3);--glow-color: rgba(0,255,0,0.5);--halo-color: rgba(0, 255, 0, 0.15);--zip-glow-color: rgba(0,255,0,0.4);--done-color: limegreen;  --wind-calm: cyan;
      --wind-moderate: green;
      --wind-strong: orange;
      --wind-storm: red;
      --control-bg: #fff;
      --control-border: #ccc;
      --control-text: #222; 
	  --accent: #0078d7;
      --accent-danger: #c62828;
      --text-contrast: white; }
	body {font-family: Arial, Helvetica, sans-serif;margin-top: 48px;padding-top: 36px;margin: 0;background: var(--bg);color: var(--text);; }
    .wrap {max-width: 1200px;margin: 0 auto;padding: 16px; }
    h1 { text-align: center; margin-bottom: 20px; }
    h2 { margin-top: 30px; margin-bottom: 10px; font-size: 20px; border-bottom: 2px solid var(--grid); padding-bottom: 4px; }
	.grid {display: grid;grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));gap: 16px;margin-bottom: 20px; }
	.card {background: var(--card-bg);border-radius: 12px;box-shadow: 0 8px 20px var(--card-shadow);padding: 16px; }
    .muted { color: var(--text); opacity: 0.6; font-size: 0.9em; transition: opacity 0.3s ease; }
	.tempmsg { font-size: 0.9em; transition: opacity 0.6s ease; opacity: 0; }
	body.dark {--bg: #121212;--text: #f0f0f0;--grid: #444;--card-bg: #1e1e1e;--card-shadow: rgba(0,0,0,.8);--flash-color: rgba(0,255,255,0.25);--glow-color: rgba(0,255,255,0.5);--halo-color: rgba(0, 255, 255, 0.2);--zip-glow-color: rgba(0,255,255,0.4);--done-color: cyan;
	  --control-bg: #2a2a2a;
      --control-border: #555;
      --control-text: #e8e8e8; 
	  --accent: #005bb5;        /* darker blue */
      --accent-danger: #a32020;  /* darker red */
      --text-contrast: #fff; }
    body.dark .card span[style*="limegreen"],
    body.dark .card span[style*="green"],
    body.dark .card span[style*="orange"],
    body.dark .card span[style*="red"] { filter: brightness(0.9); }
    .center { text-align: center; }
    button, input, select {
      padding: 8px 10px;
      border-radius: 10px;
      background: var(--control-bg);
      color: var(--control-text);
      border: 1px solid var(--control-border);
      transition: background 0.3s, color 0.3s, border-color 0.3s; }
    canvas { width: 100% !important; height: 100% !important; }
    .chart-wrap { height: 300px; }
    .chart-label { text-align: right; font-size: 0.85em; opacity: 0.7; margin-bottom: 2px; transition: opacity 0.3s ease, color 0.3s ease; color: var(--text); }
	@media (max-width: 768px) { .chart-wrap { height: 240px; } }
	@media (max-width: 480px) {h1 { font-size: 18px; }h3 { font-size: 16px; }button, input, select { font-size: 14px; }.chart-wrap { height: 200px; } }
    @media (max-width: 600px) { #windSpeedLegend { font-size: 0.8em; } #windSpeedLegend div:first-child { width: 140px; } }
	#compassCanvas {width: 100%;max-width: 320px;aspect-ratio: 1/1;display: block;margin: 0 auto; }
    @keyframes flashGreen { 0%   { background-color: var(--flash-color); } 100% { background-color: transparent; }}
    .flashGreen { animation: flashGreen 1s ease-out; border-radius: 6px; }
    @keyframes flashHighlight { 0%   { background-color: var(--flash-color); } 100% { background-color: transparent; }}
    .flashHighlight { animation: flashHighlight 1s ease-out; border-radius: 6px; }
    @keyframes chartGlow { 0%   { box-shadow: 0 0 0 var(--glow-color); opacity: 1; } 50%  { box-shadow: 0 0 20px var(--glow-color); opacity: 0.9; } 100% { box-shadow: 0 0 0 var(--glow-color); opacity: 1; }}
    .chart-glow { animation: chartGlow 1.2s ease-out; border-radius: 12px; }
    @keyframes breezePulse { 0%   { transform: rotate(0deg) scale(1); } 25%  { transform: rotate(2deg) scale(1.02); } 50%  { transform: rotate(0deg) scale(1.03); } 75%  { transform: rotate(-2deg) scale(1.02); } 100% { transform: rotate(0deg) scale(1); } }
    .breeze-effect { animation: breezePulse 1.4s ease-in-out; transform-origin: center center; }
    @keyframes haloPulse { 0%   { box-shadow: 0 0 0 var(--halo-color); } 40%  { box-shadow: 0 0 60px var(--halo-color); } 100% { box-shadow: 0 0 0 var(--halo-color); } }
    .halo-effect { animation: haloPulse 2.2s ease-in-out; border-radius: 50%; }
    @keyframes zipReadyGlow { 0%   { box-shadow: 0 0 0 var(--zip-glow-color); transform: scale(1); } 50%  { box-shadow: 0 0 16px var(--zip-glow-color); transform: scale(1.03); } 100% { box-shadow: 0 0 0 var(--zip-glow-color); transform: scale(1); } }
    .zip-ready { animation: zipReadyGlow 1.5s ease-out; border-radius: 8px;}
    .download-done { color: var(--done-color); font-weight: bold; margin-left: 8px; opacity: 0; animation: fadeInOut 2.2s ease; }
    @keyframes fadeInOut { 0% { opacity: 0; transform: translateY(4px); } 20% { opacity: 1; transform: translateY(0); } 80% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-4px); } }
    @keyframes pulseGreen { 0% { color: limegreen; text-shadow: 0 0 4px limegreen; } 50% { color: #baffb8; text-shadow: 0 0 10px limegreen; } 100% { color: limegreen; text-shadow: 0 0 4px limegreen; } }
    .pulse-success { animation: pulseGreen 1s ease-in-out; }
    @keyframes wifiPulse { 0%   { background-color: rgba(0,255,0,0.2); } 50%  { background-color: rgba(0,255,0,0.4); } 100% { background-color: transparent; } }
    .wifi-pulse { animation: wifiPulse 1.5s ease; }
    @keyframes wifiPulseRed { 0%   { background-color: rgba(255,0,0,0.3); } 50%  { background-color: rgba(255,0,0,0.5); } 100% { background-color: transparent; } }
    .wifi-pulse-red { animation: wifiPulseRed 1.5s ease; }
    #statusBar { position: fixed; top: 0; left: 0; width: 100%; padding: 6px 10px; text-align: center; font-weight: bold; font-size: 0.95em; border-bottom: 1px solid var(--grid); background: var(--card-bg); color: var(--text); z-index: 9999; transition: background 0.3s, color 0.3s; }
    @keyframes labelFlash { 0%   { opacity: 0.3; transform: scale(0.98); } 40%  { opacity: 1;   transform: scale(1.02); } 100% { opacity: 0.7; transform: scale(1.0); } }
    .chart-label.flash { animation: labelFlash 0.8s ease; }
    #legendBar { display:inline-block; width:200px; height:10px; border-radius:5px; margin-top:4px; vertical-align:middle; background: linear-gradient(to right, var(--wind-calm), var(--wind-moderate), var(--wind-strong), var(--wind-storm) ); transition: filter 0.3s ease, opacity 0.3s ease; }
	[data-theme='dark'] #legendBar { filter: brightness(0.8); }
    #altBarContainer { display:inline-block; width:8px; height:50px; margin-left:6px; border-radius:4px; background:var(--grid); vertical-align:middle; overflow:hidden; position:relative; }
    #altBar { position:absolute; bottom:0; width:100%; height:0%; background:linear-gradient(to top, var(--wind-calm), var(--wind-moderate), var(--wind-strong) ); transition:height 0.6s ease, background 0.6s ease; }
    #rainBackBtn:hover { background: var(--accent-light, #0090ff); }
    @keyframes pulseRed { 0%, 100% { color: red; opacity: 1; } 50% { color: #ff6666; opacity: 0.6; } }
    .pulse-red { animation: pulseRed 1s ease-in-out infinite; }
    #csvList { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.4s ease; opacity: 0; margin: 0; padding-left: 0; }
    #csvList.show { max-height: 500px; /* large enough to fit your content */ opacity: 1;}
    #csvList li { list-style: none; margin: 4px 0; }
    #csvList a { text-decoration: none; color: #0077cc; }
    #csvList a:hover { text-decoration: underline; }
	.iaq-status { display: flex; align-items: center; justify-content: center; margin-top: 8px; font-size: 1rem; color: var(--text); }
    .iaq-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; transition: background-color 1s ease, box-shadow 1s ease; }
    .iaq-dot.glow { box-shadow: 0 0 8px 2px currentColor; }
    #userControls button,
    #authControls button {
      padding: 6px 12px;
      border: none;
      border-radius: 6px;
      background: var(--accent);
      color: var(--text-contrast);
      font-weight: bold;
      cursor: pointer; }
    #userControls button.danger,
    #authControls button.danger {
      background: var(--accent-danger); }
    #userControls button:hover,	
    #authControls button:hover {
	  opacity: 0.85; }
	input[type="file"] {
      background-color: var(--control-bg);
      color: var(--control-text);
      border: 1px solid var(--control-border);
      border-radius: 10px;
      padding: 6px 10px;
      transition: background 0.3s, color 0.3s, border-color 0.3s; }
    /* style the “Choose file” button inside it */
    input[type="file"]::file-selector-button {
      background: var(--accent);
      color: var(--text-contrast);
      border: none;
      padding: 6px 12px;
      border-radius: 6px;
      margin-right: 8px;
      cursor: pointer;
      transition: opacity 0.25s; }
    input[type="file"]::file-selector-button:hover {
      opacity: 0.85; }
    input[type="file"]::-moz-file-upload-button {
      background: var(--accent);
      color: var(--text-contrast);
      border: none;
      padding: 6px 12px;
      border-radius: 6px;
      cursor: pointer; }
