/* 오목 게임 공통 스타일 */

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

/* 소개 페이지 */
.omok-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;
}

.omok-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;
}

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

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

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

.omok-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);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

.omok-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;
}

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

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

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

.omok-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;
}

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

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

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

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

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

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

.omok-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);
}

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

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

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

.omok-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;
}

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

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

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

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

.omok-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;
}

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

.omok-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;
}

.omok-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;
}

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

.omok-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);
}

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

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

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

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

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

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

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

.omok-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;
}

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

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

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

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

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

/* 토스트 */
.omok-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;
}

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

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

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

.omok-lobby-room-item,
.omok-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;
}

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

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

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

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

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

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

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

.omok-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;
}

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