/* =========================
   Reset & Base
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Apple SD Gothic Neo", "Noto Sans KR",
               Arial, sans-serif;
  background: #f4f6f9;           /* ⭐ 연한 배경 */
  color: #202020;
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* =========================
   Headings
========================= */
h1,
h2 {
  position: relative;
  padding-left: 10px;
}

h1::before,
h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  width: 4px;
  height: 80%;
  background: #1f9fb5;
  border-radius: 2px;
}
h1 {
  font-size: 24px;
  margin: 0 0 12px;
}

h2 {
  font-size: 20px;
  margin: 20px 0 12px;
}

/* =========================
   Header
========================= */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
  background: linear-gradient(
    180deg,
    #0b3a4a 0%,
    #0a2f3d 100%
  );
  border-bottom: 1px solid #134e63;
}

/* 내부 정렬 */
.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================
   Logo
========================= */
.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 29px;
  width: auto;
}

/* =========================
   Navigation
========================= */
.nav-nav {
  display: flex;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
}

/* 메뉴 링크 */
.nav-link {
  position: relative;
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px 10px;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

/* 하단 인디케이터 */
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #53C8E0;
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

/* hover */
.nav-link:hover {
  color: #ffffff;
  transform: translateY(-1px);
}
.nav-link:hover::after {
  width: 70%;
}

/* active */
.nav-link.is-active {
  color: #ffffff;
  font-weight: 600;
}
.nav-link.is-active::after {
  width: 70%;
}

/* =========================
   Burger (Mobile)
========================= */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
}

.nav-burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #e5e7eb;
  margin: 5px auto;
}

/* =========================
   Main Layout
========================= */
.nav-main {
  max-width: 980px;
  margin: 24px auto;
  padding: 0;
}

.contents {
  background: #ffffff;          /* ⭐ 콘텐츠 흰색 */
  border-radius: 10px;
  padding: 24px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

/* =========================
   Rank List : Card Grid
========================= */
.rank-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}

/* 태블릿 */
@media (max-width: 1024px) {
  .rank-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 모바일 */
@media (max-width: 640px) {
  .rank-list {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Footer
========================= */
.nav-footer {
  margin-top: 0px;
}

.nav-footer-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0px 12px;
  text-align: center;
}

.nav-footer-copy {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.7;
}

.nav-footer-copy a {
  color: #178ca4;
  text-decoration: underline;
}

/* =========================
   Mobile Navigation
========================= */
@media (max-width: 768px) {
  .nav-burger {
    display: block;
  }

  .nav-nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: #0f172a;
    border-bottom: 1px solid #1f2937;
  }

  .nav-nav.is-open {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
  }

  .nav-link {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }

  .nav-link::after {
    display: none;
  }
}

/* ==================================================
   Guide Table (rank-content)
================================================== */
#guide .responsive-table {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0 28px;
}

#guide table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
}

/* 헤더 */
#guide thead th {
  background: #f1f5f9;              /* 연한 블루 그레이 */
  color: #1f2937;
  font-weight: 600;
  padding: 12px 10px;
  border-bottom: 1px solid #d1d5db;
  text-align: center;
  white-space: nowrap;
}

/* 바디 */
#guide tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  line-height: 1.5;
  text-align: center;
}

/* 첫 컬럼 강조 */
#guide tbody td:first-child {
  font-weight: 600;
  color: #111827;
  background: #f9fafb;
}

/* 마지막 줄 보더 제거 */
#guide tbody tr:last-child td {
  border-bottom: none;
}

/* ==================================================
   Guide List (rank-content)
================================================== */
#guide ul {
  margin: 18px 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#guide li {
  list-style: none;
  position: relative;
  padding: 14px 16px 14px 36px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  color: #374151;
  line-height: 1.6;
}

/* 포인트 아이콘 */
#guide li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #178ca4; /* 메인 포인트 */
}

/* strong 강조 */
#guide li strong {
  display: inline-block;
  margin-bottom: 4px;
  font-weight: 600;
  color: #111827;
}

/* ==================================================
   Rank Item / Card
================================================== */
.rank-item {
  margin: 0;
}

.rank-card {
  display: block;
  height: 100%;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.rank-card:hover {
  border-color: #178ca4;
  box-shadow: 0 14px 34px rgba(20, 123, 219, 0.18);
  transform: translateY(-4px);
}

/* ==================================================
   Card Layout
================================================== */
.rank-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ==================================================
   Thumbnail
================================================== */
.rank-left {
  width: 100%;
  border-bottom: 1px solid #d1d5db;
}

.rank-thumb {
  width: 100%;
  height: 120px;
  background: #ffffff;
  overflow: hidden;
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-thumb img {
  max-width: 200px;
  max-height: 75px;
  width: auto;
  height: auto; 
  object-fit: contain; 
}

/* 기본 배지 */
.rank-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;

  width: 32px;
  height: 32px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  border:1px solid #d1d5db;   /* 기본 주황 */
  background:#ffffff;
  color: #178ca4;

  font-size: 14px;
  font-weight: 800;
  line-height: 1;

  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

/* 모바일 미세 조정 */
@media (max-width: 640px) {
  .rank-badge {
    top: 4px;
    left: 4px;
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
}

/* ==================================================
   Card Body
================================================== */
.rank-right {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 14px;
  gap: 4px;
  flex: 1;
}

.rank-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==================================================
   Title / Stars
================================================== */
.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rank-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Stars ---------- */
.rank-stars {
  display: inline-flex;
  align-items: center;
  --star-size: 14px;
  --star-color: #E6B800;
  --star-bg: #E5E7EB;

  position: relative;
  width: calc(var(--star-size) * 5);
  height: var(--star-size);
  font-size: var(--star-size);
  line-height: 1;
  flex-shrink: 0;
}

.rank-stars::before {
  content: "★★★★★";
  color: var(--star-bg);
}

.rank-stars span {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--rate) / 5 * 100%);
  overflow: hidden;
  white-space: nowrap;
}

.rank-stars span::before {
  content: "★★★★★";
  color: var(--star-color);
  text-shadow:
    -0.5px 0   rgba(0,0,0,0.35),
     0.5px 0   rgba(0,0,0,0.35),
     0   -0.5px rgba(0,0,0,0.35),
     0    0.5px rgba(0,0,0,0.35);
}

.rank-score {
  font-size:13px;
}

/* ==================================================
   Text Lines
================================================== */
.rank-textline {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;

  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

/* ==================================================
   Label (Icon-style)
================================================== */
.rank-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 3px 8px;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 혜택 */
.rank-label.volume {
  background: #e6f0fb;
  border: 1px solid #c7def6;
  color: #0c2135;
}

/* 한줄평 */
.rank-label.desc {
  background: #FFF7E0;
  border: 1px solid #F3E3B0;
  color: #3A1A0F;
}

/* 뒤쪽 텍스트 */
.rank-text {
  color: #334155;
}

/* ==================================================
   Footer / Button
================================================== */
.rank-foot {
  margin-top: auto;
  padding-top: 14px;
}

.rank-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  padding: 6px 0;

  background: #ffffff;
  border: 2px solid #178ca4;
  border-radius: 10px;

  color: #178ca4;
  font-size: 15px;
  font-weight: 600;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.rank-card:hover .rank-btn {
  background: #178ca4;
  color: #ffffff;
}

.rank-arrow {
  margin-left: 6px;
  font-size: 16px;
}