* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --main-purple-area-bg: url("assets/mainback.png") center top / cover no-repeat, #33285c;
  --main-purple-area-overlay-bg: url("assets/mainback.png") center top / cover no-repeat;
  --subpage-subject-base-bg: url("assets/mainback.png") center top / cover no-repeat, #33285c;
  --subpage-subject-overlay-pc: url("assets/pc-purple.png") center top / 100% 100% no-repeat;
}

body {
  font-family: "Microsoft JhengHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #3d3d3d;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ===== Background ===== */
.page-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background: linear-gradient(180deg, #2a2150 0%, #1a1440 40%, #2a2150 70%, #1a1440 100%);
  overflow: hidden;
}
.page-bg .star {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.7; }
}
.page-bg .planet {
  position: absolute;
  border-radius: 50%;
}
.planet-1 {
  width: 200px; height: 200px;
  background: radial-gradient(circle at 40% 40%, #9b8bd4, #6a5aae, #4c3d80);
  left: -70px; bottom: 22%;
  opacity: 0.65;
  box-shadow: 0 0 60px rgba(107,90,174,0.3);
}
.planet-2 {
  width: 70px; height: 70px;
  background: radial-gradient(circle at 40% 40%, #d4b888, #b89868);
  right: 60px; top: 48%;
  opacity: 0.45;
}
.decor-star { position: absolute; z-index: 1; }
.decor-star svg { display: block; }
.decor-star-1 { right: 40px; top: 32%; }
.decor-star-2 { right: 130px; top: 40%; }
.decor-star-3 { right: 20px; bottom: 35%; }
.decor-star-4 { left: 50px; top: 52%; }

/* ===== Header ===== */
.header {
  position: relative;
  z-index: 10;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.logo-icon {
  width: 118px;
  height: 80px;
  background: url("assets/logo-desktop.png") center center / contain no-repeat;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  flex-shrink: 0;
}
.logo-icon span,
.footer-logo span {
  opacity: 0;
}
nav {
  display: flex;
  gap: 22px;
}
nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s;
  padding: 4px 0;
}
nav a:hover, nav a.active {
  color: #fe6e2c;
}
.header-right {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  text-align: right;
}

/* ===== Hero / Banner ===== */
.hero {
  position: relative;
  z-index: 5;
  min-height: 260px;
  overflow: visible;
}
.hero-inner {
  position: relative;
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 40px;
  min-height: 200px;
}
.hero-balls {
  position: absolute;
  left: 0;
  top: -30px;
  width: 480px;
  height: 280px;
  pointer-events: none;
}
.hero-ball {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: drop-shadow(2px 6px 10px rgba(0,0,0,0.18));
}
.hero-ball::after {
  display: none;
}
.hero-ball-1 { width: 56px; height: 56px; left: 20px; top: 95px; background-image: url("assets/06.png"); }
.hero-ball-2 { width: 48px; height: 48px; left: 85px; top: 40px; background-image: url("assets/02.png"); }
.hero-ball-3 { width: 58px; height: 58px; left: 105px; top: 115px; background-image: url("assets/08.png"); }
.hero-ball-4 { width: 44px; height: 44px; left: 175px; top: 55px; background-image: url("assets/03.png"); }
.hero-ball-5 { width: 62px; height: 62px; left: 190px; top: 135px; background-image: url("assets/05.png"); }
.hero-ball-6 { width: 48px; height: 48px; left: 270px; top: 70px; background-image: url("assets/07.png"); }
.hero-ball-7 { width: 52px; height: 52px; left: 295px; top: 145px; background-image: url("assets/01.png"); }
.hero-ball-8 { width: 44px; height: 44px; left: 355px; top: 50px; background-image: url("assets/08.png"); }
.hero-ball-9 { width: 56px; height: 56px; left: 375px; top: 120px; background-image: url("assets/04.png"); }

.hero-coin {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700 0%, #f0b800 50%, #daa520 100%);
  border: 2px solid #c8960c;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 2px rgba(255,255,255,0.4);
  animation: float-coin 3.5s ease-in-out infinite;
}
.coin-1 { width: 26px; height: 26px; left: 260px; top: 25px; animation-delay: 0s; }
.coin-2 { width: 20px; height: 20px; left: 350px; top: 15px; animation-delay: 0.6s; }
.coin-3 { width: 24px; height: 24px; left: 430px; top: 55px; animation-delay: 1.2s; }
.coin-4 { width: 22px; height: 22px; right: 220px; top: 8px; animation-delay: 0.3s; }
.coin-5 { width: 26px; height: 26px; right: 120px; top: 45px; animation-delay: 0.9s; }
.coin-6 { width: 18px; height: 18px; left: 160px; top: 15px; animation-delay: 1.5s; }
.coin-7 { width: 22px; height: 22px; right: 300px; top: 30px; animation-delay: 0.4s; }

@keyframes float-coin {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

.countdown-section {
  text-align: right;
  color: #fff;
}
.countdown-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 15px;
}
.countdown-label .tag {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 5px 18px;
  font-size: 14px;
}
.countdown-label .period-num {
  color: #fe6e2c;
  font-weight: 700;
  text-decoration: underline;
}
.countdown-timer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 12px;
}
.countdown-timer .time-block {
  background: #0d0d0d;
  border-radius: 10px;
  padding: 10px 16px;
  min-width: 78px;
  text-align: center;
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  border: 1px solid rgba(255,255,255,0.08);
}
.countdown-timer .colon {
  font-size: 40px;
  font-weight: 700;
  color: #fe6e2c;
  line-height: 1;
}
.deadline-text {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

/* ===== Subpage Content Area ===== */
.subpage-transition {
  position: relative;
  z-index: 5;
  background: linear-gradient(180deg, transparent 0%, #3d3575 100%);
  height: 80px;
  margin-top: -10px;
}
.subpage-content {
  position: relative;
  z-index: 5;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 20px 60px;
  width: 100%;
}
.subpage-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
}

/* Sub-navigation tabs */
.sub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #c3d0d7;
  margin-bottom: 24px;
}
.sub-tab {
  padding: 12px 28px;
  font-size: 15px;
  color: #606266;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.sub-tab:hover {
  color: #fe6e2c;
}
.sub-tab.active {
  color: #fe6e2c;
  border-bottom-color: #fe6e2c;
  font-weight: 600;
}

/* White content card */
.content-card {
  background: rgba(255,255,255,0.96);
  border-radius: 14px;
  padding: 32px 36px;
}

/* ===== Ball System ===== */
.ball-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ball {
  position: relative;
  display: block;
  flex-shrink: 0;
}
.ball .ball-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
}
.ball::before {
  display: none;
}
.ball::after {
  display: none;
}
.ball.large {
  width: 73px; height: 73px;
}
.ball.small {
  width: 48px; height: 48px;
}
.zodiac {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  padding: 9px 22px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-outline {
  background: rgba(255,255,255,0.95);
  color: #fe6e2c;
  border-color: rgba(255,255,255,0.95);
}
.btn-primary {
  background: #fe6e2c;
  color: #fff1ea;
  border-color: #fe6e2c;
}
.btn-primary:hover { background: #e5622a; }

/* Filter buttons */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  padding: 7px 22px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #606266;
  font-family: inherit;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: #fe6e2c; color: #fe6e2c; }
.filter-btn.active {
  border-color: #fe6e2c;
  color: #fe6e2c;
  background: #fff1ea;
}
.search-input {
  padding: 7px 14px 7px 32px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 10px center no-repeat;
  min-width: 160px;
}
.search-input:focus { border-color: #fe6e2c; }

/* ===== Lottery item (used in announcement and home) ===== */
.lottery-item {
  background: rgba(255,255,255,0.96);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  transition: transform 0.2s;
}
.lottery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.lottery-item-left {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 16px;
}
.lottery-item-header {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.lottery-item-period {
  background: #ffedbe;
  border-radius: 20px;
  padding: 5px 20px;
  font-size: 14px;
  color: #333;
}
.lottery-item-period .num {
  color: #fe6e2c;
  font-weight: 700;
  text-decoration: underline;
}
.lottery-item-time {
  font-size: 14px;
  color: #606266;
}
.lottery-item-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lottery-item-time-label {
  font-size: 14px;
  color: #333;
  font-weight: 700;
}
.lottery-item-balls {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.lottery-item-balls .plus {
  font-size: 18px;
  color: #999;
  margin: 0 2px;
  align-self: center;
  padding-top: 8px;
}

/* ===== Footer ===== */
.footer {
  background: #fff;
  padding: 32px 40px;
  margin-top: auto;
  position: relative;
  z-index: 5;
}
.footer-inner {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.footer-logo {
  width: 106px;
  height: 72px;
  background: url("assets/logo-desktop.png") center center / contain no-repeat;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-weight: 900;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  flex-shrink: 0;
}
.footer-info {
  font-size: 13px;
  color: #848484;
  line-height: 1.9;
}
.footer-info a {
  color: #666;
  text-decoration: none;
}
.footer-info a:hover { text-decoration: underline; }

@media (min-width: 769px) {
  body {
    background: var(--main-purple-area-bg);
  }

  .page-bg {
    background: var(--main-purple-area-bg);
  }

  .page-bg .star,
  .page-bg .planet,
  .page-bg .decor-star {
    display: none;
  }

  .header {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    padding: 10px 34px 0;
    gap: 18px;
    background: url("assets/header-overlay.png") top center / 100% 80px no-repeat;
  }

  .header-left {
    gap: 34px;
  }

  nav {
    gap: 34px;
  }

  nav a {
    color: rgba(255,255,255,0.96);
    font-size: 17px;
    font-weight: 700;
  }

  .header-right {
    color: #c3d0d7;
    font-size: 18px;
    font-weight: 600;
  }

  .hero {
    min-height: 390px;
    margin-top: 0;
    background:
      linear-gradient(90deg, rgba(10,87,205,0.2) 0%, rgba(26,112,235,0.05) 38%, rgba(48,165,255,0) 70%),
      url("38a7eb26.png") center center / cover no-repeat;
  }

  .hero-inner {
    max-width: 1400px;
    min-height: 390px;
    padding: 108px 42px 44px;
    justify-content: flex-end;
    align-items: center;
  }

  .hero-balls,
  .hero-coin {
    display: none;
  }

  .countdown-section {
    width: min(100%, 620px);
    color: #fff;
  }

  .countdown-label {
    gap: 18px;
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 700;
  }

  .countdown-label .tag {
    padding: 10px 24px;
    border: none;
    border-radius: 999px;
    background: #ffedbe;
    color: #16242c;
    font-size: 18px;
  }

  .countdown-label .period-num {
    color: #fe6e2c;
    text-decoration: none;
  }

  .countdown-timer {
    gap: 12px;
    margin-bottom: 22px;
  }

  .countdown-timer .time-block {
    min-width: 146px;
    padding: 18px 20px;
    border: none;
    border-radius: 14px;
    background: #16242c;
    color: #ffd600;
    font-size: 86px;
    line-height: 1;
    letter-spacing: 1px;
  }

  .countdown-timer .colon {
    color: #16242c;
    font-size: 56px;
  }

  .deadline-text {
    color: #16242c;
    font-size: 18px;
    font-weight: 600;
  }

  .page-home .hero {
    min-height: 470px;
  }

  .page-home .hero-inner {
    min-height: 470px;
    padding-top: 118px;
    padding-bottom: 54px;
  }

  .page-home .footer {
    padding: 28px 40px 36px;
  }

  .page-home .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .page-home .footer-info {
    max-width: 1170px;
    text-align: center;
  }

  .page-home .history-section #historyList .lottery-item-home {
    padding: 8px;
  }

  .page-home .history-section #historyList .lottery-item-home .lottery-item-left {
    gap: 10px;
  }

  .page-home .history-section #historyList .lottery-item-home .lottery-item-header {
    gap: 0;
  }

  .page-home .history-section #historyList .lottery-item-home .lottery-item-time-row {
    margin-top: 4px;
  }

  .page-announcement .subpage-transition,
  .page-faq .subpage-transition {
    display: none;
  }

  .page-announcement .subpage-content,
  .page-faq .subpage-content {
    position: relative;
    overflow: hidden;
    z-index: 0;
    padding-top: 24px;
    padding-bottom: 68px;
  }

  .page-announcement .subpage-content::before,
  .page-faq .subpage-content::before,
  .page-faq .subpage-content::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 100vw;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: -2;
  }

  .page-announcement .subpage-content > *,
  .page-faq .subpage-content > * {
    position: relative;
    z-index: 1;
  }

  .page-faq .subpage-content {
    --subject-shell-band-height: clamp(254px, 27.6vw, 323px);
    margin-top: -94px;
    padding-top: 94px;
  }

  .page-faq .subpage-content::before {
    top: 0;
    bottom: auto;
    height: var(--subject-shell-band-height);
    z-index: -1;
    background: var(--subpage-subject-overlay-pc);
  }

  .page-faq .subpage-content::after {
    top: calc(var(--subject-shell-band-height) - 66px);
    background: var(--subpage-subject-base-bg);
  }

  .page-faq .subpage-title {
    font-size: 27px;
    color: #fff1ea;
    margin-bottom: 20px;
  }

  .page-faq .sub-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(135, 135, 135, 0.92);
  }

  .page-faq .sub-tab {
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 700;
    color: #878787;
  }

  .page-faq .sub-tab.active {
    color: #fff1ea;
    border-bottom-color: #fff1ea;
  }

  .page-faq .content-card {
    border-radius: 20px;
    padding: 28px;
  }

  .page-faq .faq-item {
    padding: 0;
    border-bottom: none;
    margin-bottom: 24px;
  }

  .page-faq .faq-item:last-child {
    margin-bottom: 0;
  }

  .page-faq .faq-question {
    margin-bottom: 4px;
    font-size: 16px;
    color: #bf5321;
  }

  .page-faq .faq-answer {
    padding-left: 0;
    color: #656565;
  }

  .page-announcement .subpage-content {
    --announcement-band-height: clamp(254px, 27.6vw, 323px);
    max-width: 1170px;
    margin-top: -84px;
    padding: 94px 20px 84px;
    overflow: visible;
    z-index: 5;
  }

  .page-announcement .subpage-content::before {
    top: 0;
    bottom: auto;
    height: var(--announcement-band-height);
    z-index: -2;
    background: url("assets/origin-back-pc.png") center top / 100% 100% no-repeat;
    background-repeat: no-repeat;
    margin-top: 40px;
  }

  .page-announcement .subpage-content::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(var(--announcement-band-height) - 66px);
    bottom: 0;
    width: 100vw;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: -3;
    background: var(--main-purple-area-bg);
  }

  .page-announcement .subpage-title {
    font-size: 27px;
    color: #fff1ea;
    margin-bottom: 20px;
  }

  .page-announcement .subpage-content > * {
    width: min(688px, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .page-announcement .sub-tabs {
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(135, 135, 135, 0.92);
  }

  .page-announcement .sub-tab {
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 700;
    color: #878787;
  }

  .page-announcement .sub-tab.active {
    color: #fff1ea;
    border-bottom-color: #fff1ea;
  }

  .page-announcement .content-card {
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .page-announcement .announcement-title-row {
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 18px;
  }

  .page-announcement .announcement-subtitle {
    font-size: 21px;
    color: #fff1ea;
  }

  .page-announcement .filter-bar {
    margin-bottom: 0;
    justify-content: flex-end;
  }

  .page-announcement .filter-btn {
    height: 36px;
    padding: 0 16px;
    border: 2px solid #e9d5a6;
    border-radius: 4px;
    background: transparent;
    color: #e9d5a6;
    font-size: 16px;
    font-weight: 700;
  }

  .page-announcement .filter-btn.active {
    border-color: #fff1ea;
    background: #fff1ea;
    color: #fe6e2c;
  }

  .page-announcement .search-input {
    min-width: 180px;
    height: 36px;
    border: 2px solid #e9d5a6;
    border-radius: 4px;
    color: #fff1ea;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e9d5a6' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  }

  .page-announcement .search-input::placeholder {
    color: rgba(255, 241, 234, 0.72);
  }

  .page-announcement #announcementList {
    margin-top: 44px;
  }

  .page-announcement .lottery-item {
    margin-bottom: 20px;
    padding: 24px 28px;
    border-radius: 20px;
    box-shadow: 0 16px 30px rgba(12, 18, 44, 0.14);
  }

  .page-announcement .lottery-item-period {
    background: #ffedbe;
  }

  .page-announcement .lottery-item-period .num {
    text-decoration: none;
  }
}

/* ===== Replay Modal ===== */
.replay-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.replay-modal.show {
  display: block;
}
.replay-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
}
.replay-modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* 桌面端整体大小：宽度大约屏幕的一半，高度适中 */
  width: min(50vw, 520px);
  max-height: min(70vh, 520px);
  overflow: hidden;
  border-radius: 10px;
  background: #f3f3f3;
  display: flex;
  flex-direction: column;
}
.replay-modal-close {
  position: absolute;
  right: 14px;
  top: 8px;
  border: none;
  background: transparent;
  color: #9ca0a6;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.replay-modal-top {
  /* 顶部内容区域整体缩小一些 */
  padding: 18px 28px 12px;
  border-bottom: 1px solid #d8d8d8;
}
.replay-modal-period {
  display: inline-block;
  background: #efe0b9;
  border-radius: 36px;
  padding: 8px 26px;
  font-size: 32px;
  font-weight: 700;
  color: #1f2c38;
  margin-bottom: 18px;
}
.replay-modal-period .num {
  color: #fe6e2c;
}
.replay-modal-balls {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.replay-modal-balls .plus {
  font-size: 40px;
  color: #3a5868;
  font-weight: 700;
  margin: 0 6px;
  align-self: center;
  padding-top: 4px;
}
.replay-modal-balls .ball.large {
  width: 80px;
  height: 80px;
  font-size: 38px;
}
.replay-modal-balls .zodiac {
  font-size: 32px;
  line-height: 1;
  color: #3e3e3e;
  font-weight: 700;
}
.replay-modal-time {
  font-size: 24px;
  color: #3f3f3f;
  font-weight: 600;
}
.replay-modal-video-wrap {
  background: #111;
  aspect-ratio: 16 / 9;
}
#replayModalVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .replay-modal-panel {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 8px;
  }
  .replay-modal-top {
    padding: 16px 12px 10px;
  }
  .replay-modal-close {
    font-size: 28px;
    right: 10px;
    top: 8px;
  }
  .replay-modal-period {
    font-size: 22px;
    padding: 8px 16px;
    margin-bottom: 12px;
  }
  .replay-modal-balls {
    gap: 8px;
    margin-bottom: 10px;
  }
  .replay-modal-balls .plus {
    font-size: 30px;
    margin: 0 2px;
    padding-top: 4px;
  }
  .replay-modal-balls .ball.large {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
  .replay-modal-balls .zodiac {
    font-size: 18px;
  }
  .replay-modal-time {
    font-size: 18px;
  }
  .header {
    padding: 12px 16px;
    align-items: flex-start;
  }
  .header-left {
    width: 100%;
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
  }
  nav {
    display: flex;
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  nav::-webkit-scrollbar {
    display: none;
  }
  nav a {
    white-space: nowrap;
    font-size: 14px;
  }
  .header-right {
    width: 100%;
    text-align: left;
    font-size: 12px;
  }
  .hero-inner { padding: 0 16px; min-height: 160px; }
  .hero-balls { width: 220px; height: 180px; }
  .hero-ball { transform: scale(0.55); }
  .hero-coin { transform: scale(0.7); }
  .countdown-timer .time-block { font-size: 30px; min-width: 54px; padding: 8px 10px; }
  .countdown-timer .colon { font-size: 26px; }
  .ball.large { width: 52px; height: 52px; font-size: 20px; }
  .ball.small { width: 38px; height: 38px; font-size: 15px; }
  .lottery-item { padding: 16px 14px; }
  .lottery-item-balls { gap: 6px; }
  .subpage-content { padding: 0 16px 40px; }
  .content-card {
    padding: 20px 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sub-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .sub-tab {
    padding: 10px 16px;
    font-size: 14px;
    flex-shrink: 0;
  }
  .filter-bar {
    width: 100%;
    gap: 8px;
  }
  .search-input {
    width: 100%;
    min-width: 0;
  }
  .footer { padding: 20px 16px; }
  .footer-inner { flex-direction: column; }
}
@media (max-width: 480px) {
  .hero-balls { display: none; }
  .countdown-timer .time-block { font-size: 24px; min-width: 44px; padding: 6px 8px; }
  .ball.large { width: 44px; height: 44px; font-size: 18px; }
  .ball.small { width: 32px; height: 32px; font-size: 13px; }
  .zodiac { font-size: 12px; }
}
