/* ==========================================================================
   シンクロ将棋 (SyncShogi) - グローバルスタイル & 和モダンテーマ
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@600;900&family=Outfit:wght@500;700&display=swap');

:root {
  /* 背景・サーフェスカラー（漆黒・深墨・木目調） */
  --bg-main: #0e1014;
  --bg-surface: #161920;
  --bg-surface-elevated: #202430;
  --bg-glass: rgba(22, 25, 32, 0.75);
  
  /* 将棋盤カラー（榧・欅の風合いと線の黒漆） */
  --board-wood-base: #cf9c58;
  --board-wood-gradient: linear-gradient(135deg, #dfaf6f 0%, #c9934e 50%, #b8823f 100%);
  --board-line: rgba(40, 20, 5, 0.78);
  --board-star: #2c1605;
  --board-border: #805422;
  --board-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);

  /* アクセントカラー（金箔・朱漆・翡翠） */
  --color-gold: #e5b95c;
  --color-gold-hover: #f3cf7a;
  --color-vermilion: #e65349;
  --color-vermilion-glow: rgba(230, 83, 73, 0.35);
  --color-jade: #2ec4b6;
  
  /* テキストカラー */
  --text-primary: #f5f6fa;
  --text-secondary: #a0a6b5;
  --text-muted: #6b7282;
  --text-board: #2b1704;

  /* フォントスタック */
  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-en: 'Outfit', sans-serif;

  /* トランジション */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* リセット & 基本設定 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* スクロールバーデザイン (和モダン・ゴールドアクセント) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 185, 92, 0.4) rgba(14, 16, 20, 0.5);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(14, 16, 20, 0.6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(229, 185, 92, 0.35) 0%, rgba(202, 150, 63, 0.35) 100%);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(229, 185, 92, 0.65) 0%, rgba(202, 150, 63, 0.65) 100%);
  box-shadow: 0 0 8px rgba(229, 185, 92, 0.35);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, var(--color-gold) 0%, #db9f44 100%);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  user-select: none;
  -webkit-user-select: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(229, 185, 92, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(230, 83, 73, 0.05) 0%, transparent 50%);
}

/* メインコンテナ */
#app {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  position: relative;
}

/* 画面切り替え管理 */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.screen.active {
  display: flex;
}

/* ヘッダーエリア */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-gold);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(229, 185, 92, 0.3);
}

.brand-badge {
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--color-vermilion);
  color: #fff;
  border-radius: 4px;
  text-transform: uppercase;
}

/* タイトル・ロビー画面 */
#screen-lobby {
  justify-content: center;
  padding: 30px 16px;
  min-height: 80vh;
}

.lobby-hero {
  text-align: center;
  margin-bottom: 36px;
}

.lobby-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #fff 0%, var(--color-gold) 60%, #c4963f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 16px rgba(229, 185, 92, 0.25));
}

.lobby-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.lobby-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 360px;
}

.lobby-footer {
  margin-top: 48px;
  text-align: center;
}

.lobby-contact {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.contact-link {
  color: var(--color-gold);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
  word-break: break-all;
}

.contact-link:hover {
  color: var(--color-gold-hover);
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(229, 185, 92, 0.4);
}
