/* 롱숏모드 게임 페이지 - 팩팅 전용 남색 배경 (뉴스 배너와 동일) */
.long-short-game-page {
  min-height: 100vh;
  padding: 1rem 0 2rem;
  background: radial-gradient(circle at 40% 70%, #0b2242 0%, #15161b 100%);
}

.long-short-game-wrap {
  min-height: 0;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #fff;
  font-family: inherit;
  overflow: hidden;
}

/* 카드 컨테이너 - 데스크탑에서도 뷰포트 높이 안에 맞춤 */
.ls-card {
  width: 100%;
  max-width: 32rem;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* 헤더 */
.ls-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.5);
}

.ls-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ls-brand-icon {
  background: #2563eb;
  padding: 0.375rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.ls-brand-icon svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  fill: white;
}

.ls-brand-text {
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.05em;
  font-size: 1.25rem;
}

.ls-score-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.ls-score-value {
  font-size: 1.5rem;
  font-weight: 900;
}

.ls-score-value.negative {
  color: #ef4444;
}

.ls-score-value.positive {
  color: #60a5fa;
}

/* 컨텐츠 영역 - 뷰포트 높이 안에 맞춤, 스크롤 없음 */
.ls-content {
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 120px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* READY 화면 */
.ls-ready {
  text-align: center;
}

.ls-ready-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  color: #3b82f6;
  animation: ls-bounce 1s ease-in-out infinite;
}

@keyframes ls-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.ls-rules-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: opacity 0.2s;
}

.ls-rules-icon:hover {
  opacity: 0.85;
}

.ls-rules-icon:active {
  opacity: 0.7;
}

.ls-rules-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
}

.ls-rules-icon-header {
  margin-left: -0.15rem;
  transform: translateY(2px);
}

.ls-rules-icon-header svg {
  width: 1rem;
  height: 1rem;
}

.ls-ready-title {
  font-size: 1.875rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  color: #fff;
}

.ls-ready-desc {
  color: #94a3b8;
  font-size: 0.875rem;
  max-width: 280px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.ls-start-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 1rem;
  font-weight: 900;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
  transition: background 0.2s, transform 0.1s;
}

.ls-start-btn:hover {
  background: #3b82f6;
  transform: scale(1.02);
}

.ls-start-btn:active {
  transform: scale(0.98);
}

/* PLAYING 화면 */
.ls-playing {
  width: 100%;
  animation: ls-fade-in 0.3s ease-out;
}

@keyframes ls-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ls-playing-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ls-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 0.875rem;
  font-family: ui-monospace, monospace;
  font-weight: 900;
}

.ls-timer--urgent {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.ls-timer svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.ls-combo {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(249, 115, 22, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #f97316;
  font-weight: 900;
  font-style: italic;
  font-size: 0.75rem;
  animation: ls-pulse 1.5s ease-in-out infinite;
}

@keyframes ls-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* 뉴스 카드 */
.ls-news-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.ls-badge-breaking {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  z-index: 10;
  font-size: 10px;
  font-weight: 900;
  color: white;
  background: #2563eb;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.ls-news-card {
  background: white;
  color: #0f172a;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.ls-news-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 6rem;
  height: 6rem;
  background: #eff6ff;
  opacity: 0.1;
  border-radius: 50%;
  margin-right: -3rem;
  margin-top: -3rem;
}

.ls-news-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 0.5rem;
}

.ls-news-meta {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ls-news-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* 버튼 그리드 */
.ls-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 0.5rem;
}

.ls-buttons-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ls-btn-long {
  height: 6rem;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 1rem;
  font-weight: 900;
  font-size: 1.125rem;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
  transition: background 0.2s, transform 0.1s;
}

.ls-btn-long:hover {
  background: #34d399;
}

.ls-btn-long:active {
  transform: scale(0.95);
}

.ls-btn-short {
  height: 6rem;
  background: #f43f5e;
  color: white;
  border: none;
  border-radius: 1rem;
  font-weight: 900;
  font-size: 1.125rem;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(244, 63, 94, 0.3);
  transition: background 0.2s, transform 0.1s;
}

.ls-btn-short:hover {
  background: #fb7185;
}

.ls-btn-short:active {
  transform: scale(0.95);
}

.ls-btn-aggressive {
  padding: 0.75rem;
  border-radius: 0.75rem;
  font-weight: 900;
  font-size: 10px;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  cursor: pointer;
  border: 1px solid;
  transition: background 0.2s;
}

.ls-btn-aggressive-long {
  background: rgba(5, 46, 22, 0.6);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.ls-btn-aggressive-long:hover {
  background: #064e3b;
}

.ls-btn-aggressive-short {
  background: rgba(76, 5, 25, 0.6);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

.ls-btn-aggressive-short:hover {
  background: #881337;
}

/* RESULT 화면 - 배율로 한 화면에 맞춤 (LEGENDARY TRADE 등 스크롤 없이) */
.ls-result {
  width: 100%;
  max-width: 100%;
  text-align: center;
  animation: ls-slide-up 0.5s ease-out;
  transform: scale(0.88);
  transform-origin: center center;
}

@keyframes ls-slide-up {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(0.88);
  }
}

/* 모바일: scale 없이 슬라이드만 (확대 모션 방지) */
@keyframes ls-slide-up-mobile {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ls-result-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ls-result-title {
  font-size: 2rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.05em;
}

.ls-result-title.jackpot { color: #facc15; }
.ls-result-title.great { color: #34d399; }
.ls-result-title.close-call { color: #fb923c; }
.ls-result-title.fail { color: #ef4444; }

.ls-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #facc15;
  color: #000;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-weight: 900;
  font-size: 10px;
  text-transform: uppercase;
  animation: ls-bounce 0.6s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.4);
}

.ls-result-badge svg {
  width: 0.75rem;
  height: 0.75rem;
}

.ls-result-box {
  background: rgba(30, 41, 59, 0.4);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #334155;
  margin-bottom: 0.75rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ls-result-box.jackpot {
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 30px rgba(234, 179, 8, 0.15);
  background: rgba(234, 179, 8, 0.05);
}

.ls-result-date {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.ls-result-change {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 0.75rem;
}

.ls-result-change.positive { color: #34d399; }
.ls-result-change.negative { color: #fb7185; }

.ls-result-reason {
  width: 3rem;
  height: 1px;
  background: #334155;
  margin: 0 auto 0.5rem;
}

.ls-result-reason-text {
  color: #cbd5e1;
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 500;
  padding: 0 0.5rem;
}

.ls-result-points {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.ls-result-points.positive { color: #60a5fa; }
.ls-result-points.positive.jackpot { color: #facc15; }
.ls-result-points.negative { color: #ef4444; }

.ls-result-points svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.ls-next-btn {
  width: 100%;
  padding: 0.75rem;
  background: white;
  color: #0f172a;
  border: none;
  border-radius: 0.75rem;
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, transform 0.1s;
}

.ls-next-btn:hover {
  background: #e2e8f0;
}

.ls-next-btn:active {
  transform: scale(0.95);
}

.ls-result-points-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

/* GAME OVER 화면 */
.ls-over {
  text-align: center;
  animation: ls-zoom-in 0.5s ease-out;
}

@keyframes ls-zoom-in {
  from {
    opacity: 0;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ls-over-label {
  font-size: 0.875rem;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
}

.ls-over-title {
  font-size: 3rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
  color: #fff;
}

.ls-over-score {
  font-size: 5rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.ls-try-again-btn {
  width: 100%;
  padding: 1.25rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 1rem;
  font-weight: 900;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.3);
  transition: background 0.2s, transform 0.1s;
}

.ls-try-again-btn:hover {
  background: #3b82f6;
}

.ls-try-again-btn:active {
  transform: scale(0.95);
}

/* Rules 팝업 */
.ls-rules-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.ls-rules-modal.ls-modal-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.ls-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.ls-modal-content {
  position: relative;
  width: 100%;
  max-width: 22rem;
  max-height: 90vh;
  overflow-y: auto;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
}

.ls-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ls-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.ls-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.2s, background 0.2s;
}

.ls-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.ls-modal-rules {
  margin: 0;
  padding-left: 1.25rem;
  color: #cbd5e1;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.ls-modal-rules li {
  margin-bottom: 0.75rem;
}

.ls-modal-rules li:last-child {
  margin-bottom: 0;
}

/* 아이콘 공통 */
.ls-icon {
  display: inline-block;
  vertical-align: middle;
}

/* 모바일: 2번 - 뷰포트 높이 고정, 스크롤 없이 한 화면에 맞춤 */
@media (max-width: 768px) {
  .long-short-game-page {
    padding: 0;
    min-height: 100dvh;
    min-height: 100svh;
  }

  .long-short-game-wrap {
    min-height: 0;
    height: 100dvh;
    height: 100svh;
    max-height: 100dvh;
    max-height: 100svh;
    overflow: hidden;
    padding: 0.25rem;
    align-items: center;
    justify-content: center;
  }

  .ls-card {
    max-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .ls-header {
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
  }

  .ls-brand-text {
    font-size: 1rem;
  }

  .ls-score-value {
    font-size: 1.25rem;
  }

  .ls-content {
    flex: 1;
    min-height: 0;
    max-height: calc(100dvh - 70px);
    max-height: calc(100svh - 70px);
    padding: 0.5rem 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* READY 화면 압축 */
  .ls-ready-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.75rem;
  }

  .ls-ready-title {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }

  .ls-ready-desc {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .ls-start-btn {
    padding: 0.75rem;
    font-size: 1rem;
  }

  /* PLAYING 화면 압축 */
  .ls-playing {
    width: 100%;
    max-width: 100%;
  }

  .ls-playing-top {
    margin-bottom: 0.5rem;
  }

  .ls-news-wrap {
    margin-bottom: 0.5rem;
  }

  .ls-news-card {
    padding: 1rem;
  }

  .ls-news-title {
    font-size: 1.05rem;
    margin-top: 0.25rem;
  }

  .ls-news-meta {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    font-size: 9px;
  }

  .ls-buttons {
    gap: 0.5rem;
    padding-top: 0.25rem;
  }

  .ls-btn-long,
  .ls-btn-short {
    height: 3.5rem;
    font-size: 0.95rem;
  }

  .ls-btn-aggressive {
    padding: 0.5rem;
    font-size: 9px;
  }

  /* RESULT 화면 - 모바일은 처음부터 확대된(scale 1) 상태로 등장, 확대 모션 없음 */
  .ls-result {
    transform: none;
    animation: ls-slide-up-mobile 0.4s ease-out;
  }

  .ls-result-title-wrap {
    margin-bottom: 0.5rem;
  }

  .ls-result-title {
    font-size: 1.5rem;
  }

  .ls-result-box {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .ls-result-date {
    font-size: 9px;
  }

  .ls-result-change {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .ls-result-reason-text {
    font-size: 0.75rem;
    padding: 0 0.5rem;
  }

  .ls-result-points {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .ls-result-points-wrap {
    gap: 0.5rem;
  }

  .ls-next-btn {
    padding: 0.75rem;
    font-size: 1rem;
  }

  /* GAME OVER 화면 압축 */
  .ls-over-label {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
  }

  .ls-over-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .ls-over-score {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .ls-try-again-btn {
    padding: 1rem;
    font-size: 1.1rem;
  }
}
