/* =========================================================
   HIRANO GAMES — glass.css
   デザインシステム: Windows 7 Aero × Apple Liquid Glass
   ブランド: #1F2A5C / #3D4FA0 / #6B7EE8 (symbol.svg 由来)
   ========================================================= */

:root {
  --ink:        #0B0D21;   /* 最深背景(ツミキタワー宇宙面と同色) */
  --navy:       #1F2A5C;
  --royal:      #3D4FA0;
  --violet:     #6B7EE8;
  --aero:       #A8D8FF;   /* Aero の氷ハイライト */
  --gold:       #FFE066;

  --glass-bg:      rgba(255,255,255,.07);
  --glass-bg-hi:   rgba(255,255,255,.12);
  --glass-border:  rgba(255,255,255,.18);
  --glass-top:     rgba(255,255,255,.45); /* Aero 天面反射 */
  --text:       #EDF0FF;
  --text-dim:   rgba(237,240,255,.62);

  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --disp: "Sora", var(--sans);

  --radius: 24px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---------- 背景: 液体グラデーションオーブ ---------- */
.bg-orbs {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(61,79,160,.35), transparent 60%),
    radial-gradient(900px 700px at -10% 90%, rgba(31,42,92,.6), transparent 60%),
    var(--ink);
}
.bg-orbs::before, .bg-orbs::after {
  content: "";
  position: absolute;
  width: 46vmax; height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  will-change: transform;
}
.bg-orbs::before {
  background: radial-gradient(circle at 30% 30%, var(--violet), transparent 65%);
  top: -12vmax; left: -8vmax;
  animation: orbA 26s ease-in-out infinite alternate;
}
.bg-orbs::after {
  background: radial-gradient(circle at 60% 60%, #2C7ACF, transparent 65%);
  bottom: -16vmax; right: -10vmax;
  animation: orbB 32s ease-in-out infinite alternate;
}
@keyframes orbA { to { transform: translate(9vmax, 7vmax) scale(1.15); } }
@keyframes orbB { to { transform: translate(-8vmax, -6vmax) scale(.9); } }

/* ---------- ガラスパネル ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow:
    0 20px 50px rgba(0,0,0,.45),
    inset 0 1px 0 var(--glass-top);          /* Aero 天面の1pxハイライト */
  overflow: hidden;
}
/* Aero: 上半分のガラス光沢グラデーション */
.glass::before {
  content: "";
  position: absolute; inset: 0 0 55% 0;
  background: linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.02));
  pointer-events: none;
  border-radius: inherit;
}
/* Liquid Glass: ポインタ追従ハイライト(JSで --mx/--my を更新) */
.glass.liquid::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, -30%),
              rgba(168,216,255,.22), transparent 70%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.glass.liquid:hover::after { opacity: 1; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 12px; z-index: 100;
  margin: 12px auto 0;
  width: min(1080px, calc(100% - 24px));
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  border-radius: 999px;
}
.site-header::before { border-radius: 999px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: var(--disp);
  font-weight: 700; letter-spacing: .06em; font-size: 15px;
}
.brand img { width: 26px; height: auto; filter: drop-shadow(0 0 8px rgba(107,126,232,.7)); }
.header-spacer { flex: 1; }
.nav-link {
  color: var(--text-dim); text-decoration: none; font-size: 13px;
  padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.08); }

/* ---------- 認証チップ ---------- */
.auth-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim);
}
.auth-chip img.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--glass-border);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 13.5px;
  color: var(--text); text-decoration: none;
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(rgba(255,255,255,.16), rgba(255,255,255,.06));
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-top), 0 4px 14px rgba(0,0,0,.3);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(rgba(255,255,255,.24), rgba(255,255,255,.1));
  box-shadow: inset 0 1px 0 var(--glass-top), 0 6px 20px rgba(107,126,232,.35);
}
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--aero); outline-offset: 2px;
}
.btn.primary {
  background: linear-gradient(180deg, rgba(107,126,232,.85), rgba(61,79,160,.85));
  border-color: rgba(168,216,255,.45);
}
.btn.primary:hover { box-shadow: inset 0 1px 0 var(--glass-top), 0 8px 26px rgba(107,126,232,.55); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { padding: 6px 14px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- ヒーロー ---------- */
.hero {
  width: min(1080px, calc(100% - 24px));
  margin: 48px auto 36px;
  text-align: center;
  padding: 56px 24px 48px;
}
.hero .symbol {
  width: 96px; height: auto;
  filter: drop-shadow(0 0 24px rgba(107,126,232,.55));
}
.hero h1 {
  font-family: var(--disp);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800; letter-spacing: .08em;
  margin: 18px 0 6px;
  background: linear-gradient(180deg, #fff 20%, var(--aero) 60%, var(--violet));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead { color: var(--text-dim); font-size: 15px; margin: 0; }

/* Aero 走査光(バッジ・タイトル下線用) */
.scanline {
  position: relative; overflow: hidden;
}
.scanline::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 60px;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  animation: scan 3.5s ease-in-out infinite;
}
@keyframes scan { 0% { left: -80px; } 60%, 100% { left: 110%; } }

/* ---------- ゲームカードグリッド ---------- */
.section {
  width: min(1080px, calc(100% - 24px));
  margin: 0 auto 48px;
}
.section-title {
  font-family: var(--disp); font-weight: 700; letter-spacing: .12em;
  font-size: 13px; color: var(--text-dim);
  text-transform: uppercase;
  margin: 0 0 16px 6px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.game-card {
  display: flex; flex-direction: column;
  padding: 0; text-decoration: none; color: var(--text);
  transition: transform .25s cubic-bezier(.2,.8,.3,1.2), box-shadow .25s;
}
.game-card:hover { transform: translateY(-4px); }
.game-card .card-visual {
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 800; font-size: 26px; letter-spacing: .05em;
  position: relative;
}
.game-card .card-visual .play-tri {
  position: absolute; right: 18px; bottom: 14px;
  width: 0; height: 0;
  border-top: 12px solid transparent; border-bottom: 12px solid transparent;
  border-left: 18px solid rgba(255,255,255,.35);
  transition: border-left-color .2s, transform .2s;
}
.game-card:hover .play-tri { border-left-color: #fff; transform: scale(1.15); }
.game-card .card-body { padding: 16px 18px 18px; }
.game-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.game-card .tagline { margin: 0; font-size: 12.5px; color: var(--text-dim); }
.game-card .badges { margin-top: 12px; display: flex; gap: 8px; }
.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,.1); color: var(--text-dim);
  border: 1px solid var(--glass-border);
}
.badge.maint { background: rgba(255,180,60,.18); color: #FFCF8A; border-color: rgba(255,180,60,.4); }
.game-card.is-maint { pointer-events: none; }
.game-card.is-maint .card-visual, .game-card.is-maint .card-body { opacity: .45; filter: saturate(.4); }

/* ---------- ランキング ---------- */
.rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank-table th {
  text-align: left; font-size: 11px; letter-spacing: .1em; color: var(--text-dim);
  font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--glass-border);
}
.rank-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.07); }
.rank-table tr:last-child td { border-bottom: none; }
.rank-table .pos { font-family: var(--disp); font-weight: 800; width: 48px; color: var(--text-dim); }
.rank-table tr.top1 .pos { color: var(--gold); }
.rank-table tr.top2 .pos { color: #D9E4FF; }
.rank-table tr.top3 .pos { color: #E8A66B; }
.rank-table .score { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.rank-table tr.me td { background: rgba(107,126,232,.14); }

/* ---------- フォーム / モーダル ---------- */
.login-panel {
  width: min(360px, calc(100% - 32px));
  margin: 18vh auto 0;
  padding: 36px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.provider-btn { width: 100%; justify-content: center; }
.provider-btn svg { width: 18px; height: 18px; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(5,7,20,.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.show { display: flex; }

/* ---------- フッター ---------- */
.site-footer {
  width: min(1080px, calc(100% - 24px));
  margin: 64px auto 28px;
  text-align: center;
  color: var(--text-dim); font-size: 12px;
}
.site-footer a { color: var(--text-dim); text-decoration: none; margin: 0 10px; }
.site-footer a:hover { color: var(--text); }

/* ---------- ユーティリティ ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hidden { display: none !important; }
.muted { color: var(--text-dim); }
.center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .bg-orbs::before, .bg-orbs::after, .scanline::after { animation: none; }
  .game-card, .btn { transition: none; }
}
@media (max-width: 640px) {
  .site-header { gap: 8px; padding: 8px 14px; }
  .nav-link { display: none; }
  .hero { padding: 40px 16px 36px; margin-top: 28px; }
}
