/* LIGHT THEME */
:root {
  --bg: #f5f7fa;
  --text: #111;
  --card-bg: #fff;
  --primary: #6b6dde;
  --quick-buttons-bg: #e6e6e6;
  --quick-buttons-text: #000;
  --quick-buttons-hover-bg: #6b6dde;
  --muted: #374151;
  --calculate-button-bg-hover: #3f4096;
  --result: #181723;
  --result-bg: #d6d6d6;
}

/* DARK THEME */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c14;
    --text: #fff;
    --card-bg: #10101a;
    --primary: #6b6dde;
    --quick-buttons-bg: #212038;
    --quick-buttons-text: #fff;
    --quick-buttons-hover-bg: #3f4096;
    --muted: #5b6179;
    --calculate-button-bg-hover: #3f4096;
    --result: #181723;
    --result-bg: #5b6179;
  }
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

.container {
  margin: 20px 0px;
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  width: 100%;
  animation: fadeIn 0.4s ease;
}

h1 {
  font-family: "Story Script", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 65px;
  color: var(--primary);
  text-align: center;
  margin: 0 auto 0 auto;
}

.slogan {
  margin: 0 auto 20px auto;
  text-align: center;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: none;
  transition: border 0.2s ease, background 0.3s, color 0.3s;
  background: var(--card-bg);
  color: var(--text);
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0px;
}

.quick-buttons button {
  flex: 1;
  padding: 8px;
  font-size: 14px;
  background: var(--quick-buttons-bg);
  border-radius: 4px;
  border: none;
  color: var(--quick-buttons-text);
  cursor: pointer;
  transition: background 0.2s;
}

.quick-buttons button:hover {
  background: var(--quick-buttons-hover-bg);
}

.btn-group {
  display: flex;
  width: 100%;
  gap: 10px;
}

button {
  margin-top: 18px;
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:active {
  transform: scale(0.98);
}

#calculateBtn {
  flex: 8;
}

#clearBtn {
  color: #fff;
  flex: 2;
  background: #EE4266;
}

#clearBtn:hover {
  background: red;
}

#calculateBtn:hover {
  background: var(--calculate-button-bg-hover);
}

.result {
  margin-top: 24px;
  padding: 16px;
  background: var(--result-bg);
  border-radius: 4px;
  font-size: 15px;
  animation: fadeInUp 0.4s ease;
  color: var(--text);
}

.result p {
  margin: 6px 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}