/* ── リセット・ベース ─────────────────────────── */
.sf-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #e0e0e0;
}

/* ── ログイン画面 ──────────────────────────────── */
.sf-login {
  text-align: center;
  padding: 80px 20px;
}

.sf-title {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.sf-subtitle {
  font-size: 1.1rem;
  color: #9e9e9e;
  margin-bottom: 40px;
}

/* ── Steam連携画面 ─────────────────────────────── */
.sf-connect {
  text-align: center;
  padding: 60px 20px;
}

.sf-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.sf-connect p {
  color: #9e9e9e;
  margin-bottom: 32px;
}

/* ── ボタン ────────────────────────────────────── */
.sf-btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.sf-btn:hover {
  opacity: 0.85;
  text-decoration: none;
}

.sf-btn--primary {
  background: #1a9fff;
  color: #ffffff;
}

.sf-btn--steam {
  background: #1b2838;
  color: #c6d4df;
  border: 1px solid #4c6b7e;
}

/* ── エラー画面 ────────────────────────────────── */
.sf-error {
  text-align: center;
  padding: 60px 20px;
}

.sf-error-msg {
  color: #ff6b6b;
  margin-bottom: 24px;
  font-size: 1rem;
}

/* ── ダッシュボード ──────────────────────────────── */
.sf-dashboard {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

/* ── ゲーマー名刺（800×800px） ──────────────────── */
.sf-wrap .sf-namecard,
.sf-namecard {
  width: 800px;
  height: 800px;
  background: linear-gradient(160deg, #0d1b2a 0%, #1b2838 50%, #1e3448 100%) !important;
  border: 1px solid #4c6b7e !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex !important;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 36px 40px 32px !important;
  box-sizing: border-box;
  color: #e0e0e0 !important;
}

/* 背景装飾ライン */
.sf-namecard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #1a9fff, #66c0f4, #1a9fff, transparent);
}

/* ── ヘッダー ─────────────────────────────────── */
.sf-namecard__header {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 28px;
}

.sf-namecard__brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #66c0f4;
}

.sf-namecard__tagline {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4c6b7e;
}

/* ── アバター + レベルバッジ ──────────────────── */
.sf-namecard__avatar-wrap {
  position: relative;
  margin-bottom: 20px;
}

.sf-namecard__avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 3px solid #66c0f4;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(102, 192, 244, 0.3);
}

.sf-namecard__level-badge {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #1a9fff, #0d6eaa);
  border: 2px solid #0d1b2a;
  border-radius: 20px;
  padding: 3px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  min-width: 56px;
}

.sf-namecard__level-num {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.sf-namecard__level-lbl {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.7);
}

/* ── プレイヤー名 ─────────────────────────────── */
.sf-namecard__name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #c6d4df;
  margin: 16px 0 6px;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 称号 ─────────────────────────────────────── */
.sf-namecard__title {
  font-size: 0.9rem;
  color: #8f98a0;
  margin: 0 0 20px;
  font-style: italic;
  text-align: center;
}

.sf-namecard__title--empty {
  color: #4c6b7e;
}

/* ── 統計 ─────────────────────────────────────── */
.sf-namecard__stats {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
}

.sf-namecard__stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sf-namecard__stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #c6d4df;
  line-height: 1;
}

.sf-namecard__stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: #4c6b7e;
  text-transform: uppercase;
}

/* ── 仕切り線 ─────────────────────────────────── */
.sf-namecard__stats::after,
.sf-namecard__recent::before {
  display: none;
}

/* ── フッター（QR + VAC） ──────────────────────── */
.sf-namecard__footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(76, 107, 126, 0.4);
}

.sf-namecard__qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sf-namecard__qr-wrap canvas {
  border-radius: 6px;
  border: 1px solid #4c6b7e;
}

.sf-namecard__qr-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4c6b7e;
  margin: 0;
}

.sf-namecard__vac {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  opacity: 0.75;
}

.sf-namecard__vac-icon {
  font-size: 2rem;
  line-height: 1;
}

.sf-namecard__vac-label {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: #ff6b6b;
  text-transform: uppercase;
}

/* ── ローディング ──────────────────────────────── */
.sf-registering {
  text-align: center;
  padding: 60px 20px;
}

.sf-loading-msg {
  color: #9e9e9e;
}

/* ── レスポンシブ ──────────────────────────────── */
@media (max-width: 860px) {
  .sf-namecard {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 28px 24px 24px;
  }

  .sf-namecard__recent-list {
    flex-wrap: wrap;
  }

  .sf-namecard__recent-item {
    width: calc(50% - 8px);
  }

  .sf-namecard__recent-img {
    width: 100%;
    height: 60px;
  }
}
