/* =====================================================
   SusCalc — Frutiger Aero / Windows XP Nature Theme
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Trebuchet+MS&family=Tahoma&display=swap');

/* ── CSS Variables ── */
:root {
  --sky-top: #a8d8f0;
  --sky-mid: #c9eafc;
  --sky-bottom: #e8f7ff;
  --grass-green: #5cb85c;
  --leaf-green: #3a9e3a;
  --deep-green: #1e6b1e;
  --glass-white: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-shadow: rgba(100, 180, 100, 0.25);
  --taskbar-blue: #1f5fa6;
  --xp-title-start: #2a72d5;
  --xp-title-end: #5aacf5;
  --xp-title-stripe: #1a52a0;
  --xp-button-top: #f0f8ff;
  --xp-button-bot: #b8d9f7;
  --xp-button-hover: #d0ecff;
  --xp-button-border: #1c5fa5;
  --text-dark: #1a2e1a;
  --text-mid: #2d4a2d;
  --input-bg: rgba(255, 255, 255, 0.75);
  --hr-color: rgba(80, 160, 80, 0.4);
  --result-bg: rgba(220, 245, 220, 0.6);
}

/* ── Reset / Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Animated sky-to-grass background ── */
body {
  font-family: 'Tahoma', 'Trebuchet MS', sans-serif;
  font-size: 13px;
  color: var(--text-dark);
  min-height: 100vh;

  /* XP Bliss-style gradient */
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, #ffffff55 0%, transparent 55%),
    linear-gradient(
      180deg,
      #5ea8e0 0%,
      #8fc8f0 18%,
      #b8e0fa 36%,
      #d4f0d4 55%,
      #7cc87c 72%,
      #4aaa4a 85%,
      #2e882e 100%
    );
  background-attachment: fixed;
  padding: 36px 16px 60px;
}

/* ── Floating lens-flare orbs ── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 420px; height: 420px;
  top: -100px; left: -80px;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 70%);
  animation: orb1 14s ease-in-out infinite alternate;
}

body::after {
  width: 280px; height: 280px;
  bottom: 60px; right: -60px;
  background: radial-gradient(circle, rgba(180,255,180,0.3) 0%, transparent 70%);
  animation: orb2 18s ease-in-out infinite alternate;
}

@keyframes orb1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 60px) scale(1.15); }
}
@keyframes orb2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-30px, -50px) scale(1.2); }
}

/* ── Wrapper ── */
.window {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;

  /* Frosted glass window */
  background: var(--glass-white);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-radius: 10px 10px 8px 8px;
  border: 1.5px solid var(--glass-border);
  box-shadow:
    0 8px 32px rgba(30, 107, 30, 0.28),
    0 2px 8px rgba(0, 80, 160, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.9);
  overflow: hidden;
}

/* ── XP-style title bar ── */
.title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: linear-gradient(
    180deg,
    var(--xp-title-start) 0%,
    var(--xp-title-end) 60%,
    var(--xp-title-stripe) 61%,
    #1d6ad4 100%
  );
  user-select: none;
}

.title-bar-icon {
  font-size: 16px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}

.title-bar-text {
  flex: 1;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  font-family: 'Tahoma', sans-serif;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  letter-spacing: 0.02em;
}

/* XP traffic-light buttons */
.title-bar-buttons {
  display: flex;
  gap: 3px;
}

.tb-btn {
  width: 21px; height: 21px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.45);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #222;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -1px 0 rgba(0,0,0,0.2);
}

.tb-btn.minimize { background: linear-gradient(180deg, #f9f1a0 0%, #d4b800 100%); }
.tb-btn.maximize { background: linear-gradient(180deg, #b8f0b8 0%, #48a848 100%); }
.tb-btn.close    { background: linear-gradient(180deg, #f8b0b0 0%, #d42020 100%); color: #fff; }

/* ── Window body ── */
.window-body {
  padding: 24px 28px 28px;
}

/* ── Page heading ── */
h1 {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: var(--deep-green);
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

h1 .leaf-icon {
  margin-right: 6px;
}

.subtitle {
  color: var(--text-mid);
  font-size: 12px;
  margin-bottom: 20px;
  opacity: 0.85;
}

/* ── Glass panel (form & results) ── */
.glass-panel {
  background: linear-gradient(
    160deg,
    rgba(255,255,255,0.72) 0%,
    rgba(210,240,210,0.55) 100%
  );
  border: 1.5px solid rgba(255,255,255,0.8);
  border-radius: 8px;
  padding: 20px 22px;
  box-shadow:
    0 2px 12px var(--glass-shadow),
    inset 0 1px 0 rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Form fields ── */
.field-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-weight: bold;
  font-size: 12px;
  color: var(--deep-green);
  margin-bottom: 5px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

input[type="number"] {
  width: 100%;
  max-width: 240px;
  padding: 6px 10px;
  font-family: 'Tahoma', sans-serif;
  font-size: 12px;
  color: var(--text-dark);
  background: var(--input-bg);
  border: 1.5px solid rgba(90, 160, 90, 0.55);
  border-radius: 4px;
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.08),
    0 1px 0 rgba(255,255,255,0.9);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(4px);
}

input[type="number"]:focus {
  border-color: #3a8adc;
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.08),
    0 0 6px rgba(58, 138, 220, 0.5),
    0 1px 0 rgba(255,255,255,0.9);
}

/* ── XP Aqua-style submit button ── */
.xp-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 22px;
  font-family: 'Tahoma', sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #0d3a0d;
  cursor: pointer;
  border-radius: 6px;
  border: 1.5px solid var(--xp-button-border);
  background: linear-gradient(
    180deg,
    #d4f5d4 0%,
    #8fd88f 30%,
    #5aba5a 65%,
    #3da03d 100%
  );
  box-shadow:
    0 1px 0 rgba(255,255,255,0.85) inset,
    0 3px 8px rgba(30, 107, 30, 0.35),
    0 1px 2px rgba(0,0,0,0.2);
  transition: all 0.12s ease;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.xp-button:hover {
  background: linear-gradient(
    180deg,
    #e2fae2 0%,
    #a8e8a8 30%,
    #70ca70 65%,
    #52b452 100%
  );
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 4px 12px rgba(30, 107, 30, 0.45),
    0 1px 3px rgba(0,0,0,0.2);
}

.xp-button:active {
  background: linear-gradient(
    180deg,
    #5aba5a 0%,
    #3da03d 50%,
    #5aba5a 100%
  );
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  transform: translateY(1px);
}

/* ── Status message ── */
#status {
  margin-top: 14px;
  font-size: 12px;
  font-weight: bold;
  color: var(--taskbar-blue);
  min-height: 18px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

/* ── Results panel ── */
#results {
  margin-top: 20px;
  display: none;
}

#results h2 {
  font-family: 'Trebuchet MS', sans-serif;
  font-size: 14px;
  color: var(--deep-green);
  margin-bottom: 12px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 12px;
  border-bottom: 1px dotted rgba(90, 160, 90, 0.3);
}

.row:last-child { border-bottom: none; }

.row strong {
  color: var(--deep-green);
  min-width: 130px;
}

.row span {
  color: var(--text-dark);
  font-weight: bold;
}

hr {
  border: none;
  border-top: 2px solid var(--hr-color);
  margin: 10px 0;
}

/* ── XP-style taskbar at bottom ── */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 34px;
  background: linear-gradient(
    180deg,
    #2a72d5 0%,
    #1a52a8 45%,
    #143e8a 46%,
    #1c58be 100%
  );
  border-top: 2px solid #5090e0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.4);
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px 3px 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #5cb85c 0%, #3a8a3a 50%, #2a6e2a 100%);
  border: 1.5px solid #1a4e1a;
  color: #fff;
  font-family: 'Tahoma', sans-serif;
  font-size: 12px;
  font-weight: bold;
  font-style: italic;
  cursor: default;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    0 2px 4px rgba(0,0,0,0.4);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.taskbar-clock {
  margin-left: auto;
  color: #fff;
  font-family: 'Tahoma', sans-serif;
  font-size: 11px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 2px;
  background: rgba(0,0,0,0.2);
}

/* ── Leaf decoration ── */
.leaf-deco {
  position: fixed;
  font-size: 28px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: leafFloat 12s ease-in-out infinite alternate;
}

.leaf-deco:nth-child(1) { top: 12%; left: 4%; animation-delay: 0s; }
.leaf-deco:nth-child(2) { top: 30%; right: 5%; animation-delay: -4s; }
.leaf-deco:nth-child(3) { bottom: 18%; left: 7%; animation-delay: -7s; }
.leaf-deco:nth-child(4) { bottom: 10%; right: 10%; animation-delay: -2s; }

@keyframes leafFloat {
  from { transform: translateY(0) rotate(-8deg); }
  to   { transform: translateY(-18px) rotate(8deg); }
}
