/* ===== 기본 변수 ===== */
:root{
  --card-bg: #0f1724;
  --card-elev: rgba(0,0,0,0.6);
  --text: #000000;
  --muted: #EEE;
  --chip-bg: #ffffff;
  --chip-border: rgba(255,255,255,0.06);
  --radius: 12px;
  --gap: 12px;
  --accent-completed: #16a34a;
  --accent-drawing: #f59e0b;
  --accent-inprogress: #3b82f6;
  --bg: #070607;
}

body {
  background: #000;
  font-family: sans-serif;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px;
  margin:0;
}

  h1 {
    text-align: center;
    color: #f59e0b;
    font-size: 2.2em;
  }

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background-color: #111827;
  border-bottom: 2px solid #1f2937;
  border-radius: 10px;
  width:100%;
  box-sizing:border-box;
}

header .logo {
  font-size: 1.6em;
  font-weight: bold;
  color: #f59e0b;
  text-decoration: none;
}

header .nav-links {
  display: flex;
  gap: 20px;
}

header .nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05em;
  transition: color 0.2s ease;
}

header .nav-links a:hover {
  color: #f59e0b;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  margin-top: 40px;
  padding: 25px;
  background-color: #1e293b;
  border-radius: 12px;
  font-size: 0.95em;
  color: #cbd5e1;
  width:100%;
}

footer a {
  color: #f59e0b;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

  .footer-menu {
    margin-top: 10px;
  }


/* ===== 칩 & 카드 ===== */
.chip-set {
  float: left;
  width: 320px;
  background: #111;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
  margin: 10px;
  min-width: 280px;
}

.round-info {
  font-size: 1.3em;
  font-weight: bold;
  color: #f59e0b;
  text-align: center;
  margin-bottom: 12px;

  /* 애니메이션 */
  animation: blinkGlow 3s linear infinite;
  box-shadow: 0 0 4px rgba(255, 215, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.round-info:hover {
  transform: scale(1.01);
  color: #ff0000;
}

.round-info:active {
  transform: scale(0.99);
  color: #ff0000;
  transition: transform 0.1s ease, color 0.2s ease;
}

.chip-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.chip {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #3946e6;
  border: 2px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;

  /* 애니메이션 */
  animation: pulseGlow 2.8s ease-in-out infinite;
  box-shadow: 0 0 0 rgba(34,197,94, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip .disk {
  width: 68%;
  height: 68%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 1.2em;
  color: #111;
}

.chip .bet {
  position: absolute;
  bottom: 4px;
  font-size: 0.65em;
  color: #111;
  font-weight: bold;
}

/* 선택된 칩 */
.chip.selected {
  background: #888888;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(22,163,74,0.7);
}
.chip.selected .disk {
  color: #16a34a;
}

.chipsmall {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #888888;
  border: 1px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.chipsmall .disk {
  width: 68%;
  height: 68%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 1.2em;
  color: #111;
}

.chipbig {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #16a34a;
  border: 1px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;

  /* 애니메이션 */
  animation: pulseGlow 2.8s ease-in-out infinite;
  box-shadow: 0 0 0 rgba(34,197,94, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chipbig:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(34,197,94, 0.9);
}

/* 내부 원 */
.chipbig .disk {
  width: 68%;
  height: 68%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 1.0em;
  text-align: center;
  color: #111;
}

/* 핵심 애니메이션 */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(34,197,94, 0.6);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(34,197,94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34,197,94, 0);
  }
}

@keyframes blinkGlow {
  0% {
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
  }
  50% {
    box-shadow: 0 0 0 rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
  }
}

/* 반응형 */
@media (max-width: 480px) {
  .chip-set { width: 90%; }
  .chip { width: 50px; height: 50px; }
}

.pbcibtn {
  /* 애니메이션 */
  animation: pulseGlow 2.8s ease-in-out infinite;
  box-shadow: 0 0 0 rgba(212, 175, 55, 0.7); /* rich gold */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ===== 진행/완료 카드 ===== */
.lottery{
  float: left;
  width: 320px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border: 1px solid var(--card-elev);
  border-radius: var(--radius);
  padding: 16px;
  margin: 10px;
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}

.lottery-head{
  display:flex;
  justify-content:space-between;
  gap: var(--gap);
  align-items:center;
  margin-bottom:12px;
  color:#888;
}
.lottery-head .meta{
  display:flex;
  color:#888;
  flex-direction:column;
  align-items:flex-start;
}
.label{
  font-size:20px;
  color:var(--muted);
  letter-spacing:0.05em;
}
.lottery-head time,
.height{
  font-weight:600;
  font-size:20px;
  margin-top:4px;
}

.lottery-body{
  display:flex;
  flex-direction:column;
  gap: var(--gap);
  align-items:flex-start;
  padding: 8px 0;
}
.winning-chars{
  font-size:32px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.result{ width:100%;text-align:right;  }
.result-label{ font-size:20px; color:var(--muted); margin-bottom:4px; }
.result-text{
  font-size:16px;
  color:#DDDDDD;
  font-weight:400;
  padding:8px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.05);
  background:rgba(255,255,255,0.03);
}

.status{
  padding:6px 12px;
  border-radius:999px;
  font-weight:700;
  font-size:20px;
}

/* 상태별 색상 */
.lottery.completed{ border-color: rgba(255,255,255,0.14);}
.lottery.completed .status{ background: rgba(16,185,129,0.15); color: var(--accent-completed);}
.lottery.completed .calc-btn{ background: var(--accent-completed); color:white;}

.lottery.drawing{ border-color: rgba(245,158,11,0.14);}
.lottery.drawing .status{ background: rgba(245,158,11,0.15); color: var(--accent-drawing);}
.lottery.drawing .calc-btn{ background: var(--accent-drawing); color:black;}

.lottery.in-progress{ border-color: rgba(59,130,246,0.12);}
.lottery.in-progress .status{ background: rgba(59,130,246,0.15); color: var(--accent-inprogress);}
.lottery.in-progress .calc-btn{ background: var(--accent-inprogress); color:white;}


  /* 버튼 링크 */
  .bet-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }

  .bet-links a {
    text-decoration: none;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.2s ease;
  }


/* event notice */
.help-notice {
  background: linear-gradient(90deg, #888888, #777777);
  color: #000000;
  padding: 12px 20px;
  margin:30px 0;
  text-align: left;
  font-size: 1.2rem;
  font-weight: normal;
  position: sticky;
  top: 0;
  z-index: 999;
  /* border-bottom: 3px solid rgba(255,255,255,0.4); */
  animation: fadeInDown 0.8s ease-in-out;
}

.notice-content {
  display: flex;
  justify-content: left;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notice-content .emoji {
  font-size: 1.2rem;
}

.notice-content .close-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 1.2rem;
  margin-left: 10px;
  cursor: pointer;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  transition: background 0.2s;
}

.notice-content .close-btn:hover {
  background: rgba(255,255,255,0.4);
}
/* 등장 애니메이션 */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

  .bet-links a.place { background-color: #e63946; }
  .bet-links a.place:hover { background-color: #d32c3b; }

  .bet-links a.exact { background-color: #3946e6; }
  .bet-links a.exact:hover { background-color: #2936c6; }

  .bet-links a.any { background-color: #f59e0b; }
  .bet-links a.any:hover { background-color: #e58e00; }

  .bet-links a.inactive { background-color: #444; color:#888; }
  .bet-links a.inactive:hover { background-color: #444; color:#EEE;  }
/* =================================== */
.btc-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.btc-row {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 90px;
  font-weight: 900;
  letter-spacing: 160px;
  color: rgba(255, 200, 80, 0.07);
  text-shadow: 0 0 30px rgba(255, 200, 80, 0.25);
  white-space: nowrap;
  animation: floatBTC 40s linear infinite;
}

/* 각각 다른 시작 위치 */
.btc-row:nth-child(1) { top: 100%; }
.btc-row:nth-child(2) { top: 160%; animation-delay: 13s; }
.btc-row:nth-child(3) { top: 220%; animation-delay: 26s; }

.btc-row::before {
  content: "₿   ₿   ₿   ₿   ₿   ₿";
}

@keyframes floatBTC {
  from {
    transform: translate(-50%, 0);
  }
  to {
    transform: translate(-50%, -300vh);
  }
}

#chatbot-icon {
  position: fixed;
  right: 16px;
  bottom: 8px;
  width: 54px;
  height: 54px;
  background: white;          /* 흰 배경 */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(247,147,26,0.8);
  z-index: 9999;
}

#chatbot-box {
  position: fixed;
  right: 16px;
  bottom: 68px;
  width: 300px;
  height: 320px;
  background: #111;
  border-radius: 16px;
  color: white;
  padding: 10px;

  /* ⭐ 추가 */
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  font-size: 14px;
}

#chat-log {
  height: calc(100% - 40px); /* 입력창 제외 높이 */
  overflow-y: auto;           /* 스크롤 가능 */
  padding: 8px;
  display: flex;
  flex-direction: column;     /* 메시지 위→아래 */
}

@media (max-width: 480px) {
  #chatbot-box {
    width: 90%;
    right: 5%;
    height: 280px;
  }
}

.hidden {
  display: none !important;
}
