/* =============================================
   Xマネーナビ - base.css
   Xブランド: ブラック × ゴールドアクセント
   ============================================= */

/* === CSS変数 === */
:root {
  --accent-primary:   #c8a961;    /* Xゴールド */
  --accent-secondary: #1d9bf0;    /* X Blue (旧Twitter) */
  --accent-warning:   #f59e0b;
  --accent-danger:    #ef4444;
  --accent-hover:     #b8943f;

  --bg-primary:   #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-surface:   #f1f3f5;
  --bg-hover:     #e9ecef;

  --text-primary:   #111827;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;
  --text-inverse:   #ffffff;

  --border-color:  #e5e7eb;
  --border-radius: 8px;
  --radius-sm:     4px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.15);

  --font-sans:  'LINE Seed JP', 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --font-mono:  'JetBrains Mono', 'Cascadia Code', monospace;

  --container:  1140px;
  --header-h:   64px;
  --sidebar-w:  280px;
  --transition: 0.2s ease;
}

/* === ダークモード === */
[data-theme="dark"] {
  --accent-primary:   #dbbe6e;
  --accent-hover:     #e8cf8a;
  --bg-primary:   #0a0a0a;
  --bg-secondary: #141414;
  --bg-surface:   #1f1f1f;
  --bg-hover:     #2a2a2a;

  --text-primary:   #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted:     #6b7280;

  --border-color: #2a2a2a;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.5);
}

/* === リセット === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul, ol { list-style: none; }
button { font-family: var(--font-sans); cursor: pointer; }
input, textarea, select { font-family: var(--font-sans); }

/* === コンテナ === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (max-width: 768px) { .container { padding: 0 16px; } }

/* =============================================
   ヘッダー
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.92);
}
.site-header .container { height: 100%; }
[data-theme="dark"] .site-header {
  background: rgba(10,10,10,.92);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.site-logo .logo-x {
  background: #000;
  color: #fff;
  font-size: .85rem;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: -.02em;
}
[data-theme="dark"] .site-logo .logo-x {
  background: #fff;
  color: #000;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.header-nav a {
  color: var(--text-secondary);
  font-size: .9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.header-nav a:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}
.header-theme-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  transition: background var(--transition);
}
.header-theme-btn:hover { background: var(--bg-surface); }

/* ハンバーガー */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  color: var(--text-primary);
}
@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger-btn { display: flex; }
}

/* ドロワー */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--bg-primary);
  z-index: 201;
  padding: 24px;
  overflow-y: auto;
  transition: right .3s ease;
}
.drawer.open { right: 0; }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 4px;
}
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  font-size: .95rem;
}

/* =============================================
   フッター
   ============================================= */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand .site-logo { font-size: 1rem; margin-bottom: 12px; }
.footer-brand p { font-size: .85rem; color: var(--text-secondary); line-height: 1.6; }
.footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a {
  font-size: .875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent-primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: .8rem;
  color: var(--text-muted);
}
@media (max-width: 480px) {
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: var(--text-muted); }
.footer-bottom-links a:hover { color: var(--text-secondary); }

/* =============================================
   トップへ戻る
   ============================================= */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 44px;
  height: 44px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, transform .3s;
}
.scroll-top-btn.visible { opacity: 1; visibility: visible; }
.scroll-top-btn:hover { transform: translateY(-2px); }
.scroll-top-btn i { width: 20px; height: 20px; }

/* =============================================
   ボタン
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary { background: var(--text-primary); color: var(--bg-primary); }
.btn-primary:hover { opacity: .85; color: var(--bg-primary); }
.btn-accent { background: var(--accent-primary); color: #000; }
.btn-accent:hover { background: var(--accent-hover); color: #000; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,169,97,.3); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; color: #fff; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }

/* =============================================
   バッジ
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 600;
}
.badge-gold { background: rgba(200,169,97,.12); color: var(--accent-primary); }
.badge-blue { background: rgba(29,155,240,.1); color: var(--accent-secondary); }
.badge-gray { background: var(--bg-surface); color: var(--text-secondary); }

/* =============================================
   Toast
   ============================================= */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--border-radius);
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform .3s ease;
  min-width: 280px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.show { transform: translateX(0); }
.toast-success { background: #f0fdf4; color: #166534; }
.toast-error   { background: #fef2f2; color: #991b1b; }
.toast-info    { background: #eff6ff; color: #1e40af; }

/* =============================================
   パンくず
   ============================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding: 12px 0;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent-primary); }

/* =============================================
   アフィリエイトカード
   ============================================= */
.aff-card {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0;
  transition: border-color var(--transition);
}
.aff-card:hover { border-color: var(--accent-primary); }
.aff-card.recommended {
  border-color: var(--accent-primary);
  position: relative;
}
.aff-card.recommended::before {
  content: 'おすすめ No.1';
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--accent-primary);
  color: #000;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}
.aff-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.aff-card-rank {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
}
.aff-card-name {
  flex: 1;
  font-size: 1.2rem;
  font-weight: 700;
}
.aff-card-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 480px) {
  .aff-card-specs { grid-template-columns: 1fr; }
}
.aff-card-spec {
  text-align: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}
.aff-card-spec-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.aff-card-spec-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
}
.aff-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.aff-card-features li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  color: var(--text-secondary);
}
.aff-card-features li i { color: var(--accent-primary); width: 16px; height: 16px; }
.aff-card-actions { text-align: center; }
.aff-card-actions .btn { min-width: 240px; }

/* =============================================
   CTAセクション
   ============================================= */
.cta-section {
  background: linear-gradient(135deg, rgba(200,169,97,.06) 0%, rgba(29,155,240,.06) 100%);
  border: 1px solid rgba(200,169,97,.15);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 48px 0;
}
[data-theme="dark"] .cta-section {
  background: linear-gradient(135deg, rgba(200,169,97,.08) 0%, rgba(29,155,240,.05) 100%);
  border-color: rgba(200,169,97,.2);
}
.cta-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.cta-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}
.cta-icon i { width: 28px; height: 28px; }
.cta-content { flex: 1; }
.cta-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.cta-desc {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 12px;
}
.cta-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.cta-points li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  color: var(--accent-primary);
  font-weight: 600;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-icon { margin: 0 auto; }
  .cta-points { justify-content: center; }
  .cta-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hidden-sp { display: none; }
}
@media (max-width: 480px) {
  .cta-section { padding: 24px 20px; }
}

/* =============================================
   ユーティリティ
   ============================================= */
.text-center { text-align: center; }
.text-gold { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.icon-sm { width: 14px; height: 14px; }
