/* CEO ROOM Arcade — Styles */

/* ─── 변수 ───────────────────────────────────────────────────────────────── */
:root {
  --bg:           #080d14;
  --bg2:          #0d1117;
  --panel:        #111827;
  --panel2:       #1a2332;
  --border:       #1e293b;
  --border2:      #2d3f55;
  --text:         #e2e8f0;
  --text2:        #94a3b8;
  --text3:        #64748b;
  --accent:       #6366f1;
  --accent2:      #a5b4fc;
  --amber:        #f59e0b;
  --emerald:      #10b981;
  --rose:         #f43f5e;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --font-ko:      'Noto Sans KR', sans-serif;
  --font-en:      'Space Grotesk', sans-serif;
}

/* ─── 리셋 & 베이스 ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ko);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── 페이지 쉘 ─────────────────────────────────────────────────────────── */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── 탑바 ──────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(8, 13, 20, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: var(--font-en);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.brand-btn:hover { background: rgba(99, 102, 241, 0.1); }
.brand-icon { font-size: 20px; color: var(--accent2); }
.brand-name { font-weight: 500; }
.brand-name strong { color: var(--accent2); font-weight: 700; }

.topnav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.topnav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text2);
  transition: color 0.15s, background 0.15s;
}
.topnav a:hover { color: var(--text); background: rgba(99, 102, 241, 0.1); }

/* ─── 공통 버튼 ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-ko);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.wide { width: 100%; }

/* ─── 공통 텍스트 ───────────────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 10px;
}

h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(22px, 3.5vw, 36px); font-weight: 700; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 700; }

.hero-sub {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.8;
  margin-top: 16px;
}

/* ─── 리빌 애니메이션 ───────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ─── 히어로 ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 100px 5vw 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 50%, rgba(99,102,241,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(16,185,129,0.06) 0%, transparent 45%),
    linear-gradient(160deg, #060a12 0%, #080d14 100%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}
.hero-content {
  position: relative;
  max-width: 640px;
}
.hero-content h1 { margin-bottom: 0; }
.hero-content .btn { margin-top: 32px; }

/* ─── 카탈로그 섹션 ─────────────────────────────────────────────────────── */
.catalog-section {
  padding: 80px 5vw;
}

.section-head {
  margin-bottom: 48px;
}
.section-head h2 { margin-top: 0; color: var(--text); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ─── 게임 카드 ─────────────────────────────────────────────────────────── */
.catalog-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.catalog-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99,102,241,0.15);
}

.card-cover {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.catalog-card:hover .cover-img { transform: scale(1.04); }

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg2);
}
.cover-placeholder p {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-en);
  letter-spacing: 0.06em;
}

.card-body {
  padding: 18px 20px 20px;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.genre-badge {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  color: var(--accent2);
  border: 1px solid var(--border2);
  background: rgba(99,102,241,0.1);
}

.play-mode {
  font-size: 12px;
  color: var(--text3);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}
.card-summary {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}
.avg-text {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}
.review-count {
  font-size: 12px;
  color: var(--text3);
}

/* ─── 별점 ──────────────────────────────────────────────────────────────── */
.stars { color: var(--amber); font-family: sans-serif; }
.stars-sm { font-size: 13px; letter-spacing: 1px; }
.stars-md { font-size: 16px; letter-spacing: 1px; }
.stars-lg { font-size: 28px; letter-spacing: 2px; }

/* ─── 스택 섹션 ─────────────────────────────────────────────────────────── */
.stack-section {
  padding: 80px 5vw;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.stack-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.stack-num {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.stack-card h3 { font-size: 17px; margin-bottom: 8px; }
.stack-card p { font-size: 13px; color: var(--text2); line-height: 1.7; }

/* ─── 상세 히어로 ───────────────────────────────────────────────────────── */
.detail-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  padding: 60px 5vw 48px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 0% 50%, rgba(99,102,241,0.08) 0%, transparent 50%),
    var(--bg);
}

.detail-hero-info {
  max-width: 640px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text3);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
}
.back-btn:hover { color: var(--text2); background: var(--panel); }

.detail-hero-info h1 { font-size: clamp(24px, 4vw, 44px); margin-bottom: 12px; }

.detail-meta {
  display: flex;
  gap: 24px;
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-en); }
.meta-val { font-size: 18px; font-weight: 700; font-family: var(--font-en); }

.detail-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.detail-cover {
  width: 280px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.detail-cover .cover-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.detail-cover .cover-placeholder { aspect-ratio: 4/3; }

/* ─── 체험 섹션 ─────────────────────────────────────────────────────────── */
.experience-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 0;
  min-height: 600px;
  border-bottom: 1px solid var(--border);
}

.player-wrap {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}
.player-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
}
#gameFrame {
  flex: 1;
  border: none;
  background: #000;
  min-height: 500px;
}

/* ─── 리뷰 패널 ─────────────────────────────────────────────────────────── */
.review-panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg2);
}

.review-summary {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.rs-score {
  font-size: 36px;
  font-weight: 800;
  font-family: var(--font-en);
  color: var(--text);
}
.rs-count {
  font-size: 13px;
  color: var(--text3);
}

/* ─── 리뷰 폼 ───────────────────────────────────────────────────────────── */
.review-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-form h3 {
  font-size: 15px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-en);
}
.form-row input,
.form-row textarea {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-ko);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
  resize: none;
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
}

/* 별점 피커 */
.star-picker {
  display: flex;
  gap: 4px;
}
.star-picker button {
  font-size: 22px;
  color: var(--border2);
  transition: color 0.1s, transform 0.1s;
  line-height: 1;
}
.star-picker button:hover,
.star-picker button.active {
  color: var(--amber);
  transform: scale(1.15);
}

.form-msg {
  font-size: 13px;
  color: var(--text3);
  min-height: 18px;
}
.form-msg.success { color: var(--emerald); }
.form-msg.error { color: var(--rose); }

/* ─── 리뷰 피드 섹션 ────────────────────────────────────────────────────── */
.review-feed-section {
  padding: 80px 5vw;
}
.review-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.review-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.rc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}
.rc-nick {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.rc-date {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  flex-shrink: 0;
}
.rc-comment {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

/* ─── 빈 상태 / 로딩 ────────────────────────────────────────────────────── */
.empty-state,
.loading-state {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  color: var(--text3);
  font-size: 14px;
  line-height: 1.8;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ─── 반응형 ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-hero {
    grid-template-columns: 1fr;
  }
  .detail-cover {
    width: 100%;
    max-width: 360px;
  }
  .experience-section {
    grid-template-columns: 1fr;
  }
  .player-wrap {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .review-panel {
    max-height: 600px;
  }
}

@media (max-width: 600px) {
  .topbar { padding: 0 16px; }
  .hero { padding: 80px 16px 60px; }
  .catalog-section, .stack-section, .review-feed-section { padding: 60px 16px; }
  .detail-hero { padding: 40px 16px 32px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .detail-meta { flex-wrap: wrap; gap: 16px; }
}
