/* -------------------------------------------------------------
 * NAMBA CUP - CSS Stylesheet (Simplified Version)
 * Premium Sporty Dark Theme with Glassmorphism & Password Protection
 * ------------------------------------------------------------- */

/* 変数の定義 */
:root {
  --color-bg: #0b0f19;
  --color-bg-card: rgba(17, 24, 39, 0.75);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-focus: rgba(204, 255, 0, 0.5);
  
  --color-text-primary: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  
  /* テニスライムイエロー */
  --color-lime: #ccff00;
  --color-lime-hover: #b3e600;
  --color-lime-glow: rgba(204, 255, 0, 0.25);
  
  /* グラデーション */
  --grad-primary: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --grad-accent: linear-gradient(135deg, #ccff00 0%, #a3e635 100%);
  
  /* ステータスカラー */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-danger-hover: #dc2626;
  --color-info: #3b82f6;

  --font-main: 'Outfit', 'Noto Sans JP', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lime: 0 0 20px rgba(204, 255, 0, 0.2);
  --radius-lg: 16px;
  --radius-md: 8px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全体初期化 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景デコレーション */
.bg-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
}

.bg-glow-1 {
  background-color: var(--color-lime);
  top: -10%;
  right: -10%;
}

.bg-glow-2 {
  background-color: #3b82f6;
  bottom: -10%;
  left: -10%;
}

/* コンテナ */
.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 16px 60px 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ヘッダー */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-brand {
  width: 36px;
  height: 36px;
  color: var(--color-lime);
  filter: drop-shadow(0 0 8px var(--color-lime-glow));
}

.brand h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.1;
  background: linear-gradient(to right, #ffffff, var(--color-text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand .subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-lime);
  font-weight: 600;
}

/* タブナビゲーション */
.app-tabs {
  display: flex;
  background-color: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 3px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: var(--grad-accent);
  color: var(--color-bg);
  box-shadow: 0 2px 8px rgba(204, 255, 0, 0.2);
}

/* プレミアム・グラスカード */
.glass-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.glass-card.border-danger {
  border-color: rgba(239, 68, 68, 0.25);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
}

.card-header.border-bottom {
  border-bottom: 1px solid var(--color-border);
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-with-icon i {
  color: var(--color-lime);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.title-with-icon i.icon-large {
  width: 48px;
  height: 48px;
}

.glass-card h2 {
  font-size: 18px;
  font-weight: 800;
}

.step-badge {
  font-size: 11px;
  background-color: rgba(204, 255, 0, 0.1);
  border: 1px solid rgba(204, 255, 0, 0.2);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--color-lime);
}

.description {
  color: var(--color-text-secondary);
  font-size: 14px;
}

.sub-description {
  color: var(--color-text-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* 基本ボタン */
button, .btn {
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--grad-accent);
  color: var(--color-bg);
  box-shadow: var(--shadow-lime);
}

.btn-primary:hover {
  background: var(--color-lime-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(204, 255, 0, 0.35);
}

.btn-accent {
  background-color: var(--color-text-primary);
  color: var(--color-bg);
}

.btn-accent:hover {
  background-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--color-text-secondary);
}

.btn-danger {
  background-color: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  background-color: var(--color-danger-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-mini {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.btn-mini:hover {
  color: var(--color-text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.btn-icon-danger {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
  padding: 6px;
  border-radius: 6px;
}

.btn-icon-danger:hover {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.08);
}

.btn-large {
  padding: 13px 26px;
  font-size: 15px;
}

.btn-full-width {
  width: 100%;
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ビュー切替 */
.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* 投票所フォームコンテナ */
.voting-box-container {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--color-border);
}

.voter-identity-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.select-voter {
  width: 100%;
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  height: 46px;
  transition: var(--transition-smooth);
}

.select-voter:focus {
  border-color: var(--color-lime);
  outline: none;
  box-shadow: 0 0 10px rgba(204, 255, 0, 0.15);
  background-color: rgba(30, 41, 59, 0.8);
}

.form-help {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* 候補者リスト */
.candidates-section {
  margin-bottom: 20px;
}

.candidates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.candidates-header h3 {
  font-size: 14px;
  font-weight: 700;
}

.selected-counter {
  color: var(--color-lime);
  background-color: rgba(204, 255, 0, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 800;
}

.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 10px;
}

/* 選手カード（投票画面） */
.candidate-card {
  position: relative;
  background-color: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

.candidate-card:hover {
  background-color: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
}

.candidate-card.selected {
  background-color: rgba(204, 255, 0, 0.06);
  border-color: var(--color-lime);
  box-shadow: 0 0 12px rgba(204, 255, 0, 0.08);
}

.candidate-card.disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

.candidate-name {
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
  margin-top: 4px;
}

.candidate-checkbox {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.candidate-card.selected .candidate-checkbox {
  background-color: var(--color-lime);
  border-color: var(--color-lime);
}

.candidate-card.selected .candidate-checkbox::after {
  content: '✓';
  color: var(--color-bg);
  font-size: 9px;
  font-weight: 900;
}

/* 投票エラー表示 */
.vote-error-message {
  background-color: rgba(239, 68, 68, 0.08);
  border: 1px solid var(--color-danger);
  color: #f87171;
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* 投票交代オーバーレイ */
.voted-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 15, 25, 0.96);
  border-radius: var(--radius-lg);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.overlay-content {
  text-align: center;
  max-width: 360px;
  padding: 20px;
}

.overlay-content i.icon-success {
  width: 52px;
  height: 52px;
  color: var(--color-lime);
  margin-bottom: 12px;
}

.overlay-content h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.overlay-text {
  font-size: 13px;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

/* パスワードロック画面 */
.auth-form {
  display: flex;
  gap: 12px;
  max-width: 320px;
  margin: 20px auto 0 auto;
}

.auth-form input {
  flex-grow: 1;
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  height: 42px;
}

.auth-form input:focus {
  border-color: var(--color-lime);
  outline: none;
}

/* 管理設定構成グリッド */
.debug-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.input-field input {
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  height: 42px;
}

.input-field input:focus {
  border-color: var(--color-lime);
  outline: none;
}

/* 一括登録アコーディオン */
.bulk-import-details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.01);
}

.bulk-import-summary {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  user-select: none;
  font-size: 13px;
}

.bulk-import-summary::-webkit-details-marker {
  display: none;
}

.bulk-import-summary .chevron {
  margin-left: auto;
  transition: var(--transition-smooth);
}

.bulk-import-details[open] .bulk-import-summary .chevron {
  transform: rotate(180deg);
  color: var(--color-lime);
}

.bulk-import-content {
  padding: 0 16px 16px 16px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: rgba(0, 0, 0, 0.1);
}

.bulk-import-content textarea {
  width: 100%;
  height: 90px;
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: #fff;
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}

.bulk-import-content textarea:focus {
  border-color: var(--color-lime);
  outline: none;
}

/* 選手個別登録フォーム */
.member-add-form {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: flex-end;
}

/* 管理者選手管理テーブル */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.table-header h3 {
  font-size: 13px;
  font-weight: 700;
}

.scroll-table-container {
  overflow-y: auto;
  max-height: 250px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: rgba(0, 0, 0, 0.1);
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.member-table th, .member-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
}

.member-table th {
  background-color: rgba(30, 41, 59, 0.4);
  font-weight: 700;
  color: var(--color-text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.member-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.01);
}

/* 進行状況進捗カード */
.status-indicator-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background-color: rgba(204, 255, 0, 0.1);
  color: var(--color-lime);
  border: 1px solid rgba(204, 255, 0, 0.2);
}

.phase-action-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.phase-action-card h4 {
  font-size: 13px;
  font-weight: 800;
}

.phase-action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-bar-flat-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar-flat {
  flex-grow: 1;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-accent);
  transition: var(--transition-smooth);
}

.text-mute {
  font-size: 11px;
  color: var(--color-text-secondary);
}

/* 結果画面 最終チームカード */
.final-teams-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.final-teams-layout .enjoy {
  grid-column: span 2;
}

.final-team-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.45) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
}

.final-team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.final-team-card.win-1::before {
  background: var(--grad-accent);
}

.final-team-card.win-2::before {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

.final-team-card.enjoy::before {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.header-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-card-header h3 {
  font-size: 14px;
  font-weight: 800;
}

.icon-team-badge {
  width: 18px;
  height: 18px;
}

.final-team-card.win-1 .icon-team-badge { color: var(--color-lime); }
.final-team-card.win-2 .icon-team-badge { color: #fbbf24; }
.final-team-card.enjoy .icon-team-badge { color: #3b82f6; }

.team-size-badge {
  font-size: 10px;
  font-weight: 800;
  background-color: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 10px;
}

.final-member-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.final-team-card.enjoy .final-member-list {
  grid-template-columns: repeat(3, 1fr);
}

.final-member-list li {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
  padding: 8px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  word-break: break-all;
}

/* 共有エリア */
.export-actions-box {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.export-actions-box h4 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.textarea-result-share {
  width: 100%;
  height: 110px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  padding: 10px;
  font-family: inherit;
  font-size: 11px;
  resize: none;
  margin-top: 10px;
}

/* 棒グラフ */
.chart-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chart-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-name {
  width: 80px;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-bar-track {
  flex-grow: 1;
  height: 14px;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  background: var(--grad-accent);
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.chart-val {
  font-size: 11px;
  font-weight: 700;
  width: 32px;
}

/* アコーディオン */
.results-detail-accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.results-detail-summary {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.results-detail-summary::-webkit-details-marker {
  display: none;
}

.results-detail-summary .chevron {
  margin-left: auto;
  transition: var(--transition-smooth);
}

.results-detail-accordion[open] .results-detail-summary .chevron {
  transform: rotate(180deg);
  color: var(--color-lime);
}

.results-detail-content {
  padding: 16px;
  border-top: 1px solid var(--color-border);
  background-color: rgba(0, 0, 0, 0.15);
}

.results-detail-content h3 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--color-text-secondary);
}

/* トースト通知 */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: #1e293b;
  border: 1px solid var(--color-border);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.25s cubic-bezier(0, 0, 0.2, 1) forwards;
}

.toast i { width: 16px; height: 16px; }
.toast-success { border-left: 4px solid var(--color-success); }
.toast-success i { color: var(--color-success); }
.toast-error { border-left: 4px solid var(--color-danger); }
.toast-error i { color: var(--color-danger); }
.toast-info { border-left: 4px solid var(--color-info); }
.toast-info i { color: var(--color-info); }

/* オンラインカード用 */
.online-connection-card {
  padding: 16px;
}

.connection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
}

.badge-error {
  background-color: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.connection-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.connection-form .input-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.connection-form .input-group input {
  height: 40px;
}

.or-separator {
  text-align: center;
  font-size: 10px;
  color: var(--color-text-muted);
  position: relative;
}

.or-separator::before, .or-separator::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background-color: var(--color-border);
}

.or-separator::before { left: 0; }
.or-separator::after { right: 0; }

.tournament-info-banner {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--color-border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

/* 余白ユーティリティ */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.py-48 { padding-top: 48px; padding-bottom: 48px; }
.justify-center { justify-content: center; }

.text-center { text-align: center; }
.hidden { display: none !important; }

/* フッター */
.app-footer {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 10px;
  color: var(--color-text-muted);
}

/* 紙吹雪 */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* アニメーション */
@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .app-container {
    padding: 16px 8px 30px 8px;
  }
  
  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .brand {
    justify-content: center;
  }
  
  .app-tabs {
    width: 100%;
  }
  
  .tab-btn {
    flex: 1;
    justify-content: center;
  }
  
  .glass-card {
    padding: 20px 14px;
  }
  
  .debug-settings-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .member-add-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .final-teams-layout {
    grid-template-columns: 1fr;
  }
  
  .final-teams-layout .enjoy {
    grid-column: span 1;
  }
  
  .final-member-list {
    grid-template-columns: 1fr 1fr;
  }
  
  .final-team-card.enjoy .final-member-list {
    grid-template-columns: 1fr 1fr;
  }
}
