/* =========================
   기본 배경
========================= */
body{
  background:
    radial-gradient(circle at top,
      #3a1c71,
      #12042b 55%,
      #060012 100%);
}
#day-body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh; /* 모바일 주소창 대응 */

  background:
    radial-gradient(circle at top,
      #3a1c71,
      #12042b 55%,
      #060012 100%);

  color: #fff;
  font-family: 'Segoe UI', 'Noto Sans KR', sans-serif;

  display: flex;
  justify-content: center;
  align-items: flex-start;
}


.main-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 80px; /* ⭐ 여기가 핵심 */
  box-sizing: border-box;
}

/* =========================
   룰렛 카드
========================= */
.roulette-card {
  width: 420px;
  background: linear-gradient(180deg, #1b0f3a, #0a061d);
  border-radius: 26px;
  padding: 30px 26px 36px;
  text-align: center;
  box-shadow:
    0 0 60px rgba(180,100,255,0.35),
    inset 0 0 40px rgba(255,255,255,0.05);
  position: relative;
}

/* 상단 광원 */
.roulette-card::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 80px;
  background: radial-gradient(circle, rgba(255,215,0,0.45), transparent 70%);
  pointer-events: none;
}

/* =========================
   상자 영역
========================= */
#rouletteBox {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 20px auto 10px;
  border-radius: 22px;
  background: rgba(0,0,0,0.45);
  box-shadow:
    0 0 50px rgba(255,215,0,0.35),
    inset 0 0 25px rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

#boxImg {
  width: 210px;
  transition: transform .4s ease;
  filter: drop-shadow(0 0 25px gold);
}

/* =========================
   반짝임 (룰렛 도는 동안)
========================= */
.sparkle {
  animation: sparkle 1.2s infinite alternate;
}

@keyframes sparkle {
  from {
    filter: drop-shadow(0 0 10px gold);
  }
  to {
    filter: drop-shadow(0 0 35px gold);
  }
}

/* =========================
   흔들림 (무게감 있게)
========================= */
.shake {
  animation: shake 1.2s ease-in-out infinite;
}

@keyframes shake {
  0%   { transform: rotate(0deg) scale(1); }
  20%  { transform: rotate(-6deg) scale(1.02); }
  40%  { transform: rotate(6deg) scale(1.02); }
  60%  { transform: rotate(-4deg) scale(1.01); }
  80%  { transform: rotate(4deg) scale(1.01); }
  100% { transform: rotate(0deg) scale(1); }
}

/* =========================
   결과 영역
========================= */
#resultImg {
  min-height: 150px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#resultImg img {
  width: 140px;
  animation: pop 0.6s cubic-bezier(.2,.9,.3,1.3);
  filter: drop-shadow(0 0 20px rgba(255,215,0,0.8));
}

@keyframes pop {
  from {
    transform: scale(0.2);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================
   꽝 연출
========================= */
.miss {
  font-size: 30px;
  font-weight: bold;
  color: #ff5555;
  text-shadow:
    0 0 10px red,
    0 0 25px rgba(255,0,0,0.7);
  animation: missPop 0.6s ease-out;
}

@keyframes missPop {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* =========================
   버튼
========================= */
button {
  cursor: pointer;
  font-family: inherit;
}

#btnSpin {
  width: 100%;
  padding: 18px;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  border: none;
  border-radius: 16px;
  background: linear-gradient(90deg,
    #ff3cac,
    #784ba0,
    #2b86c5);
  box-shadow: 0 0 25px rgba(255,60,172,0.6);
  transition: transform .15s ease, box-shadow .15s ease;
}

#btnSpin:hover {
  transform: scale(1.06);
  box-shadow: 0 0 40px rgba(255,60,172,0.9);
}

#btnClaim {
  margin-top: 12px;
  padding: 12px 18px;
  font-size: 16px;
  border-radius: 12px;
  background: #ffd700;
  border: none;
  color: #000;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(255,215,0,0.6);
}
/* =========================
   탭 UI
========================= */
.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  background: #222;
  color: #aaa;
  font-weight: bold;
  cursor: pointer;
}

.tab-btn.active {
  background: linear-gradient(90deg,#ffcc00,#ff8800);
  color: #000;
  box-shadow: 0 0 15px rgba(255,200,0,0.8);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* =========================
   당첨 내역
========================= */
#historyBox {
  background: rgba(0,0,0,0.45);
  padding: 16px;
  border-radius: 16px;
  box-shadow: inset 0 0 20px rgba(255,255,255,0.05);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.history-item img {
  width: 48px;
}
/*공지사항 고블린 포인트 안내*/
.gamble-desc {
  margin-top: 25px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.08);
  border-radius: 14px;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;
}

.gamble-desc p {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: #facc15; /* 노란 포인트 */
}

.gamble-desc ul {
  margin: 0;
  padding-left: 18px;
}

.gamble-desc li {
  margin-bottom: 6px;
}

.gamble-desc b {
  color: #60a5fa; /* 코인 강조 */
}


  /* 출석 체크 버튼 */
  #btnCheckin.btn-checkin{
    appearance:none;
    border:0;
    cursor:pointer;

    /* size */
    min-width: 160px;
    height: 52px;
    padding: 0 18px;

    /* typography */
    font-weight: 800;
    font-size: 16px;
    letter-spacing: .2px;
    color: #fff;

    /* look */
    border-radius: 14px;
    background: linear-gradient(135deg, #1bd96a 0%, #16a34a 55%, #0f7a35 100%);
    box-shadow:
      0 10px 22px rgba(22,163,74,.28),
      0 2px 0 rgba(255,255,255,.18) inset,
      0 -2px 0 rgba(0,0,0,.18) inset;

    position: relative;
    overflow: hidden;
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
    user-select: none;
  }

  /* 상단 하이라이트 */
  #btnCheckin.btn-checkin::before{
    content:"";
    position:absolute;
    inset:-40% -20% auto -20%;
    height:120%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), rgba(255,255,255,0) 55%);
    transform: rotate(-8deg);
    pointer-events:none;
  }

  /* 반짝 스윕 */
  #btnCheckin.btn-checkin::after{
    content:"";
    position:absolute;
    top:0;
    left:-60%;
    width:50%;
    height:100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-18deg);
    opacity:0;
    pointer-events:none;
  }

  #btnCheckin.btn-checkin:hover{
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow:
      0 14px 28px rgba(22,163,74,.34),
      0 2px 0 rgba(255,255,255,.18) inset,
      0 -2px 0 rgba(0,0,0,.18) inset;
  }

  #btnCheckin.btn-checkin:hover::after{
    opacity:1;
    animation: shine .9s ease;
  }

  #btnCheckin.btn-checkin:active{
    transform: translateY(1px) scale(.99);
    box-shadow:
      0 8px 18px rgba(22,163,74,.26),
      0 1px 0 rgba(255,255,255,.15) inset,
      0 -2px 0 rgba(0,0,0,.22) inset;
  }

  #btnCheckin.btn-checkin:focus-visible{
    outline: none;
    box-shadow:
      0 0 0 4px rgba(34,197,94,.25),
      0 14px 28px rgba(22,163,74,.34);
  }

  #btnCheckin.btn-checkin:disabled{
    cursor:not-allowed;
    opacity:.55;
    filter: grayscale(.25);
    transform:none;
  }

  @keyframes shine{
    0%{ left:-60%; }
    100%{ left:120%; }
  }
  /* ===== 출석 카드 ===== */
.checkin-card{
  position: relative;
  margin: 20px auto 16px;
  width: 280px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, #2a145e, #1a0c3a);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  color:#fff;
  text-align:center;
}

.calendar-header{
  font-weight:800;
  margin-bottom:12px;
}

.calendar-body{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:6px;
  font-size:12px;
}

.calendar-body .day{
  height:32px;
  line-height:32px;
  border-radius:8px;
  background:rgba(255,255,255,.08);
}

.calendar-body .day.checked{
  background:linear-gradient(135deg,#22c55e,#16a34a);
  font-weight:800;
}

.calendar-body .day.today{
  border:2px solid #ffd54a;
  font-weight:800;
}

/* ===== 출석 도장 ===== */
.stamp{
  position:absolute;
  right:14px;
  bottom:14px;
  padding:10px 16px;
  background:#ff3b3b;
  color:#fff;
  font-weight:900;
  border-radius:50%;
  transform: rotate(-15deg) scale(0);
  opacity:0;
  pointer-events:none;
}

.stamp.active{
  animation: stampPop .35s ease forwards;
}

@keyframes stampPop{
  0%{
    transform: rotate(-15deg) scale(2);
    opacity:0;
  }
  100%{
    transform: rotate(-15deg) scale(1);
    opacity:1;
  }
}
