/* ── Variables & Reset ── */
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Quicksand:wght@300..700&display=swap");

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242836;
  --border: #2e3345;
  --text: #e8eaed;
  --text-muted: #8b8fa3;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --green: #00b894;
  --green-bg: rgba(0, 184, 148, 0.12);
  --red: #ff6b6b;
  --red-bg: rgba(255, 107, 107, 0.12);
  --yellow: #feca57;
  --yellow-bg: rgba(254, 202, 87, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* ── Scrollbars ── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--surface2);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border);
  border: 3px solid transparent;
  background-clip: padding-box;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface2) var(--bg);
}

body {
  min-height: 100vh;
}

body,
button,
input,
select,
textarea {
  font-family:
    "Quicksand",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1,
h2,
h3,
h4,
.section-title,
.summary-amount,
.sidebar-logo-name {
  font-family: "Fredoka", sans-serif;
}

/* ── Logo button (sidebar toggle) ── */
.logo-btn {
  position: relative;
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.logo-btn:hover {
  border-color: var(--accent);
}
.logo-btn:active {
  transform: scale(0.92);
}

/* ── Logo ── */
.header-logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(108, 92, 231, 0.4));
  animation:
    rainbow-glow 4s linear infinite,
    bee-flip 10s ease-in-out infinite;
}

/* ── Speech bubble ── */
.logo-speech {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  z-index: 200;
  animation: speech-show 3.8s ease forwards;
}
/* Left-pointing arrow */
.logo-speech::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-right-color: var(--border);
}
.logo-speech::after {
  content: "";
  position: absolute;
  right: calc(100% - 1px);
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--surface);
}
@keyframes speech-show {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(-4px);
  }
  12% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes rainbow-glow {
  0% {
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.5));
  }
  16% {
    filter: drop-shadow(0 0 6px rgba(255, 165, 0, 0.5));
  }
  33% {
    filter: drop-shadow(0 0 6px rgba(255, 255, 0, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(0, 200, 0, 0.5));
  }
  66% {
    filter: drop-shadow(0 0 6px rgba(0, 150, 255, 0.5));
  }
  83% {
    filter: drop-shadow(0 0 6px rgba(180, 0, 255, 0.5));
  }
  100% {
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.5));
  }
}
@keyframes bee-flip {
  0%,
  90% {
    transform: scaleX(1);
  }
  95% {
    transform: scaleX(-1);
  }
  100% {
    transform: scaleX(1);
  }
}

/* ── Utility ── */
.hidden {
  display: none !important;
}

/* ── Privacy / Blur Mode ── */
.blurrable {
  transition:
    filter 0.2s ease,
    opacity 0.2s ease;
}

body.blur-mode .blurrable {
  filter: blur(5px);
}

body.blur-mode .blurrable:hover {
  filter: blur(0);
}

/* For inputs */
body.blur-mode input.blurrable {
  color: transparent !important;
  text-shadow: 0 0 5px var(--text);
}
body.blur-mode input.blurrable:focus,
body.blur-mode input.blurrable:hover {
  color: var(--text) !important;
  text-shadow: none;
}

/* Privacy Toggle Button (Circle in Circle) */
.privacy-btn {
  background: none;
  border: 2px solid white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  position: relative;
}
.privacy-btn::after {
  content: "";
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transition: all 0.2s;
  filter: blur(2px);
}

body.blur-mode .privacy-btn {
  border-color: white;
  background: none;
}
body.blur-mode .privacy-btn::after {
  background: white;
  filter: blur(0);
}
body.blur-mode .privacy-btn:hover {
  transform: scale(1.1);
}
