@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  --bg-1: #0b0715;
  --bg-2: #170b2e;
  --bg-3: #1c0f3a;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --item-bg: rgba(255, 255, 255, 0.06);
  --item-bg-hover: rgba(255, 255, 255, 0.1);
  --text: #f5f0ff;
  --muted: #9d8fc0;
  --pink: #ff3ec8;
  --purple: #8b5cf6;
  --cyan: #22e5e5;
  --gold: #ffd166;
  --danger: #ff5c7a;
  --done: #6f6389;
  --grad-main: linear-gradient(135deg, var(--pink), var(--purple) 55%, var(--cyan));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 62, 200, 0.25), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(34, 229, 229, 0.18), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.25), transparent 50%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  background-attachment: fixed;
}

.app-header {
  padding: 32px 24px 20px;
  text-align: center;
}

.app-header h1 {
  margin: 0;
  font-family: "Baloo 2", "Noto Sans JP", sans-serif;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: 1px;
  background: var(--grad-main);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 62, 200, 0.45));
  animation: shine 6s ease-in-out infinite;
}

.app-header .subtitle {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--muted);
  text-transform: uppercase;
}

@keyframes shine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 20px 70px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.card h2 {
  margin-top: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-main);
  box-shadow: 0 0 10px var(--pink);
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 62, 200, 0.12), rgba(139, 92, 246, 0.12) 50%, rgba(34, 229, 229, 0.1));
}

.stats-row {
  display: flex;
  gap: 16px;
  justify-content: space-around;
  text-align: center;
}

.stat {
  flex: 1;
  padding: 6px 10px;
}

.stat-value {
  font-family: "Baloo 2", sans-serif;
  font-size: 38px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 62, 200, 0.4));
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 1px;
}

.latest-reflection {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
}

.latest-reflection-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}

.latest-reflection-week {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.latest-reflection-comment {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media (max-width: 720px) {
  .columns {
    grid-template-columns: 1fr;
  }
  .dashboard {
    flex-direction: column;
    gap: 14px;
  }
  .app-header h1 {
    font-size: 26px;
  }
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  color-scheme: dark;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 62, 200, 0.2);
}

.field-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
  margin-bottom: -4px;
}

button[type="submit"] {
  align-self: flex-start;
  background: var(--grad-main);
  background-size: 200% 200%;
  color: #140626;
  border: none;
  padding: 11px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 62, 200, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background-position 0.4s;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.5);
  background-position: 100% 50%;
}

button[type="submit"]:active {
  transform: translateY(0);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.list::-webkit-scrollbar {
  width: 8px;
}

.list::-webkit-scrollbar-thumb {
  background: var(--grad-main);
  border-radius: 8px;
}

.list::-webkit-scrollbar-track {
  background: transparent;
}

.list:empty::after {
  content: "まだ登録されていません";
  color: var(--muted);
  font-size: 13px;
}

.item {
  background: var(--item-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--pink);
  border-radius: 12px;
  padding: 14px 16px;
  transition: background 0.15s, transform 0.15s;
}

.item:hover {
  background: var(--item-bg-hover);
  transform: translateX(2px);
}

.memo-item {
  border-left-color: var(--cyan);
}

.memo-item .memo-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.memo-item .memo-body {
  white-space: pre-wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.item-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left-color: var(--purple);
}

.task-item.done {
  border-left-color: var(--done);
  opacity: 0.6;
}

.task-item.done .task-title {
  text-decoration: line-through;
  color: var(--done);
}

.task-item input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--purple);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.task-item input[type="checkbox"]:checked {
  background: var(--grad-main);
  border-color: transparent;
}

.task-item input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #140626;
  font-size: 13px;
  font-weight: 800;
}

.task-main {
  flex: 1;
}

.task-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(34, 229, 229, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(34, 229, 229, 0.35);
  margin-left: 6px;
}

.badge.done {
  background: rgba(255, 255, 255, 0.06);
  color: var(--done);
  border-color: rgba(255, 255, 255, 0.12);
}

.icon-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.15s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.icon-btn.delete {
  color: var(--danger);
  border-color: rgba(255, 92, 122, 0.3);
}

.icon-btn.delete:hover {
  background: rgba(255, 92, 122, 0.15);
  box-shadow: 0 0 12px rgba(255, 92, 122, 0.3);
}

.reflection-item {
  border-left-color: var(--gold);
}

.reflection-item .reflection-week {
  font-weight: 700;
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 6px;
}

.reflection-item .reflection-comment {
  white-space: pre-wrap;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.6;
}
