/* 오델로 게임 공통 스타일 */

.othello-page {
  --othello-navy: #121826;
  --othello-gold: #d4a017;
  --othello-wood: #e3c08d;
  --othello-wood-dark: #c9a46d;
  --othello-black: #1f1f1f;
  --othello-white: #f7f7f7;
  --othello-grid: rgba(66, 50, 30, 0.55);
}

/* 소개 페이지 */
.othello-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(34, 55, 70, 0.14);
  border: 1px solid rgba(34, 55, 70, 0.08);
  background: linear-gradient(135deg, #1a2230 0%, #2a3546 100%);
  color: #fffaf2;
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.othello-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 214, 120, 0.45);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffe9a8;
}

.othello-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.othello-hero p {
  margin: 0;
  max-width: 36rem;
  color: rgba(255, 250, 242, 0.82);
  line-height: 1.75;
}

.othello-hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.othello-section {
  background: #fffdf8;
  border: 1px solid rgba(212, 160, 23, 0.18);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 32px rgba(16, 21, 31, 0.06);
}

.othello-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: #1a2430;
}

.othello-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.othello-info-card {
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.08);
  padding: 1rem;
}

.othello-info-card strong {
  display: block;
  font-size: 0.9rem;
  color: #1a2430;
  margin-bottom: 0.35rem;
}

.othello-info-card span {
  font-size: 0.85rem;
  color: #5a6578;
}

.othello-mini-board-demo {
  display: grid;
  place-items: center;
  background: var(--othello-wood);
  border-radius: 14px;
  padding: 1.5rem;
  min-height: 220px;
}

.othello-mini-board-demo canvas {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* 플레이 / 연습 / 관전 런처 */
.othello-launcher-wrap {
  padding: 1.5rem 0 3rem;
}

.othello-launcher-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.othello-launcher-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  color: #1a2430;
  margin: 0 0 0.35rem;
}

.othello-launcher-lead {
  color: #5a6578;
  margin: 0;
}

.othello-launcher-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.othello-launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.othello-launcher-card {
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.1);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(16, 21, 31, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.othello-launcher-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(16, 21, 31, 0.1);
}

.othello-launcher-card-media {
  height: 120px;
  background: linear-gradient(135deg, #2a3546 0%, #1a2230 100%);
  display: grid;
  place-items: center;
  position: relative;
}

.othello-launcher-card-media i {
  font-size: 2.5rem;
  color: #ffe9a8;
}

.othello-launcher-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.othello-launcher-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.othello-launcher-card-body h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: #1a2430;
}

.othello-launcher-card-body p {
  font-size: 0.9rem;
  color: #5a6578;
  margin: 0 0 1rem;
  line-height: 1.55;
  flex: 1;
}

.othello-launcher-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 게임 보드 */
.othello-game-stage {
  display: none;
}

.othello-game-stage.is-active {
  display: block;
}

.othello-turn-timer {
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.1);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 4px 18px rgba(13, 27, 42, 0.05);
}

.othello-turn-timer .progress { height: 12px; background: #e9ecef; }
.othello-turn-timer .progress-bar { transition: width 0.1s linear, background-color 0.2s ease; }

.othello-game-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.othello-game-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.othello-turn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #1a2430;
  font-size: 0.9rem;
  font-weight: 700;
}

.othello-turn-pill .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.othello-turn-pill .dot.black { background: var(--othello-black); }
.othello-turn-pill .dot.white { background: var(--othello-white); }

.othello-game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

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

.othello-board-card {
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.1);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(16, 21, 31, 0.06);
  overflow: auto;
}

.othello-board-wrap {
  display: grid;
  place-items: center;
  min-height: 360px;
}

.othello-board-wrap canvas {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  touch-action: none;
}

.othello-side-card {
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.1);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(16, 21, 31, 0.06);
  margin-bottom: 1rem;
}

.othello-side-card h4 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: #1a2430;
}

.othello-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(13, 27, 42, 0.06);
}

.othello-player-row:last-child {
  border-bottom: none;
}

.othello-player-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.othello-stone-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

.othello-stone-icon.black { background: var(--othello-black); }
.othello-stone-icon.white { background: var(--othello-white); }

.othello-move-list {
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.85rem;
  color: #5a6578;
}

.othello-move-item {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(13, 27, 42, 0.04);
}

/* 관전 */
.othello-spectate-list {
  display: grid;
  gap: 0.75rem;
}

.othello-spectate-item {
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.1);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.othello-spectate-item:hover {
  box-shadow: 0 8px 22px rgba(16, 21, 31, 0.08);
}

.othello-spectate-status {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.othello-spectate-status.waiting { background: #fff3cd; color: #856404; }
.othello-spectate-status.playing { background: #d1ecf1; color: #0c5460; }
.othello-spectate-status.finished { background: #d4edda; color: #155724; }

/* 폼/입력 */
.othello-form-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.othello-code-input {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  max-width: 160px;
}

/* 토스트 */
.othello-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1a2230;
  color: #fff;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 1080;
}

.othello-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 로비 */
.othello-lobby-stage {
  display: none;
}

.othello-lobby-stage.is-active {
  display: block;
}

.othello-lobby-room-item,
.othello-lobby-invite-item {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(13, 27, 42, 0.08);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 0.6rem;
  transition: box-shadow 0.12s ease;
}

.othello-lobby-room-item:hover,
.othello-lobby-invite-item:hover {
  box-shadow: 0 6px 16px rgba(16, 21, 31, 0.06);
}

.othello-lobby-room-item:last-child,
.othello-lobby-invite-item:last-child {
  margin-bottom: 0;
}

.othello-lobby-chat-list {
  max-height: 520px;
  min-height: 220px;
  overflow-y: auto;
  background: #f8f6f2;
  border-radius: 12px;
  padding: 0.75rem;
}

.othello-lobby-chat-item {
  margin-bottom: 0.7rem;
  max-width: 92%;
}

.othello-lobby-chat-item.is-me {
  margin-left: auto;
  text-align: right;
}

.othello-lobby-chat-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
}

.othello-lobby-chat-item.is-me .othello-lobby-chat-meta {
  justify-content: flex-end;
}

.othello-lobby-chat-body {
  display: inline-block;
  background: #fff;
  border: 1px solid rgba(13, 27, 42, 0.08);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #1a2430;
  word-break: break-word;
}

.othello-lobby-chat-item.is-me .othello-lobby-chat-body {
  background: #223746;
  color: #fff;
  border-color: #223746;
}

/* 오델로 전용 녹색 8×8 테이블 */
.othello-board-card{background:linear-gradient(145deg,#0c342b,#071f1b);border-color:rgba(46,203,146,.3)}
.othello-board-wrap{max-width:680px;margin-inline:auto;border:12px solid #173d31;border-radius:18px;overflow:hidden;box-shadow:0 22px 50px rgba(0,0,0,.28)}
.othello-board-wrap canvas{display:block;width:100%;height:auto;touch-action:none}
@media(max-width:767px){.othello-board-wrap{border-width:7px;border-radius:12px}.othello-game-layout{gap:1rem}.othello-launcher-title{font-size:clamp(1.8rem,8vw,2.6rem)}}
