/* ===========================
   ケーキテーマ - Tama Profile
   カラーパレット: Dark Romantic Cake
   =========================== */

:root {
  --navy: #1B2A4A;
  --navy-deep: #0F1B33;
  --navy-light: #253A5E;
  --chocolate: #3D1C0E;
  --chocolate-light: #6B3420;
  --cream: #F5E6C8;
  --cream-light: #FFF9F0;
  --cream-muted: #E8D5B0;
  --rose-red: #C0392B;
  --rose-light: #E74C3C;
  --rose-deep: #922B21;
  --gold: #D4A853;
  --gold-light: #E8C06B;
  --white: #FFFFFF;
  --text-primary: #F5E6C8;
  --text-secondary: #C9A87C;
  --text-muted: #8B7355;
  --border-gold: rgba(212, 168, 83, 0.4);
  --border-cream: rgba(245, 230, 200, 0.2);

  --font-display: 'Playfair Display', 'Cormorant Garamond', serif;
  --font-body: 'Noto Sans JP', 'Cormorant Garamond', serif;
  --font-accent: 'Cormorant Garamond', serif;
}

/* リセット */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--navy-deep);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(192, 57, 43, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(212, 168, 83, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(27, 42, 74, 0.9) 0%, var(--navy-deep) 100%);
  font-family: var(--font-body);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  padding: 20px 16px 60px;
  position: relative;
  overflow-x: hidden;
}

/* ===========================
   背景パーティクル
   =========================== */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  font-size: 12px;
  opacity: 0.15;
  animation: floatParticle linear infinite;
  color: var(--gold);
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.15;
  }

  90% {
    opacity: 0.15;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* ===========================
   メインコンテナ
   =========================== */
.container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ===========================
   プロフィールヘッダー
   =========================== */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-top: 8px;
}

/* アバター */
.avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 4px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(var(--rose-red) 0deg,
      var(--gold) 90deg,
      var(--cream) 180deg,
      var(--gold) 270deg,
      var(--rose-red) 360deg);
  animation: spinRing 8s linear infinite;
}

@keyframes spinRing {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.avatar-frame {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy);
  border: 2px solid var(--navy-deep);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--chocolate));
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--gold);
}

.avatar-decoration {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  background: var(--rose-red);
  border-radius: 50%;
  border: 2px solid var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.avatar-decoration::after {
  content: '🌹';
  font-size: 12px;
}

/* プロフィールテキスト */
.profile-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgba(212, 168, 83, 0.4);
  margin-top: 2px;
}

.profile-handle {
  font-family: var(--font-accent);
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.profile-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  line-height: 1.6;
}

/* 上部SNSアイコン */
.social-icons-top {
  display: flex;
  gap: 16px;
  margin: 4px 0;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(245, 230, 200, 0.08);
  border: 1px solid var(--border-cream);
  color: var(--text-secondary);
  transition: all 0.3s ease;
  text-decoration: none;
}

.icon-link:hover {
  background: rgba(212, 168, 83, 0.2);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
}

.icon-svg {
  width: 16px;
  height: 16px;
}

.profile-bio {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
  letter-spacing: 0.03em;
  max-width: 300px;
}

/* ===========================
   メインバナー
   =========================== */
.banner-section {
  width: 100%;
  position: relative;
}

.banner-frame {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow:
    0 0 0 1px rgba(212, 168, 83, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(192, 57, 43, 0.05);
  background: var(--navy);
}

.banner-img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
}

.banner-frame:hover .banner-img {
  transform: scale(1.02);
}

.banner-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 280px;
  background: linear-gradient(135deg, var(--navy), var(--chocolate));
  color: var(--cream);
  gap: 12px;
}

.fallback-cake {
  font-size: 80px;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      transparent 60%,
      rgba(15, 27, 51, 0.3) 100%);
  pointer-events: none;
}

/* バナーコーナー装飾 */
.banner-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  z-index: 2;
}

.banner-corner::before,
.banner-corner::after {
  content: '';
  position: absolute;
  background: var(--gold);
}

.banner-corner::before {
  width: 100%;
  height: 2px;
}

.banner-corner::after {
  width: 2px;
  height: 100%;
}

.corner-tl {
  top: 8px;
  left: 8px;
}

.corner-tr {
  top: 8px;
  right: 8px;
  transform: scaleX(-1);
}

.corner-bl {
  bottom: 8px;
  left: 8px;
  transform: scaleY(-1);
}

.corner-br {
  bottom: 8px;
  right: 8px;
  transform: scale(-1);
}

/* スパークル */
.banner-sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  color: var(--gold);
  font-size: 18px;
  animation: sparkleAnim 3s ease-in-out infinite;
  opacity: 0.6;
}

.s1 {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.s2 {
  top: 15%;
  right: 8%;
  animation-delay: 0.8s;
}

.s3 {
  bottom: 20%;
  left: 8%;
  animation-delay: 1.6s;
}

.s4 {
  bottom: 15%;
  right: 5%;
  animation-delay: 2.4s;
}

@keyframes sparkleAnim {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8) rotate(0deg);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.2) rotate(20deg);
  }
}

/* ===========================
   リンクグリッド
   =========================== */
.links-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(245, 230, 200, 0.04);
  border: 1px solid var(--border-cream);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(212, 168, 83, 0.06));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-card:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
  transform: translateY(-3px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(212, 168, 83, 0.3),
    inset 0 0 20px rgba(212, 168, 83, 0.05);
}

.link-card:hover::before {
  opacity: 1;
}

.link-card:hover .link-card-icon {
  color: var(--gold);
}

.link-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.link-card-icon svg {
  width: 22px;
  height: 22px;
}

.link-card-label {
  font-family: var(--font-accent);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

/* BOOTH カード */
.booth-card {
  border-color: rgba(192, 57, 43, 0.3);
}

.booth-card:hover {
  border-color: var(--rose-light);
  background: rgba(192, 57, 43, 0.1);
}

.booth-text-icon {
  font-family: var(--font-accent);
  font-size: 11px;
  font-weight: 700;
  color: currentColor;
  letter-spacing: 0.05em;
}

/* Pixiv カード */
.pixiv-card:hover {
  border-color: #0096fa;
  background: rgba(0, 150, 250, 0.08);
}

/* マシュマロカード（全幅） */
.marshmallow-card {
  grid-column: 1 / -1;
  border-color: rgba(255, 180, 200, 0.25);
  justify-content: flex-start;
}

.marshmallow-card:hover {
  border-color: rgba(255, 150, 180, 0.6);
  background: rgba(255, 150, 180, 0.08);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 150, 180, 0.25),
    inset 0 0 20px rgba(255, 150, 180, 0.04);
}

.marshmallow-card:hover .link-card-icon {
  color: #ffb4c8;
}

.marshmallow-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.marshmallow-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ===========================
   フッター
   =========================== */
.site-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.footer-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.footer-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-gold), transparent);
}

.footer-rose {
  font-size: 14px;
  opacity: 0.6;
}

.terms-link {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.terms-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer-copy {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.5;
  letter-spacing: 0.05em;
}

/* ===========================
   レスポンシブ
   =========================== */
@media (max-width: 380px) {
  .profile-name {
    font-size: 24px;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }

  .link-card {
    padding: 14px 16px;
  }
}

@media (min-width: 600px) {
  body {
    padding: 40px 20px 80px;
  }

  .container {
    max-width: 520px;
  }
}

/* ===========================
   スクロールバー
   =========================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--navy-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--border-gold);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ===========================
   アニメーション - ページロード
   =========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-header {
  animation: fadeInUp 0.6s ease 0.1s both;
}

.banner-section {
  animation: fadeInUp 0.6s ease 0.3s both;
}

.links-grid {
  animation: fadeInUp 0.6s ease 0.5s both;
}

.site-footer {
  animation: fadeInUp 0.6s ease 0.7s both;
}

/* リンクカードのスタッガー */
.link-card:nth-child(1) {
  animation: fadeInUp 0.5s ease 0.55s both;
}

.link-card:nth-child(2) {
  animation: fadeInUp 0.5s ease 0.65s both;
}

.link-card:nth-child(3) {
  animation: fadeInUp 0.5s ease 0.75s both;
}

.link-card:nth-child(4) {
  animation: fadeInUp 0.5s ease 0.85s both;
}

.link-card:nth-child(5) {
  animation: fadeInUp 0.5s ease 0.95s both;
}

.link-card:nth-child(6) {
  animation: fadeInUp 0.5s ease 1.05s both;
}

/* ===========================
   フリー素材規約セクション
   =========================== */
.terms-section {
  width: 100%;
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 28px 24px;
  background:
    linear-gradient(135deg,
      rgba(245, 230, 200, 0.03) 0%,
      rgba(61, 28, 14, 0.15) 100%);
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease 1.1s both;
}

/* 背景の薔薇装飾（疑似要素） */
.terms-section::before {
  content: '🌹';
  position: absolute;
  font-size: 120px;
  opacity: 0.04;
  bottom: -20px;
  right: -10px;
  pointer-events: none;
  line-height: 1;
}

/* タイトル行 */
.terms-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.terms-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px rgba(212, 168, 83, 0.3);
}

.terms-deco {
  color: var(--gold);
  font-size: 14px;
  opacity: 0.8;
}

/* 冒頭注記 */
.terms-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-cream);
}

.terms-note strong {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.terms-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* 2カラム */
.terms-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.terms-block {
  border-radius: 12px;
  padding: 14px 14px 16px;
  border: 1px solid transparent;
}

.terms-allow {
  background: rgba(212, 168, 83, 0.06);
  border-color: rgba(212, 168, 83, 0.25);
}

.terms-deny {
  background: rgba(192, 57, 43, 0.06);
  border-color: rgba(192, 57, 43, 0.25);
}

/* バッジ */
.terms-block-header {
  margin-bottom: 10px;
}

.terms-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-accent);
}

.allow-badge {
  background: rgba(212, 168, 83, 0.2);
  color: var(--gold-light);
  border: 1px solid rgba(212, 168, 83, 0.4);
}

.deny-badge {
  background: rgba(192, 57, 43, 0.2);
  color: var(--rose-light);
  border: 1px solid rgba(192, 57, 43, 0.4);
}

/* リスト */
.terms-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terms-allow .terms-list li::before {
  content: '◆ ';
  color: var(--gold);
  font-size: 8px;
  vertical-align: middle;
}

.terms-deny .terms-list li::before {
  content: '◆ ';
  color: var(--rose-red);
  font-size: 8px;
  vertical-align: middle;
}

.terms-list li {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* DMリンク文 */
.terms-contact {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.9;
  padding-top: 16px;
  border-top: 1px solid var(--border-cream);
}

.terms-dm-link {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 168, 83, 0.4);
  transition: all 0.3s ease;
  padding-bottom: 1px;
}

.terms-dm-link:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

/* ===========================
   規約 レスポンシブ
   =========================== */
@media (max-width: 380px) {
  .terms-columns {
    grid-template-columns: 1fr;
  }

  .terms-section {
    padding: 22px 16px;
  }
}