/**
 * 메인 포털 전용 스타일 (home.css)
 * kyminfo 패밀리 규격 100% 일치
 */

/* ========================================================
   히어로 섹션 (.hero)
   ======================================================== */
.hero {
  min-height: 380px;
  padding: 52px 56px 44px;
  margin: 28px 0 24px;
  background: var(--hero-gradient);
  border: 1px solid #e7eafa;
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero:before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  right: -90px;
  top: -180px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: #6875a2;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7a62e8;
  box-shadow: 0 0 0 4px rgba(122, 98, 232, 0.12);
}

.hero h1 {
  font-size: clamp(34px, 4.2vw, 50px);
  line-height: 1.25;
  letter-spacing: -0.06em;
  margin: 16px 0 12px;
  font-weight: 800;
  color: var(--ink-heading);
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero-copy > p {
  font-size: 15px;
  color: #616a80;
  margin: 0 0 24px;
  max-width: 500px;
}

/* 검색창 */
.search-box {
  height: 54px;
  max-width: 500px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #dfe4f2;
  border-radius: 15px;
  box-shadow: 0 7px 24px rgba(49, 67, 124, 0.06);
  cursor: text;
}

.search-icon {
  font-size: 24px;
  color: #77809a;
  transform: rotate(-20deg);
}

.search-box input {
  border: 0;
  outline: 0;
  min-width: 0;
  flex: 1;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.search-box input::placeholder {
  color: var(--muted-light);
  font-weight: 500;
}

.search-box kbd {
  font-size: 10px;
  color: #52617a;
  border: 1px solid #e6e8ef;
  border-radius: 6px;
  padding: 3px 8px;
  background: #fafbfe;
  font-weight: 700;
}

/* 추천 태그 */
.hero-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.hero-tags a, .hero-tags button {
  font-size: 11px;
  color: #626c84;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-tags a:hover, .hero-tags button:hover {
  color: var(--blue);
  background: white;
  border-color: #cbd5fc;
}

/* 우측 비주얼 카드 */
.hero-visual {
  position: relative;
  min-height: 290px;
  display: grid;
  place-items: center;
}

.visual-orbit {
  position: absolute;
  border: 1px solid rgba(109, 124, 191, 0.17);
  border-radius: 50%;
}

.orbit-one {
  width: 340px;
  height: 180px;
  transform: rotate(-24deg);
}

.orbit-two {
  width: 270px;
  height: 300px;
  transform: rotate(42deg);
}

.visual-card {
  position: relative;
  width: 280px;
  background: white;
  border: 1px solid rgba(222, 226, 242, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 46px rgba(68, 81, 147, 0.15);
  padding: 20px 22px;
  transform: rotate(-2.5deg);
  transition: transform 0.25s ease;
}

.visual-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.visual-card-top {
  display: flex;
  justify-content: space-between;
  color: #52617a;
  font-size: 11px;
  font-weight: 700;
}

.visual-number {
  font-size: 20px;
  letter-spacing: -0.05em;
  margin: 20px 0 12px;
  color: var(--ink);
}

.visual-number strong {
  color: var(--blue);
}

.visual-rule {
  height: 1px;
  background: #edf0f5;
  margin-bottom: 12px;
}

.visual-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: #52617a;
  font-size: 11px;
}

.visual-row b {
  color: #515b74;
}

.visual-spark {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: #8e77f3;
  font-size: 26px;
}

.floating-badge {
  position: absolute;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 8px 22px rgba(53, 67, 125, 0.12);
  font-size: 11px;
  font-weight: 800;
  color: #68718a;
}

.badge-a {
  top: 24px;
  right: -10px;
  transform: rotate(4deg);
}

.badge-b {
  bottom: 20px;
  left: 0;
  transform: rotate(-5deg);
}

/* ========================================================
   중단한 게임 이어하기 (.resume-section)
   ======================================================== */
.resume-section {
  margin: 36px 0;
}

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

.resume-header h2 {
  font-size: 18px;
  letter-spacing: -0.04em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.resume-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.resume-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.resume-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.resume-info {
  flex: 1;
  min-width: 0;
}

.resume-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resume-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.resume-btn {
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ========================================================
   카테고리 칩 필터링 (.category-bar)
   ======================================================== */
.category-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: white;
  color: #52617a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip-btn:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.chip-btn.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.chip-count {
  font-size: 10px;
  opacity: 0.8;
}

/* ========================================================
   게임 카드 그리드 (.game-grid & .game-card)
   ======================================================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}

.game-card {
  min-height: 240px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #ced7fa;
}

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

.card-meta-pill {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--blue-light);
  color: var(--blue);
}

.card-arrow {
  color: #a0a6b5;
  font-size: 18px;
  transition: transform var(--transition-fast);
}

.game-card:hover .card-arrow {
  transform: translate(2px, -2px);
  color: var(--blue);
}

.card-icon {
  font-size: 34px;
  margin-bottom: 12px;
}

.game-card h3 {
  font-size: 18px;
  letter-spacing: -0.04em;
  margin: 0 0 8px;
  color: var(--ink-heading);
}

.game-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 20px;
  flex: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  margin-top: auto;
}

.card-time {
  font-size: 11px;
  color: var(--muted-light);
  font-weight: 600;
}

.card-cta {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.card-cta b {
  padding-left: 4px;
}

/* 빈 검색 결과 */
.empty-search {
  padding: 48px 24px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-strong);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 48px;
}

/* ========================================================
   미디어 쿼리
   ======================================================== */
@media (max-width: 960px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    padding: 40px 36px;
    grid-template-columns: 1.1fr 0.9fr;
  }
}

@media (max-width: 680px) {
  .hero {
    display: block;
    padding: 30px 20px 24px;
    margin: 18px 0 20px;
    min-height: auto;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero-visual {
    display: none;
  }
  .game-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .game-card {
    padding: 20px;
    min-height: auto;
  }
}
