/* ===== 기본 변수 ===== */
: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;
}

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

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

.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: #16a34a;
  border-color: #fff;
  box-shadow: 0 0 12px rgba(22,163,74,0.7);
}
.chip.selected .disk {
  color: #16a34a;
}

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

/* ===== 진행/완료 카드 ===== */
.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);
}

.lottery-foot{
  font-size: 1.2rem;
  color:#DDD;
  text-align:left;
  margin-top:12px;
}

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

.lottery-result {
  display: flex;
  gap: 8px;
}
.digit {
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #16a34a;
  color: #000;
  cursor: pointer;
  font-weight: bold;
}

/* 상태별 색상 */
.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-top: 20px;
    flex-wrap: wrap;
  }

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

  .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;  }

/* =================================== */
  /* 버튼 링크 */
  .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;
  }


.chipsmall {
  width: 100px;
  height: 100px;
  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;
  text-align:center;
  font-weight: 700;
  font-size: 1.0em;
  color: #111;
}

/* ===== RESULT PANELS (place / any / exact bet lists) ===== */
.result-panels {
  align-items: stretch;
}

.result-panel {
  background: #1e293b;
  border: 1px solid #374151;
  border-top: 3px solid #888;
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 220px;
  flex: 1 1 220px;
  max-width: 320px;
}

.result-panel-place { border-top-color: #e63946; }
.result-panel-any { border-top-color: #f59e0b; }
.result-panel-exact { border-top-color: #3946e6; }

.result-panel-title {
  margin: 0 0 10px 0;
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #f5f5f5;
}

.result-panel-place .result-panel-title { color: #f87171; }
.result-panel-any .result-panel-title { color: #fbbf24; }
.result-panel-exact .result-panel-title { color: #818cf8; }

.result-entry {
  color: #ddddaa;
  font-size: 1em;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.result-entry:last-child {
  border-bottom: none;
}

.result-entry-empty {
  color: #6b7280;
}

@media (max-width: 768px) {
  .result-panel {
    max-width: none;
    width: 100%;
  }
}
