/* ===================================================================
   Yoruneko Mint - Link in Bio (refined)
   テーマ変数（色はここだけ変えれば全体に反映されます）
=================================================================== */
:root {
  --font: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #f4f1ff;
  --surface: rgba(255, 255, 255, 0.72);
  --card: rgba(255, 255, 255, 0.66);
  --card-hover: rgba(255, 255, 255, 0.95);
  --border: rgba(120, 110, 160, 0.14);
  --text: #2b2740;
  --text-soft: #6d6885;
  --text-faint: #a7a2ba;
  --accent: #7c6cf5;
  --accent-2: #f06bb0;
  --accent-soft: rgba(124, 108, 245, 0.12);
  --ring: linear-gradient(135deg, #7c6cf5, #f06bb0 55%, #59c6f0);
  --shadow: 0 1px 2px rgba(40,30,80,.05), 0 18px 40px rgba(70,50,140,.10);
  --shadow-card: 0 1px 2px rgba(40,30,80,.04), 0 6px 18px rgba(70,50,140,.06);
}

/* リセットと基本設定 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 20px 64px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .5s ease, color .5s ease;
}

/* やわらかいメッシュグラデーション背景（.bg-video が無いときの背景）*/
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(42% 42% at 18% 22%, #dfe3ff 0%, transparent 60%),
    radial-gradient(46% 46% at 82% 18%, #ffe3f3 0%, transparent 60%),
    radial-gradient(50% 50% at 50% 92%, #e0f7ff 0%, transparent 62%);
  filter: blur(24px) saturate(120%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, -2%) scale(1.06); }
}

/* コンテナ（すりガラス風）*/
.container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 480px;
  margin: 0 auto 30px;
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 40px 28px 32px;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.container h1,
.container p,
.bio { text-align: center; }

.container h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: .01em; }

/* アバター（グラデーションのリング＋グロー）*/
.avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 8px auto 18px;
  border-radius: 50%;
  padding: 4px;
  background: var(--ring);
  box-shadow: 0 8px 24px rgba(124,108,245,.28);
  cursor: pointer;
}
.avatar-wrapper::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--ring);
  filter: blur(14px);
  opacity: .5;
  z-index: -1;
  animation: pulse 3.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .4; } 50% { opacity: .75; } }

.avatar {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  transition: opacity 0.8s ease;
}
.avatar.normal { opacity: 1; z-index: 1; }
.avatar.hover  { opacity: 0; z-index: 2; }
.avatar-wrapper:hover .avatar.normal { opacity: 0; }
.avatar-wrapper:hover .avatar.hover  { opacity: 1; }

/* プロフィール */
.bio {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-soft);
  margin: 12px auto 6px;
  max-width: 340px;
}

/* カテゴリボタン（ピル型）*/
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 20px;
  padding-top: 10px;
}
.category-buttons button {
  padding: 8px 16px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all .22s ease;
}
.category-buttons button:hover {
  color: var(--text);
  background: var(--card-hover);
  transform: translateY(-1px);
}
.category-buttons button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(124,108,245,.32);
}

/* カード（カード全体が1つのリンク）*/
.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  margin: 12px 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;        /* リンクの下線を消す */
  color: var(--text);           /* 文字色を継承 */
  transition: transform .22s cubic-bezier(.2,.7,.2,1), background .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .22s ease;
}
.card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  border-color: var(--accent-soft);
  box-shadow: 0 10px 28px rgba(124,108,245,.16);
}
.card:hover::before { opacity: 1; }

.card a {
  color: var(--text);
  text-decoration: none;
}

.card a:visited {
  color: var(--text);
}

.card a span {
  color: var(--text-soft);
}

/* アイコン（画像）*/
.icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
}

/* テキスト（タイトル＋説明）*/
.text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;                     /* ← タイトルと説明の間隔はここで調整 */
  min-width: 0;                 /* 長文の折り返しを安定化 */
}
.text strong {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
.text span {
  margin: 0;
  font-size: .85rem;
  color: var(--text-soft);
  line-height: 1.5;
}

/* フッター */
footer {
  text-align: center;
  font-size: .8rem;
  color: var(--text-faint);
  margin-top: 26px;
}

/* 背景動画 */
.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}
.bg-video.active { opacity: 1; }

/* ===== ダークモード ===== */
body.dark {
  --bg: #0d0b16;
  --surface: rgba(28, 25, 40, 0.62);
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.10);
  --text: #f3f1fb;
  --text-soft: rgba(243, 241, 251, 0.66);
  --text-faint: rgba(243, 241, 251, 0.40);
  --accent: #9a8bff;
  --accent-2: #ff86c2;
  --accent-soft: rgba(154, 139, 255, 0.16);
  --ring: linear-gradient(135deg, #9a8bff, #ff86c2 55%, #6dd4ff);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 20px 50px rgba(0,0,0,.55);
  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 8px 22px rgba(0,0,0,.4);
}
body.dark::before {
  background:
    radial-gradient(42% 42% at 18% 22%, #241a3d 0%, transparent 60%),
    radial-gradient(46% 46% at 82% 18%, #3a1533 0%, transparent 60%),
    radial-gradient(50% 50% at 50% 92%, #10283a 0%, transparent 62%);
}

/* 動きを抑える設定への配慮 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* スマホ対応 */
@media (max-width: 420px) {
  body { padding: 28px 14px 48px; }
  .container { padding: 34px 20px 28px; border-radius: 24px; }
  .container h1 { font-size: 1.35rem; }
}