* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* TEMALAR */

body {
  --accent: #f472b6; /* sakura varsayılan */
  --accent-soft: rgba(244, 114, 182, 0.15);
  --accent-strong: rgba(244, 114, 182, 0.5);

  min-height: 100vh;
  background: radial-gradient(circle at top, var(--accent) 0, #020617 50%, #000 100%);
  background-size: 130% 130%;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  animation: pulse-bg 14s ease-in-out infinite;
}

body.theme-sakura {
  --accent: #f472b6;
  --accent-soft: rgba(244, 114, 182, 0.18);
  --accent-strong: rgba(236, 72, 153, 0.55);
}

body.theme-oak {
  --accent: #4ade80;
  --accent-soft: rgba(74, 222, 128, 0.2);
  --accent-strong: rgba(34, 197, 94, 0.55);
}

body.theme-plane {
  --accent: #bef264;
  --accent-soft: rgba(190, 242, 100, 0.2);
  --accent-strong: rgba(132, 204, 22, 0.55);
}

body.theme-pine {
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.2);
  --accent-strong: rgba(21, 128, 61, 0.55);
}

body.theme-olive {
  --accent: #a3e635;
  --accent-soft: rgba(163, 230, 53, 0.25);
  --accent-strong: rgba(77, 124, 15, 0.55);
}

body.theme-maple {
  --accent: #fb923c;
  --accent-soft: rgba(251, 146, 60, 0.25);
  --accent-strong: rgba(194, 12, 12, 0.55);
}

@keyframes pulse-bg {
  0%,
  100% {
    background-size: 125% 125%;
  }
  50% {
    background-size: 145% 145%;
  }
}

/* SARMAŞIKLAR */

.vine {
  position: fixed;
  bottom: 0;
  width: 10px;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(to top, #052e16, #15803d);
  box-shadow: 0 0 14px rgba(22, 163, 74, 0.6);
  transform-origin: bottom center;
  opacity: 0;
  transition: height 0.6s ease, opacity 0.6s ease, transform 0.6s ease;
  z-index: 0;
}

.vine-left {
  left: 20px;
  transform: rotate(-3deg);
}

.vine-right {
  right: 20px;
  transform: rotate(3deg);
}

.vine::before,
.vine::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at center, #22c55e 0, #14532d 90%);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.vine-left::before {
  left: -16px;
  top: 30%;
  transform: rotate(-25deg);
}

.vine-left::after {
  left: -18px;
  top: 65%;
  transform: rotate(-15deg);
}

.vine-right::before {
  right: -16px;
  top: 25%;
  transform: rotate(25deg);
}

.vine-right::after {
  right: -18px;
  top: 60%;
  transform: rotate(15deg);
}

/* UÇAN YAPRAKLAR */

.leaf-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.leaf {
  position: absolute;
  bottom: -40px;
  width: 14px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-soft);
  box-shadow: 0 0 8px var(--accent-strong);
  opacity: 0;
  animation-name: leaf-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes leaf-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(-120vh) translateX(-40px) rotate(360deg);
    opacity: 0;
  }
}

/* LAYOUT */

.wrapper {
  width: 100%;
  max-width: 980px;
  position: relative;
  z-index: 1;
}

.top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.top-left h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

.top-left p {
  font-size: 14px;
  color: #e2e8f0;
}

.clock {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 18px;
  background: rgba(15, 23, 42, 0.9);
  min-width: 110px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 20px;
}

.card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.card h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

/* FORM / TODO LIST */

.form-row {
  display: grid;
  grid-template-columns: 0.9fr 2.1fr 1.2fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.field label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: #9ca3af;
}

.input-time,
.input-text,
.input-select {
  border-radius: 10px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  padding: 8px 10px;
  font-size: 14px;
}

.input-time {
  text-align: center;
}

.input-time::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.input-time:focus,
.input-text:focus,
.input-select:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.input-text::placeholder {
  color: #6b7280;
}

.field-grow {
  width: 100%;
}

.field-button label {
  visibility: hidden;
}

.btn-primary {
  width: 100%;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #22c55e);
  color: #020617;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, opacity 0.1s ease;
}

.btn-primary:hover {
  opacity: 0.97;
  transform: translateY(-1px);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.filter-row label {
  color: #9ca3af;
}

.filter-row .input-select {
  width: 150px;
  font-size: 13px;
}

.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.todo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: flex-start;
  background: #020617;
  border-radius: 12px;
  border: 1px solid #1f2937;
  padding: 8px 10px;
  animation: todo-pop 0.2s ease-out;
}

@keyframes todo-pop {
  0% {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.todo-item.is-completed {
  opacity: 0.9;
  border-color: rgba(34, 197, 94, 0.6);
}

.todo-time-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #f9a8d4;
  align-self: center;
}

.todo-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.todo-category-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  align-self: flex-start;
}

.category-general {
  background: rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
}

.category-study {
  background: rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
}

.category-work {
  background: rgba(249, 115, 22, 0.25);
  color: #fed7aa;
}

.category-health {
  background: rgba(52, 211, 153, 0.25);
  color: #a7f3d0;
}

.category-personal {
  background: rgba(244, 114, 182, 0.25);
  color: #f9a8d4;
}

.todo-text {
  font-size: 14px;
  cursor: pointer;
}

.todo-text.completed {
  text-decoration: line-through;
  color: #64748b;
}

.delete-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  cursor: pointer;
  transition: background 0.1s ease;
}

.delete-btn:hover {
  background: rgba(248, 113, 113, 0.3);
}

.hint {
  margin-top: 10px;
  font-size: 12px;
  color: #94a3b8;
}

/* SUMMARY */

.summary-card {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  font-size: 12px;
  display: grid;
  gap: 4px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
}

/* TREE PANEL */

.tree-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.tree-selector select {
  background: #020617;
  border-radius: 8px;
  border: 1px solid #1e293b;
  color: #e5e7eb;
  padding: 6px 10px;
  font-size: 13px;
}

.tree-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.tree-circle {
  width: 170px;
  height: 170px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, var(--accent), #14532d);
  box-shadow: 0 15px 35px var(--accent-strong);
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    background 0.3s ease;
  overflow: hidden;
}

/* SVG TREE ICON CONTAINER */

.tree-icon {
  width: 70%;
  height: 70%;
}

.tree-icon svg {
  width: 100%;
  height: 100%;
}

/* Ağaç tipine göre farklı crown/gövde renkleri */

.tree-icon--sakura svg .crown {
  fill: #f9a8d4;
}

.tree-icon--sakura svg .crown-shadow {
  fill: #f472b6;
}

.tree-icon--oak svg .crown {
  fill: #86efac;
}

.tree-icon--oak svg .crown-shadow {
  fill: #16a34a;
}

.tree-icon--plane svg .crown {
  fill: #facc15;
}

.tree-icon--plane svg .crown-shadow {
  fill: #65a30d;
}

.tree-icon--pine svg .crown {
  fill: #bbf7d0;
}

.tree-icon--pine svg .crown-shadow {
  fill: #15803d;
}

.tree-icon--olive svg .crown {
  fill: #d9f99d;
}

.tree-icon--olive svg .crown-shadow {
  fill: #4d7c0f;
}

.tree-icon--maple svg .crown {
  fill: #fed7aa;
}

.tree-icon--maple svg .crown-shadow {
  fill: #fb923c;
}

.tree-label {
  margin-top: 14px;
  font-size: 13px;
  color: #e5e7eb;
  text-align: center;
  min-height: 34px; /* ağaç büyüyünce bile yazı kaybolmasın */
}

/* growth stages – scale değerleri yumuşak */

.stage-0 {
  transform: scale(0.75);
  filter: grayscale(0.4);
}

.stage-1 {
  transform: scale(0.82);
}

.stage-2 {
  transform: scale(0.9);
}

.stage-3 {
  transform: scale(0.98);
}

.stage-4 {
  transform: scale(1.05);
}

.stage-5 {
  transform: scale(1.1);
}

.stage-6 {
  transform: scale(1.15);
  box-shadow: 0 22px 55px var(--accent-strong);
}

/* PROGRESS */

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #020617;
  border: 1px solid #1e293b;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  transition: width 0.3s ease;
}

.progress-text {
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

/* WEATHER CARD */

.weather-card {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.35), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(129, 140, 248, 0.5);
}

.weather-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.weather-header span:first-child {
  color: #e5e7eb;
}

.weather-header span:last-child {
  color: #c7d2fe;
}

.weather-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weather-temp-block {
  display: flex;
  flex-direction: column;
}

.weather-temp {
  font-size: 26px;
  font-weight: 600;
}

.weather-desc {
  font-size: 13px;
  color: #cbd5f5;
}

.weather-icon-wrap {
  width: 48px;
  height: 48px;
}

.weather-icon-wrap img {
  width: 100%;
  height: 100%;
}

.weather-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
}

/* ORMAN */

.forest {
  margin-top: 26px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 40px;
}

.forest-tree {
  width: 36px;
  height: 36px;
  animation: forest-pop 0.3s ease-out;
}

@keyframes forest-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* RESPONSIVE */

@media (max-width: 800px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-right {
    width: 100%;
    display: flex;
    justify-content: flex-start;
  }
}

/* LEVEL UP TOAST – seviye atlama bildirimi */

#level-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  border-radius: 999px;
  background: radial-gradient(circle at top, var(--accent), #16a34a);
  color: #020617;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(248, 250, 252, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}

#level-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Summary içindeki uzun badge listeleri daha rahat gözüksün */

.summary-row span:last-child {
  text-align: right;
  max-width: 70%;
  word-wrap: break-word;
}

