@charset "UTF-8";

/* ベースカラーをCSS変数で定義 */
:root {
  --bg-main: #0f0f14;
  --bg-card: #1a1a24;

  --accent-main: #ff4fa3;
  --accent-soft: #ff7bbb;

  --text-main: #e6e6eb;
  --text-sub: #b5b5c6;

  --border-soft: #2a2a38;
}

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

.app-header {
    position: relative;
    margin-bottom: 24px;
}

.header-row {
  display: flex;
  align-items: center;
}

.header-center {
  text-align: center;
}

body {
  margin: 0;
  padding: 0 32px;
  min-height: 100vh;
  font-family: "Baloo 2", "M PLUS Rounded 1c", sans-serif;
  background: radial-gradient(
    circle at top,
    #1a0f1f 0%,
    var(--bg-main) 45%
  );
  color: var(--text-main);
}

/* 支出を登録：各入力項目の間隔 */
.form-row {
  display: flex;
  align-items: center;
  gap: 8px;        /* ラベルと入力欄の間 */
  margin-bottom: 10px; /* ← 項目同士の縦の間隔 */
}

#app {
  width: 100%;
  max-width: 820px; /* PC */
  margin: 0 auto;
  padding: 24px;
}

@media (max-width: 600px) {
  body {
    padding: 0 12px;
  }
  .controls-card {
    flex-direction: column;
  }
  .title {
    font-size: 30px;
  }
}


.title {
  color: var(--accent-main);
  letter-spacing: 0.1em;
   text-shadow: 0 0 6px color-mix(
    in srgb,
    var(--accent-main) 35%,
    transparent);
  font-size: 38px;
  margin-top: 0;
  margin-bottom: 0px;
  flex: 1;
  text-align: center;
}

.section-title { 
  margin-top: 0;
  margin-bottom: 12px;
}

.subtitle {
  color: var(--accent-soft);
  font-size: 14px;
   text-align: center;
   margin-top: 4px;
  opacity: 0.9;
  text-align: center;
}

.card {
  background: var(--bg-card);
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  padding: 24px 28px;
  padding-top: 20px;
}

.input-section,
.controls-section,
.list-section {
  margin: 0;
}

.input-section.card {
  padding: 32px;
}

input,
select {
  background: #0f0f18;
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  border-radius: 12px;
  padding: 10px 12px;
}

input::placeholder {
  color: #77779a;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--pink-main);
  box-shadow: 0 0 0 2px rgba(255, 79, 163, 0.25);
}

button {
  font-family: inherit;
}

.primary-btn {
  background: linear-gradient(135deg, #ff4fa3, #ff2f8e);
  color: #0f0f14;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 79, 163, 0.4);
}

.primary-btn:hover {
  filter: brightness(1.05);
}

/* トーストの基本形 */
.toast {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--pink-dark), var(--pink));
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: bold;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
  box-shadow: 0 6px 18px rgba(255, 111, 177, 0.5);
}

/* 表示状態 */
.toast.show {
  bottom: 30px;
  opacity: 1;
}

/* 金額入力（number）の上下矢印を消す（Chrome・Edge・Safari） */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox の矢印を消す */
input[type="number"] {
  appearance: textfield;
}

/* ===== オーバーレイ（背景暗くする） ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 7, 21, 0.6);
  backdrop-filter: blur(2px);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.show {
  opacity: 1;
}

/*カテゴリ編集パネル*/
.category-editor {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 350px;
  height: auto;
  background: var(--dark-gray);
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  transition: all 0.3s ease;
}

/* 表示時 */
.category-editor.show {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* 非表示用 */
.hidden {
  display: none;
}

/* ヘッダー */
.category-editor-header {
  background: linear-gradient(135deg, var(--pink-dark), var(--pink));
  border-radius: 20px 20px 0 0;
  padding: 12px 16px;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.category-editor-header button {
    color: #fff;
  opacity: 0.8;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.category-editor-header button:hover {
  opacity: 1;
}

/* ＋ボタン → ×に変わる */
.category-plus-btn.open {
  transform: rotate(45deg);
}

.category-add-box input,
.category-delete-box select {
  background: #111;
  color: #fff;
  border: 1px solid var(--pink-soft);
  border-radius: 999px;
  padding: 10px 14px;
}

.category-add-box input::placeholder {
  color: #aaa;
}

.category-add-box button,
.category-delete-box button {
  background: var(--pink);
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.category-add-box button:hover,
.category-delete-box button:hover {
  background: var(--pink-dark);
  transform: translateY(-2px);
}

.category-plus-btn {
  background: var(--bg-card);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  color: #ffffff;
  cursor: pointer;
  transition: 0.3s;
}

.category-plus-btn.open {
  background: var(--black);
  transform: rotate(90deg);
}


.about-link {
  color: var(--accent-soft);
  font-size: 24px;
  text-decoration: none;
}

.about-link:hover {
  text-decoration: underline;
}

.about-page #app {
  padding-top: 10px;
}

.about-page.title {
  color: var(--accent-main);
  letter-spacing: 0.1em;
  text-shadow: 0 0 6px rgba(255, 79, 163, 0.35);
  font-size: 38px;
  margin-top: 0;
  margin-bottom: 0px;
  flex: 1;
  text-align: center;
}