:root {
  --blue-main: #2f80ed;
  --green-soft: #7dcfb6;
  --green-light: #eaf7f3;
  --white: #ffffff;
  --text-dark: #243a5e;
  --text-muted: #6b7c93;
  --border-soft: rgba(36, 58, 94, 0.12);
  --bg: #f4faff;
  --card: #ffffff;
  --shadow: 0 14px 40px rgba(36, 58, 94, 0.1);
  --radius: 20px;
  --focus: 2px solid #2f80ed;
  --max-width: 820px;
}


* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  background: linear-gradient(135deg, #f4faff 0%, #eaf7f3 100%);
  min-height: 100vh;
  font-size: 16.5px;
  line-height: 1.7;
}

.page-bg {
  display: none;
}

.bg-slideshow {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
}

.weather-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.butterfly-fx {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 5;
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  background: var(--blue-main);
  border-bottom: 1px solid rgba(36, 58, 94, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.topbar__inner {
  max-width: 1100px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--white);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, text-decoration-color 0.2s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hamburger {
  display: none;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.28);
  opacity: 0.85;
}

.hamburger:active {
  transform: scale(0.96);
}

.hamburger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.burger-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.burger-icon::before,
.burger-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.burger-icon::before {
  transform: translateY(-5px);
}

.burger-icon::after {
  transform: translateY(5px);
}

.nav a:hover,
.nav a:focus-visible {
  color: #ffffff;
}

.nav a.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 0 6vw 70px;
}

.card {
  width: 100%;
  max-width: var(--max-width);
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 32px 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  border-bottom: 3px solid var(--blue-main);
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.about-card {
  max-width: 900px;
  background: rgba(255, 255, 255, 0.85);
}

.about-body h1 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.about-body p {
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.privacy-card {
  max-width: 900px;
  background: rgba(255, 255, 255, 0.85);
}

.privacy-body h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.privacy-updated {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.privacy-body h2 {
  font-size: 1.2rem;
  margin: 20px 0 8px;
  color: var(--text-dark);
}

.privacy-body p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.privacy-body ul {
  padding-left: 20px;
  margin: 0 0 16px;
  color: var(--text-muted);
}

.privacy-body li {
  margin-bottom: 6px;
}

.terms-card {
  max-width: 900px;
  background: rgba(255, 255, 255, 0.85);
}

.terms-body h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.terms-updated {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.terms-body h2 {
  font-size: 1.2rem;
  margin: 20px 0 8px;
  color: var(--text-dark);
}

.terms-body p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.highlight {
  color: #00b2ca;
  font-weight: 600;
}

h1, h2, h3 {
  margin-top: 0;
}

h1 {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 2.1rem;
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero-title {
  font-family: "Berkshire Swash", cursive;
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.subtext {
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.72;
  font-size: 1.05rem;
}

.field {
  margin-bottom: 18px;
}

.textarea-wrap {
  position: relative;
}

textarea {
  width: 100%;
  min-height: 200px;
  background: #f7fbff;
  border: 1px solid var(--border-soft);
  color: var(--text-dark);
  padding: 18px;
  border-radius: 16px;
  font-size: 1rem;
  line-height: 1.7;
  resize: vertical;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea:focus {
  outline: none;
  border: 2px solid var(--blue-main);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.18);
}

textarea::placeholder {
  color: var(--text-muted);
}

.ghost {
  position: absolute;
  inset: 0;
  padding: 18px;
  white-space: pre-wrap;
  word-wrap: break-word;
  pointer-events: none;
  color: var(--text-dark);
  opacity: 0;
  filter: blur(0px);
}

.ghost.active {
  opacity: 1;
}

.ghost.dissolve {
  animation: dissolve 0.65s ease forwards;
}

@keyframes dissolve {
  0% { opacity: 1; filter: blur(0px); transform: translateY(0); }
  60% { opacity: 0.4; filter: blur(2px); }
  100% { opacity: 0; filter: blur(5px); transform: translateY(-10px); }
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.message {
  color: var(--blue-main);
  font-size: 0.95rem;
  opacity: 0.9;
  display: none;
}

.message.is-visible {
  display: inline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.controls-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.upload-weather-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn {
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

.btn.primary {
  background: var(--blue-main);
  color: #fff;
  box-shadow: 0 12px 20px rgba(47, 128, 237, 0.25);
}

.btn.primary:hover {
  transform: translateY(-1px);
  background: #256fd1;
}

.btn.secondary {
  background: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-soft);
}

.btn.secondary:hover {
  background: #f4faff;
}

.btn.link {
  background: transparent;
  color: var(--text-dark);
  padding: 0;
  font-size: 0.95rem;
  text-decoration: underline;
}

.helper-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  opacity: 0.85;
  text-align: right;
  white-space: nowrap;
}

.bg-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bg-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(36, 58, 94, 0.18);
  background: rgba(255, 255, 255, 0.35);
  color: var(--text-dark);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bg-btn:hover {
  background: rgba(255, 255, 255, 0.55);
}

.bg-btn:focus-visible,
.bg-upload:focus-within {
  outline: var(--focus);
  outline-offset: 2px;
}

.bg-upload {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(36, 58, 94, 0.18);
  background: rgba(255, 255, 255, 0.35);
  color: var(--text-dark);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.bg-upload:hover {
  background: rgba(255, 255, 255, 0.55);
}

.weather-toggle-btn {
  border-radius: 999px;
  border: 1px solid rgba(36, 58, 94, 0.18);
  background: rgba(255, 255, 255, 0.35);
  color: var(--text-dark);
  padding: 6px 12px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.weather-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.55);
}

.weather-toggle-btn:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}

.toast {
  margin-top: 18px;
  background: rgba(125, 207, 182, 0.28);
  border: 1px solid var(--border-soft);
  padding: 12px 16px;
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-dark);
}

.toast.show {
  display: flex;
}

.divider {
  height: 1px;
  background: var(--border-soft);
  margin: 24px 0;
}

.faq h3 {
  margin-bottom: 6px;
}

.faq-item {
  margin-bottom: 16px;
}

.privacy-list {
  list-style: disc;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.7;
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0 6vw 30px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 720px) {
  .topbar {
    height: 56px;
  }

  .card {
    padding: 24px 24px 20px;
    margin-top: 16px;
  }

  .about-body h1 {
    font-size: 2rem;
  }

  .about-body p {
    font-size: 1.02rem;
  }

  .privacy-body h1 {
    font-size: 2rem;
  }

  .privacy-body p {
    font-size: 1.01rem;
  }

  .terms-body h1 {
    font-size: 2rem;
  }

  .terms-body p {
    font-size: 1.01rem;
  }

  .controls-right {
    width: 100%;
    align-items: flex-end;
  }

}

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
    line-height: 1.2;
    text-align: center;
  }

  .nav {
    position: relative;
  }

  .nav-links {
    position: absolute;
    top: 46px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
    padding: 10px;
    display: none;
    flex-direction: column;
    min-width: 160px;
    gap: 6px;
  }

  .nav-links a {
    color: var(--text-dark);
    padding: 8px 12px;
  }

  .nav-links a.active {
    background: rgba(47, 128, 237, 0.12);
    color: var(--text-dark);
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .helper-text {
    display: none;
  }

  .actions {
    justify-content: center;
  }

  .action-group {
    width: 100%;
    justify-content: center;
  }

  .controls-right {
    width: 100%;
    align-items: center;
    margin-top: 15px;
  }

  .upload-weather-group {
    align-items: center;
  }
}

@media (max-width: 900px) {
  .meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-left {
    flex-wrap: wrap;
  }

  .helper-text {
    text-align: left;
    white-space: normal;
  }
}

@media (min-width: 768px) {
  .card {
    background: rgba(255, 255, 255, 0.60);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

@media (min-width: 1024px) {
  .card {
    transform: translateX(-300px);
  }
}

.about-page .card,
.privacy-page .card,
.terms-page .card {
  margin-left: auto;
  margin-right: auto;
  transform: none;
}

.about-page .wrap,
.privacy-page .wrap,
.terms-page .wrap {
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.site-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.site-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .site-logo img {
    height: 30px;
  }
}
