/* 全体レイアウト */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ヘッダー */
.header {
  background: #0a0a0a;
  color: #f4f4f5;
  display: flex;
  flex-direction: column;
}

.header-neon-line {
  height: 2px;
  background: linear-gradient(90deg, #06b6d4, #8b5cf6, #ec4899, #06b6d4);
  background-size: 200% 100%;
  animation: neon-shimmer 3s linear infinite;
}

@keyframes neon-shimmer {
  to { background-position: -200% 0; }
}

.header-inner {
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title a {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: #f4f4f5;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
  text-decoration: none;
}

.header-title a span {
  color: #06b6d4;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-nav a {
  color: #d4d4d8;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  margin-left: 0;
  text-decoration: none !important;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.header-nav a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
  text-decoration: none !important;
}

/* ユーザー名（テキストのみ、リンクなし） */
.header-username {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 6px;
}

/* My Point リンク */
.header-points-link {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 99px;
  padding: 4px 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #a5b4fc !important;
}
.header-points-link:hover {
  background: rgba(99,102,241,0.28) !important;
  color: #c7d2fe !important;
}

/* 旧 header-user-link（後方互換） */
.header-user-link {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
}

/* Admin / Dev バッジ */
.header-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 99px;
  line-height: 1.5;
  text-decoration: none !important;
  pointer-events: none;
}
@keyframes founder-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(236,72,153,0.5), 0 0 12px rgba(99,102,241,0.3); }
  50%       { box-shadow: 0 0 10px rgba(236,72,153,0.8), 0 0 20px rgba(99,102,241,0.5); }
}
.header-badge-dev {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 60%, #6366f1 100%);
  color: #fff;
  font-size: 11px;
  padding: 2px 9px;
  animation: founder-glow 2.5s ease-in-out infinite;
  letter-spacing: 0.05em;
}
.header-badge-admin {
  background: #374151;
  color: #d1d5db;
  border: 1px solid #4b5563;
}
.header-badge-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
  color: #78350f;
  box-shadow: 0 0 8px rgba(251,191,36,0.55);
  font-weight: 800;
}

.header-nav form {
  display: flex;
  align-items: center;
}

.header-nav select {
  appearance: none;
  -webkit-appearance: none;
  background: #1c1c1e;
  color: #d4d4d8;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 10px;
  outline: none;
}

/* ハンバーガーボタン */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #d4d4d8;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* モバイルメニュー */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #111113;
  border-top: 1px solid #27272a;
  padding: 8px 0 12px;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu a {
  color: #d4d4d8;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  text-decoration: none !important;
  border-bottom: 1px solid #1f1f21;
}
.mobile-menu a:last-child {
  border-bottom: none;
}
.mobile-menu form {
  display: flex;
  flex-direction: row;
  padding: 10px 24px;
  border-bottom: 1px solid #1f1f21;
}
.mobile-menu select {
  background: #1c1c1e;
  color: #d4d4d8;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  font-size: 14px;
  padding: 6px 10px;
  outline: none;
  width: 100%;
}

@media (max-width: 640px) {
  .header-nav { display: none; }
  .burger { display: flex; }
}

/* メインコンテナ */
.container {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 16px;
}

/* カード */
.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
  margin-bottom: 24px;
  border: 1px solid #f1f5f9;
}

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

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.card-subtitle {
  font-size: 14px;
  color: #6b7280;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: #ffffff;
  transition: opacity 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  text-decoration: none;
}
.btn:hover {
  opacity: 0.92;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}
.btn:active {
  opacity: 0.82;
  transform: scale(0.97);
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}
.btn-secondary:hover {
  box-shadow: 0 4px 14px rgba(107, 114, 128, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid #6366f1;
  color: #6366f1;
  box-shadow: none;
}
.btn-outline:hover {
  background: #f5f3ff;
  box-shadow: none;
  transform: none;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn + .btn {
  margin-left: 8px;
}

/* フォーム */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-size: 14px;
  color: #374151;
}

select,
input[type="text"],
input[type="email"],
input[type="password"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

/* リスト */
.list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.list li {
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

/* タグ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
}

.badge-gray {
  background: #e5e7eb;
  color: #374151;
}

.badge-yellow {
  background: #fef9c3;
  color: #854d0e;
}

/* 小さなテキスト */
.text-muted {
  font-size: 12px;
  color: #9ca3af;
}

/* 中央寄せ */
.center {
  text-align: center;
}

/* レイアウト用 */
.flex {
  display: flex;
}

.space-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

/* ====== Loading Spinner ====== */
.spinner-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ====== Lesson Room Layout ====== */
.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 24px;
}

@media (max-width: 800px) {
  .lesson-layout {
    grid-template-columns: 1fr;
  }
}

/* タイマーの丸い表示 */
.timer-circle {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  border: 8px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.timer-label {
  font-size: 13px;
  color: #6b7280;
}

/* セッション情報カード */
.session-meta {
  font-size: 14px;
  line-height: 1.7;
}

/* 動画エリア（今はダミー枠） */
.video-box {
  border-radius: 12px;
  background: #0f172a;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

.video-label {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
}

/* ====== Video Placeholder ====== */
.video-placeholder {
  border-radius: 12px;
  background: #000000;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 14px;
  text-align: center;
}

/* ====== Lesson Room Layout 2 columns ====== */
.lesson-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.9fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .lesson-grid {
    grid-template-columns: 1fr;
  }
}

.video-wrapper {
  margin-top: 8px;
}

.text-muted {
  font-size: 13px;
  color: #6b7280;
}

/* リモート映像がまだ来てないときのラベル */
.video-overlay-label {
  position: absolute;
  bottom: 8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
}

/* もしまだなければ：ビデオ用の黒背景 */
.video-placeholder {
  border-radius: 12px;
  background: #000000;
  min-height: 220px;
  width: 100%;
  display: block;
}
/* tutor lang color */
.language-tag {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #ddd;
  background: #f3f4f6;
  color: #374151;
}

.language-japanese {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.language-english {
  background: #dbeafe;
  color: #1e3a8a;
  border-color: #bfdbfe;
}

.language-spanish {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.language-french {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
/* ── ヘッダー サインアップボタン ── */
.btn-signup-header {
  background: #6366f1;
  color: #fff !important;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-signup-header:hover {
  background: #4f46e5;
}

/* ── PC 広域レイアウト ── */
@media (min-width: 1100px) {
  .container {
    max-width: 1200px;
  }
}
