/* --- 1. 全体初期化・ベース設定 --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  overflow-x: hidden;
}

/* 𝕏内蔵ブラウザ対策：横揺れ・強制拡大防止 */
html {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-x: hidden !important;
  overflow-y: auto;
  position: relative;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #ffffff;
  background-color: #08090c;
  
  /* 𝕏ブラウザでも絶対に崩れないグリッド中央指定 */
  display: grid;
  place-items: center;
}

/* メインコンテナ（中央揃え・幅制限） */
.container {
  width: 90%;
  max-width: 420px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 50px 20px 40px;
  text-align: center;
  z-index: 10;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
}


/* --- 2. プロフィール画像（白枠・丸型） --- */
.avatar-wrapper {
  position: relative;
  display: inline-block;
  width: 110px;
  height: 110px;
  min-width: 110px;
  min-height: 110px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 20px auto;
}

.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 1;
  display: block;
  transition: opacity 0.3s;
}

.avatar.loading {
  opacity: 0;
}


/* --- 3. 名前＆認証バッジ --- */
.name {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: none;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(0, 242, 254, 0.3);
}

.bio {
  font-size: 0.9rem;
  color: #a0a5b5;
  margin-bottom: 35px;
}


/* --- 4. リンクボタン --- */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 40px;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.link-card .icon {
  position: absolute;
  left: 20px;
  font-size: 1.2rem;
  color: #ffffff;
  transition: color 0.3s;
}

.link-card:hover {
  transform: translateY(-3px) scale(1.02);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(8, 201, 255, 0.2) 100%);
  border-color: rgba(0, 174, 254, 0.6);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
}

.link-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  transition: all 0.6s ease;
}

.link-card:hover::after {
  left: 130%;
}


/* --- 5. お問い合わせフォーム --- */
.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  color: #ffffff;
  font-weight: 700;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 0.95rem;
  font-family: inherit;
  backdrop-filter: blur(8px);
  outline: none;
  transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #00cbfe;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.submit-btn {
  width: 100%;
  cursor: pointer;
  margin-top: 10px;
  border: none;
}

.cf-turnstile {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 10px 0;
}


/* --- 6. モーダル類 --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 242, 254, 0.3);
  border-radius: 24px;
  padding: 30px 24px;
  width: 85%;
  max-width: 400px;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
}

/* モーダルの外枠（相対配置の基準点にする） */
.modal-content {
  position: relative; /* これにより×ボタンの位置基準がこの枠内になります */
  /* 既存の背景色やpaddingなどはそのまま */
}

/* 閉じる（×）ボタンの見た目と配置調整 */
.modal-close {
  position: absolute;
  top: 15px;            /* 上からの位置 */
  right: 20px;          /* 右からの位置 */
  font-size: 1.8rem;    /* サイズを大きめに変更（約28px） */
  font-weight: bold;
  color: #ffffff;       /* 文字色 */
  cursor: pointer;
  line-height: 1;
  padding: 5px;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}

/* ホバー時の効果 */
.modal-close:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-icon { font-size: 3rem; margin-bottom: 12px; }
.success-color { color: #00befe; }
.error-color { color: #ff0844; }
.modal-title { font-size: 1.3rem; font-weight: 700; color: #ffffff; margin-bottom: 8px; }
.modal-message { font-size: 0.88rem; color: #a0a5b5; line-height: 1.5; margin-bottom: 24px; }
.modal-btn { width: 100%; padding: 12px; font-size: 0.95rem; cursor: pointer; }

/* --- 7. スクロールバー・アニメーション --- */
.footer { font-size: 0.8rem; color: #a0a5b5; }

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards ease-out;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.15) 37%, rgba(255, 255, 255, 0.05) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}


/* --- 8. カスタムカーソル（PCのみ） --- */
@media (pointer: fine) {
  body { cursor: none; }
  a, button, input, textarea, .avatar, .modal-close, .link-card { cursor: none !important; }

  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #00c7fe;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 0 10px rgba(5, 205, 255, 0.8);
  }

  .custom-cursor.is-visible { opacity: 1; }
  .custom-cursor.is-hidden { opacity: 0 !important; }

  .custom-cursor.hovered {
    width: 44px;
    height: 44px;
    background-color: rgba(0, 242, 254, 0.15);
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(5, 205, 255, 0.8);
  }
}

@media (pointer: coarse) {
  .custom-cursor { display: none !important; }
}

/* Turnstileウィジェット枠の余計な線消去＆デザイン調整 */
.cf-turnstile {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 15px 0;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* 内部のiframeに発生する下線・枠線を強力にクリア */
.cf-turnstile iframe {
  border: none !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: bottom; /* 下部の余白スキマ線を排除 */
}

/* 「ぷにゅっ」と弾むキーフレームアニメーション */
@keyframes punyu {
  0% { transform: scale(1, 1); }
  25% { transform: scale(0.85, 1.15); } /* 横に縮んで縦に伸びる */
  50% { transform: scale(1.15, 0.85); } /* 縦に縮んで横に伸びる */
  75% { transform: scale(0.95, 1.05); } /* 少し戻る */
  100% { transform: scale(1, 1); }      /* 元通り */
}

/* アニメーション適用用クラス */
.punyu-anim {
  animation: punyu 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* タップ時の水色枠（ハイライト）を消去 */
* {
  -webkit-tap-highlight-color: transparent;
}