@import url("https://fonts.googleapis.com/css2?family=Anuphan:wght@100..700&family=Chonburi&display=swap");
/* =========================
   ROOT & GLOBAL
   ========================= */
:root {
  --blue-main: #3a8dff;
  --blue-soft: #e6f2ff;
  --blue-deep: #1c4fa8;
  --gold: #d7a24a;
  --yellow-btn: #ffd553;
  --text-main: #143048;
  --text-light: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Chonburi",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: #fff;
  color: var(--text-main);
}

/* =========================
   HERO
   ========================= */
.hero {
  min-height: 100vh;
  padding: 24px 24px 40px;
  display: flex;
  justify-content: center;
  background-image: url("../images/main_bg_new.png");
  background-size: cover;
  background-position: 50% 50%;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.7), transparent 55%);
  pointer-events: none;
  animation: bgBreath 12s ease-in-out infinite;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
  margin: auto;
  padding: 20px 26px 28px;
}

#logoImg {
  max-width: 550px;
}

.event-period-wrap {
  margin-bottom: 20px;
  text-align: center;
}

.event-period {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 32px;
  background: linear-gradient(90deg, #2547c9, #3b63ff);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 26px 0;
  position: relative;
  letter-spacing: 0.12em;
}

.event-period::before,
.event-period::after {
  content: "★";
  font-size: 13px;
  margin: 0 8px;
}

/* =========================
   TOP BAR & LANGUAGE
   ========================= */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  position: fixed;
  z-index: 9;
  right: 30px;
  top: 30px;
}

.lang-switch {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(230, 244, 255, 0.95);
  border: 1px solid rgba(87, 147, 235, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--blue-deep);
}

.lang-switch select {
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: inherit;
  cursor: pointer;
}

/* =========================
   HERO TITLE
   ========================= */
.hero-text {
  text-align: center;
  color: var(--blue-deep);
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.8);
  margin-bottom: 5rem;
}

#titleText {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2b63e5;
}

#descText {
  margin-top: 6px;
  font-size: 25px;
  color: #fff;
}

/* =========================
   DASHBOARD BOARD (6 CARDS)
   ========================= */
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 115px;
  gap: 14px;
}

.card {
  position: relative;
  padding: 10px 34px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 88, 196, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  border: none;
  background-size: 100% auto;
  background-position: 50% 50%;
  will-change: transform;
  transform: translateZ(0);
}

.card.highlight {
  background-image: url(../images/Badge-Brown.png);
}

.cardblue {
  background-image: url(../images/Badge-Blue.png);
}

.cardbrown2 {
  background-image: url(../images/Badge-Mission.png);
}

.card-title {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.95;
}

.card-main {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  margin-top: 2px;
}

.card-sub {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
}

.card-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: var(--yellow-btn);
  color: #7a5311;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  box-shadow: 0 4px 10px rgba(208, 160, 40, 0.45);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.card-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(208, 160, 40, 0.6);
}

/* =========================
   RESPONSIVE: HERO + BOARD
   ========================= */
@media (max-width: 960px) {
  .hero-inner {
    padding: 18px 18px 26px;
  }

  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #titleText {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 16px 10px 28px;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .board {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 16px 14px 22px;
  }
}

/* =========================
   PROFILE SECTION
   ========================= */
.bg-sec-profile {
  background-image: url(../images/profile_bg_new.jpg);
  background-size: 100%;
  background-position: top center;
  background-repeat: no-repeat;
  padding-bottom: 30px;
}
@media (max-width: 640px) {
  .bg-sec-profile {
    background-size: cover;
  }
}

.profile-section {
  max-width: 1200px;
  margin: 28px auto 40px;
  padding: 20px 26px 26px;
  border-radius: 24px;
}

.profile-character {
  position: absolute;
  right: 0;
  height: 1100px;
  z-index: 0;
  pointer-events: none;
  animation: char-float 4.2s ease-in-out infinite;
}

.profile-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-step-badge {
  width: 150px;
  height: 150px;
  border-radius: 30px;
  background-image: url(../images/bg-mission-no.png);
  background-size: contain;
  background-repeat: no-repeat;
  padding: 30px;
  color: #fff;
  font-weight: 800;
  display: inline-grid;
  align-items: center;
  justify-content: center;
}

.head-form {
  background-image: url(../images/head-form.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 10px 10px 0;
  margin: auto;
}

.profile-section-header h1 {
  color: #2853c8;
  font-style: italic;
}

.profile-section-header p {
  font-size: 14px;
  color: #fff;
  /*text-shadow: 1px 1px 1px #fff;*/
}
.profile-section-header .subtitle {
  background: #0079ba;
  background: linear-gradient(80deg, rgba(0, 121, 186, 1) 0%, rgba(0, 153, 238, 1) 100%);
  border-radius: 10px 0 10px 0;
  padding: 5px 10px;
  font-size: 16px;
  color: #fff;
  text-shadow: 0 0 BLACK;
  /*font-weight: 600;*/
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
}

/* Profile Form Wrapper */
.profile-form-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.form-bg-top {
  height: 70px;
  background: url(../images/bg-form-top.png) no-repeat top center;
  background-size: 100% auto;
}

.form-bg-middle {
  background: url("../images/bg-form-middle.png") repeat-y top center;
  background-size: 100% auto;
  padding: 0 28px;
}

.form-profile {
  width: 100%;
  padding: 15px;
  background-size: 100%;
  background-repeat: no-repeat;
}

.form-bg-bottom {
  height: 70px;
  background: url("../images/bg-form-bottom.png") no-repeat bottom center;
  background-size: 100% auto;
}

.profile-form,
.profile-preview {
  border-radius: 18px;
  padding: 16px 18px 18px;
}

.profile-form h3,
.profile-preview h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #21457e;
}

.profile-label {
  font-size: 18px;
  margin-top: 20px;
  margin-bottom: 4px;
  color: #425c7c;
}

.profile-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(146, 175, 238, 0.9);
  background: #ffffff;
  font-size: 14px;
  outline: none;
}

.profile-input:focus {
  border-color: #3a8dff;
  box-shadow: 0 0 0 2px rgba(58, 141, 255, 0.25);
}

/* Avatars */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}

.avatar-option {
  border: none;
  padding: 10px;
  border-radius: 12px;
  background: #d7e4ff;
  background-image: url(../images/avatar/bg-avatar.png);
  background-size: 100% auto;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: 0 3px 6px rgba(0, 67, 163, 0.15);
}

.avatar-option img {
  width: 100%;
  display: block;
  border-radius: inherit;
}

.avatar-option.is-active {
  border: solid #217efd;
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* Jobs */
.job-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.job-option {
  background: #ffffff;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.job-option img {
  width: 100%;
  display: block;
}

.job-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.job-option.is-active {
  border-color: #4f7dff;
  box-shadow: 0 0 12px rgba(79, 125, 255, 0.5);
  transform: translateY(-2px);
}

/* Primary Button */
.primary-btn {
  margin-top: 4px;
  width: 50%;
  padding: 12px 14px;
  border-radius: 999px;
  border: none;
  background-image: url(../images/avatar/bg-btn-org.png);
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: center;
  color: #754408;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  margin: 0 auto;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
  will-change: transform;
  transform: translateZ(0);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.12);
}

/* Profile Preview Card */
.profile-card {
  height: 260px;
  margin-top: 4px;
  padding: 17px 32px;
  border-radius: 18px;
  background-image: url(../images/avatar/card.png);
  background-size: 100% auto;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  filter: drop-shadow(2px 4px 6px black);
}

.profile-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid #735219;
  background: #fff;
}

.profile-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card-name {
  font-size: 20px;
  font-weight: 800;
  color: #7a3b06;
}

.profile-card-job {
  font-size: 13px;
  margin-top: 2px;
  color: #8a4d12;
}

/* Share Box */
.share-box {
  margin-top: 30px;
  padding: 18px 16px;
  border-radius: 14px;
  background-image: url(../images/bg-share.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.share-row {
  display: flex;
  gap: 8px;
  align-content: center;
}

.share-input {
  flex: 1;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(116, 147, 216, 0.9);
  background: #ffffff;
  font-size: 12px;
  height: 37px;
}

.share-btn {
  padding: 8px 8px;
  border-radius: 10px;
  border: none;
  background: #ffa700;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  height: 37px;
}

.share-status {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #2b6e24;
}

/* Profile Responsive */
@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

/* Reward Summary (Mission 1 box) */
.reward-summary {
  margin-top: 18px;
  border-radius: 16px;
  padding: 14px 16px;
}

.reward-summary h3 {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 700;
  background-color: #ac7c52;
  padding: 20px;
  color: #fff;
  letter-spacing: 3px;
  border-radius: 30px 30px 0 0;
  text-align: center;
}

.reward-summary .reward-row {
  background-image: url(../images/bg-shreward.png) !important;
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: center;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.4fr;
  padding: 20px;
  /*border-bottom: 1px solid rgba(150, 185, 255, 0.3);*/
  align-items: center;
  filter: drop-shadow(2px 3px 5px #754408);
  margin-bottom: 10px;
}

.reward-summary .reward-row:last-child {
  border-bottom: none;
}

.reward-summary .reward-name {
  font-size: 16px;
  color: #2d4f85;
}

.reward-summary .reward-point {
  font-size: 13px;
  color: #3e74d4;
  font-weight: 600;
  text-align: end;
}

.reward-summary .reward-status .check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #cfd9f8;
  color: #ffffff;
  opacity: 0.3;
  transition: 0.2s;
}

.reward-summary .reward-status .check.done {
  background: #4caf50;
  opacity: 1;
}

/* =========================
   INVITE SECTION (Mission 2)
   ========================= */
.invite-section {
  max-width: 1300px;
  margin: 100px auto;
  text-align: center;
  position: relative;
}

.invite-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.invite-step-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #7bb0ff, #4577e8);
  color: #fff;
  font-weight: 800;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.invite-title {
  font-size: 28px;
  font-weight: 800;
  color: #2f63df;
  margin: 0;
}

.invite-sub {
  font-size: 13px;
  color: #405179;
  margin: 2px 0 0;
}

/* Envelope + Character */
.invite-envelope {
  position: relative;
  margin-left: 20rem;
  width: 900px;
  max-width: 100%;
  padding-top: 0;
  animation: envelope-bounce 4s ease-in-out infinite;
}

.envelope-bg {
  width: 100%;
  height: auto;
  display: block;
}

.envelope-paper {
  background-color: transparent !important;
  position: absolute;
  inset: 10% 9% 18% 9%;
  background: #ffffff;
  border-radius: 14px;
  padding: 0 100px 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  animation: paper-slide-in 0.9s ease-out forwards;
  animation-delay: 0.2s;
}

.invite-character {
  position: absolute;
  left: -120px;
  top: 0;
  width: 550px;
  /*height: 1000px;*/
  z-index: 3;
  pointer-events: none;
  animation: char-float 4.2s ease-in-out infinite;
}

@media (max-width: 1024px) {
  .invite-character {
    width: 450px;
    left: -80px;
    top: 150px;
  }
  .invite-envelope {
    margin-left: 5rem;
  }
}

@media (max-width: 768px) {
  .invite-character {
    position: relative;
    left: 0;
    top: 0;
    margin: 0 auto -20px auto;
    display: block;
    width: 230px;
    transform: none !important;
    animation: none;
  }

  .invite-envelope {
    margin-top: -10px;
    margin-left: 0;
  }

  .envelope-paper {
    inset: 9% 6% 20% 6%;
    padding: 14px 14px 12px;
  }
}

/* Invite Content */
.invite-box-title {
  font-size: 26px;
  font-weight: 700;
  color: #8a5b2b;
}

.invite-box-desc {
  font-size: 16px;
  color: #5a4a39;
  margin-top: 4px;
}

.invite-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 30px 0 30px;
}

.invite-link-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d1c3a4;
  font-size: 13px;
}

.invite-copy-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  background: #ffd978;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Avatars List */
.bg-av {
  background-image: url(../images/bg-av-friend.png);
  background-size: 100% auto;
  padding: 5px;
  background-position: center;
  background-repeat: no-repeat;
}

.invite-avatar-list {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.invite-avatar-slot {
  width: 80px;
  text-align: center;
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  animation: avatar-pop 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.invite-avatar-slot:nth-child(1) {
  animation-delay: 0.4s;
}
.invite-avatar-slot:nth-child(2) {
  animation-delay: 0.55s;
}
.invite-avatar-slot:nth-child(3) {
  animation-delay: 0.7s;
}
.invite-avatar-slot:nth-child(4) {
  animation-delay: 0.85s;
}
.invite-avatar-slot:nth-child(5) {
  animation-delay: 1s;
}

.invite-avatar-slot img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  filter: grayscale(1) brightness(0.8);
}

.invite-avatar-slot.is-filled img {
  filter: none;
}

.invite-name {
  margin-top: 4px;
  font-size: 12px;
  color: #444;
}

/* Invite Progress (bg-invite2) */
.invite-progress-box {
  width: 520px;
  max-width: 100%;
  height: 90px;
  margin: 20px auto 0;
  background: url("../images/bg-invite2.png") no-repeat center;
  background-size: 100% 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.invite-progress-inner {
  width: 100%;
  padding: 0 32px 4px 90px;
}

.invite-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.invite-progress-label {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.invite-progress-count {
  min-width: 90px;
  text-align: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffb43c;
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
}

.invite-progress-bar {
  text-align: center;
}

.invite-progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #e3e3e3;
  padding: 2px;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.invite-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #ffb43c;
}

.invite-progress-hint {
  font-size: 12px;
  color: #ffffff;
  font-weight: 600;
}

/* Special Card */
.invite-special-card {
  width: 150px;
  margin: 0 auto;
  background: #c59b5d;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}

/* =========================
   GACHA SECTION (Mission 3)
   ========================= */
.card-section {
  max-width: 1100px;
  margin: 120px auto 80px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.poring {
  right: -400px;
  max-width: 650px;
  top: -180px;
}
.card-step-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #7bb0ff, #4577e8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 26px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.card-header h2 {
  font-size: 24px;
  color: #2853c8;
}

/* Gacha Layout Wrapper */
.card-layout {
  position: relative;
  max-width: 1100px;
  margin: 60px auto 80px;
  padding: 60px 40px 40px;
  background: linear-gradient(180deg, #377891 0%, #6bc0cb 100%);
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(36, 74, 121, 0.35);
}

.card-layout::before,
.card-layout::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 49px;
  background: url("../images/border-line.png") no-repeat center;
  background-size: 100% 100%;
  pointer-events: none;
}

.card-layout::before {
  top: 0;
}

.card-layout::after {
  bottom: 0;
  transform: scaleY(-1);
}

.bg-inner-card-gacha {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
  padding: 30px;
  background: linear-gradient(180deg, #2f90b0, #68cdde);
  width: 100%;
  border: solid 3px #68cdde;
  border-radius: 30px;
  margin-top: 20px;
}

/* Left Panel – Big Card */
.card-left-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gacha-frame {
  width: 380px;
  max-width: 100%;
  aspect-ratio: 379 / 491;
  background: url("../images/bg-card.png") no-repeat center;
  background-size: 100% 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gacha-card {
  width: 58%;
  position: relative;
}

.gacha-card-img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

.gacha-card-overlay {
  position: absolute;
  left: 50%;
  /*bottom: 8px;*/
  transform: translateX(-50%);
  text-align: center;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-weight: 700;
  font-size: 13px;
}

.gacha-card-type {
  font-size: 13px;
}
.gacha-card-name {
  font-size: 16px;
}
.gacha-card-bonus {
  font-size: 13px;
}

.gacha-btn {
  width: 350px;
  margin-top: 18px;
  border: none;
  padding: 15px 36px;
  background-image: url(../images/Button-gacha.png);
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: center;
  color: #fff;
  font-size: 30px;
  background-color: transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}

.gacha-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.1);
}

.gacha-remaining {
  margin-top: 6px;
  font-size: 13px;
  color: #ffffff;
}

/* Right Panel – Collection */
.card-right-panel {
  display: flex;
  flex-direction: column;
}

.collection-header {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  text-align: left;
  margin-bottom: 10px;
}

.collection-grid {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px 14px;
}

.collection-card {
  position: relative;
  padding: 6px 8px;
  border-radius: 12px;
  background: #c3ccdd;
  color: #ffffff;
  font-size: 11px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.6;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
}

.collection-img-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}

.collection-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-label {
  font-size: 12px;
}

.collection-bonus {
  font-size: 11px;
  color: #ffe79b;
}

.collection-check {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #66d45c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
}

/* Unlock states */
.collection-card.is-unlocked {
  background: linear-gradient(135deg, #6f9bff, #b1c7ff);
  opacity: 1;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.collection-card.is-unlocked img {
  filter: none;
}

.collection-card.is-unlocked[data-type="mvp"] {
  background: linear-gradient(135deg, #b48aff, #e3b9ff);
}

.collection-card.is-unlocked[data-type="presenter"] {
  background: linear-gradient(135deg, #ff9ac2, #ffd0e0);
}

.collection-card.is-unlocked .collection-check {
  opacity: 1;
}

.collection-card.is-unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

/* Shine Effect on Collection + Presenter Reward */
.collection-card::after,
.presenter-right .reward-row::after {
  content: "";
  position: absolute;
  top: -80%;
  left: -130%;
  width: 260%;
  height: 260%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: rotate(25deg) translateX(0);
  opacity: 0;
  pointer-events: none;
}

.collection-card:hover::after,
.presenter-right .reward-row:hover::after {
  animation: shineMove 1.2s ease forwards;
}

/* Collection Progress */
.collection-progress {
  margin-top: 18px;
  background: url(../images/bg-share.png) no-repeat center;
  background-size: 100% 100%;
  align-items: center;
  padding: 20px 40px 20px;
  box-sizing: border-box;
}

.collection-progress-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.collection-progress-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  padding: 2px;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.collection-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #ffb33e;
}

.collection-progress-sub {
  margin: 0;
  font-size: 12px;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
}

/* Gacha Responsive */
@media (max-width: 960px) {
  .card-layout {
    padding: 40px 20px 28px;
  }

  .bg-inner-card-gacha {
    grid-template-columns: 1fr;
  }

  .gacha-frame {
    width: 320px;
  }

  .collection-progress {
    padding: 0 24px 4px;
  }
}

/* =========================
   GACHA POPUP
   ========================= */
.gacha-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 60, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition: opacity 0.25s ease;
}

.gacha-popup-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.gacha-popup {
  background: radial-gradient(circle at top, #fef7ff 0, #f4f7ff 50%, #ffffff 100%);
  border-radius: 20px;
  padding: 18px 18px 14px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 14px 32px rgba(66, 105, 190, 0.4);
  border: 2px solid #bfcfff;
  transform: scale(0.8) translateY(8px);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28),
    opacity 0.28s ease;
}

.gacha-popup-overlay.is-visible .gacha-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.gacha-popup-title {
  font-size: 18px;
  font-weight: 800;
  color: #28427a;
  text-align: center;
  margin-bottom: 10px;
  position: relative;
}

.gacha-popup-title::after {
  content: "✨";
  margin-left: 4px;
}

.gacha-popup-body {
  display: flex;
  gap: 14px;
  align-items: center;
}

.gacha-popup-body img {
  width: 120px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.gacha-popup-info {
  flex: 1;
  font-size: 13px;
  color: #233653;
}

#gachaPopupCardType {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7fb0;
  letter-spacing: 0.03em;
}

#gachaPopupCardName {
  font-size: 18px;
  font-weight: 800;
  color: #2c4c8a;
  margin-top: 4px;
}

#gachaPopupCardBonus {
  font-size: 14px;
  color: #e46f1a;
  margin-top: 4px;
}

.gacha-popup-message {
  margin-top: 6px;
  font-size: 12px;
  color: #4a5873;
}

.gacha-popup-close {
  margin: 12px auto 0;
  display: block;
  padding: 7px 26px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ffd553, #ffb93f);
  color: #754408;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(196, 137, 23, 0.6);
}

/* =========================
   PRESENTER SECTION (Mission 4)
   ========================= */
.presenter-section {
  max-width: 1100px;
  margin: 90px auto 80px;
  position: relative;
  color: #29375f;
}

.presenter-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.presenter-step-badge {
  width: 127px;
  height: 127px;
  background: url("../images/bg-av-friend.png") no-repeat center;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 44px;
}

.presenter-title {
  margin: 0;
  font-size: 42px;
  font-weight: 900;
  color: #2f8cff;
}

.presenter-sub {
  margin: 2px 0 0;
  font-size: 16px;
  color: #4b5a81;
}

.presenter-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
}

/* Left Side with Frame */
.presenter-left {
  position: relative;
  padding: 135px 58px 72px;
  box-sizing: border-box;
}

.presenter-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/sec-presenter/Frame.png") no-repeat center;
  background-size: 100% 100%;
  z-index: 0;
  pointer-events: none;
}

.presenter-left > * {
  position: relative;
  z-index: 1;
}

/* Tabs */
.presenter-tabs {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 14px;
  z-index: 60;
}

.presenter-tab {
  position: relative;
  width: 86px;
  height: 86px;
  padding: 0;
  border: none;
  cursor: pointer;
  background: url("../images/bg-av-friend.png") no-repeat center;
  background-size: 100% 100%;
  color: #fff;
  font-weight: 900;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
  will-change: transform;
  transform: translateZ(0);
}

.presenter-tab.is-active {
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.9));
  transform: translateY(-2px);
}

.presenter-tab:hover:not(.is-locked) {
  transform: translateY(-3px);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
}

.presenter-tab.is-locked::after {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  right: -6px;
  top: -6px;
  background: url("../images/Lock.png") no-repeat center;
  background-size: 100% 100%;
}

/* Panels */
.presenter-panel {
  display: none;
}

.presenter-panel.is-active {
  display: block;
}

.round-title {
  margin: 4px 0 2px;
  font-size: 26px;
  font-weight: 900;
  color: #284c82;
}

.round-desc {
  margin: 0 0 10px;
  font-size: 15px;
  color: #445a87;
}

/* Hint / Tip */
.round-hint-box,
.round-tip {
  background: #fff7df;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  color: #735526;
  margin-bottom: 12px;
  height: 300px;
  align-content: center;
}

/* Video Placeholder */
.video-box {
  margin-bottom: 12px;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  background: url("../images/gray.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 28px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* Answer Box */
.answer-box {
  margin-top: 6px;
}

.answer-box label {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #38466a;
}

.answer-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #c1c9e6;
  padding: 9px 12px;
  font-size: 15px;
  box-sizing: border-box;
}

.answer-input:focus {
  outline: none;
  border-color: #4f7dff;
  box-shadow: 0 0 0 2px rgba(79, 125, 255, 0.2);
}

/* Answer Button */
.answer-submit-btn {
  margin-top: 10px;
  width: 230px;
  height: 64px;
  border: none;
  background: url("../images/sec-presenter/btn-answer.png") no-repeat center;
  background-size: 100% 100%;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  will-change: transform;
  transform: translateZ(0);
}

.answer-submit-btn:hover {
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.7));
}

.answer-submit-btn:active {
  transform: translateY(2px);
}

/* Right Side – Rewards & Progress */
.presenter-right {
  position: relative;
  padding-top: 8px;
}

.reward-box {
  /*
  background: #fffdf6;
  border-radius: 20px;
  padding: 16px 16px 12px;
  box-shadow: 0 16px 34px rgba(145, 104, 52, 0.25);
  */
}

.reward-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  color: #8b5b24;
}

.presenter-right .reward-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  column-gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fffaf0;
  font-size: 14px;
  color: #5a442e;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
}

.group112-row {
  background: url("../images/sec-presenter/Group112.png") no-repeat center;
  background-size: 100% 100%;
  color: #fff;
}

.presenter-right .reward-row.is-locked {
  opacity: 0.85;
}

.presenter-right .reward-row.is-done {
  /*background: #f2ffe8;*/
}

.reward-order {
  font-weight: 700;
  color: #b47b33;
}

.presenter-right .reward-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reward-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.reward-tag {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #d6dde8;
  color: #44506b;
}

.reward-check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #71cf5a;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Presenter Progress */
.presenter-progress {
  margin-top: 12px;
  height: 120px;
  background: url("../images/bg-share.png") no-repeat center;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.presenter-progress-inner {
  width: 80%;
  color: #fff;
  text-align: center;
  font-size: 13px;
}

.presenter-progress-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-weight: 700;
}

.presenter-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
  margin-bottom: 4px;
}

.presenter-progress-fill {
  height: 100%;
  width: 0;
  background: #f4a427;
}

.presenter-progress-score {
  font-size: 12px;
}

/* Presenter Character */
.presenter-char {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 420px;
  pointer-events: none;
  z-index: -1;
  opacity: 1;
  animation: char-float 4.2s ease-in-out infinite;
}

/* Presenter Responsive */
@media (max-width: 992px) {
  .presenter-layout {
    grid-template-columns: 1fr;
  }
  .presenter-left {
    margin-bottom: 32px;
  }
  .presenter-char {
    display: none;
  }
}

/* =========================
   ANIMATIONS & FX
   ========================= */
@keyframes bgBreath {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes char-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes envelope-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes paper-slide-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes avatar-pop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shineMove {
  0% {
    opacity: 0;
    transform: translateX(-40%) rotate(25deg);
  }
  50% {
    opacity: 1;
    transform: translateX(0) rotate(25deg);
  }
  100% {
    opacity: 0;
    transform: translateX(40%) rotate(25deg);
  }
}

/* =========================
   PROFILE NAME CARD (LEFT)
   ========================= */

.profile-preview {
  position: relative;
  padding: 24px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ป้าย "ตัวอย่างโปรไฟล์" ใช้ bg-job-ex */
.profile-sample-title {
  width: 280px;
  max-width: 100%;
  height: 50px;
  background: url("../images/avatar/bg-job-ex.png") no-repeat center;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: absolute;
  top: -20px;
  left: 24%;
  z-index: 1;
}

.profile-sample-title span {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.06em;
}

/* หัว ABYSS Name Card */
.profile-headcard {
  margin-bottom: 10px;
}

.profile-headcard img {
  display: block;
  max-width: 420px;
  width: 100%;
  height: auto;
}

/* กรอบน้ำเงินใหญ่ bg-right */
.profile-card-wrap {
  width: 120%;
  display: flex;
  justify-content: center;
}

.profile-card-bg {
  position: relative;
  width: 540px;
  max-width: 100%;
  aspect-ratio: 540 / 360;
  background: url("../images/avatar/bg-right.png") no-repeat center;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -20px;
}

/* การ์ดขาวด้านใน card.png */
.profile-card-inner {
  position: relative;
  width: 88%;
  height: 78%;
  background: url("../images/avatar/card.png") no-repeat center;
  background-size: 100% 100%;
  display: flex;
  flex-direction: column;
}

/* แถบเส้นบน (Group6) */
.profile-card-topbar {
  /*height: 26px;*/
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
}

.profile-card-topbar-img {
  max-width: 90%;
  height: auto;
}

/* layout ข้างใน */
.profile-card-content {
  flex: 1;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 110px;
  align-items: center;
  padding: 12px 22px 18px;
  column-gap: 12px;
}

/* ซ้าย: avatar ใช้ bg-avatar */
.profile-card-left {
  display: flex;
  justify-content: center;
}

.profile-avatar-frame {
  width: 80px;
  height: 80px;
  background: url("../images/avatar/bg-avatar.png") no-repeat center;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profile-avatar-frame img {
  width: 76%;
  height: 76%;
  border-radius: 50%;
  object-fit: cover;
}

/* กลาง: title + ชื่อ + job */
.profile-card-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 4px;
}

.profile-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #c99a4b;
  margin-bottom: 2px;
}

.profile-card-name {
  font-size: 18px;
  font-weight: 800;
  color: #234a85;
  margin-bottom: 6px;
}

/* แถบ job ใช้ bg-job */
.profile-card-jobbar {
  margin-bottom: 6px;
}

.profile-card-jobbg {
  width: 210px;
  max-width: 100%;
  height: 35px;
  background: url("../images/avatar/bg-job.png") no-repeat center;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  /*justify-content: center;*/
  padding: 20px;
}

.profile-card-job-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-card-job-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.profile-card-job-text {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* intro (optional) */
.profile-card-intro {
  font-size: 12px;
  color: #50638b;
  margin-top: 2px;
}

/* ขวา: QR */
.profile-card-right {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.profile-card-qr {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 900px) {
  .profile-card-content {
    grid-template-columns: 120px minmax(0, 1fr) 90px;
    padding: 10px 14px 16px;
  }

  .profile-avatar-frame {
    width: 100px;
    height: 100px;
  }

  .profile-card-name {
    font-size: 22px;
  }

  .profile-card-jobbg {
    width: 190px;
    height: 22px;
  }

  .profile-card-qr {
    width: 74px;
    height: 74px;
  }
}

@media (max-width: 640px) {
  .profile-card-bg {
    aspect-ratio: 540 / 380;
  }

  .profile-card-content {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .profile-card-left {
    grid-row: 1 / span 2;
    justify-content: center;
  }

  .profile-card-right {
    justify-content: center;
    align-items: center;
  }
}

/* กล่องรวมรางวัล */
.fancy-reward-box {
  position: relative;
  padding: 20px 18px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(152, 207, 255, 0.12), transparent), rgba(12, 17, 35, 0.92);
  border: 1px solid rgba(120, 200, 255, 0.6);
  box-shadow: 0 0 30px rgba(0, 200, 255, 0.18);
  backdrop-filter: blur(8px);
}

/* แต่ละแถวรางวัล */
.reward-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(16, 24, 48, 0.9), rgba(24, 32, 64, 0.9));
  border: 1px solid rgba(120, 200, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}

.reward-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at left, rgba(0, 195, 255, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}

.reward-row:hover::before {
  opacity: 1;
}

.reward-row .reward-name {
  /*color: #e5f1ff;*/
  font-size: 14px;
}

/* สถานะ lock / done */
.reward-row.is-locked {
  opacity: 0.85;
}

.reward-row.is-done {
  /*
  border-color: rgba(76, 255, 171, 0.9);
  box-shadow: 0 0 18px rgba(76, 255, 171, 0.35);
  */
}

.reward-row.is-done::before {
  background: radial-gradient(circle at right, rgba(76, 255, 171, 0.25), transparent 70%);
  opacity: 1;
}

/* ปุ่มรับรางวัล */
.reward-status {
  display: flex;
  justify-content: flex-end;
}

.reward-claim-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  min-width: 90px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background-image: linear-gradient(135deg, #ffca28, #ff8a65);
  color: #220c0c;
  /*font-weight: 700;*/
  font-size: 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(255, 196, 0, 0.8);
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    background-image 0.2s ease-out,
    border-color 0.2s ease-out;
}

.reward-claim-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 20px rgba(255, 214, 64, 0.95);
  background-image: linear-gradient(135deg, #ffe082, #ffab40);
}

.reward-claim-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 0 10px rgba(255, 214, 64, 0.6);
}

/* แสงวิ้ง ๆ ด้านหลังปุ่ม */
.reward-claim-btn .claim-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.6), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.reward-claim-btn:hover .claim-glow {
  opacity: 1;
}

/* ปุ่มสถานะ "รับแล้ว" */
.reward-claim-btn.is-completed {
  background-image: linear-gradient(135deg, #00e676, #00bfa5);
  color: #0b1a16;
  /*border-color: rgba(183, 255, 216, 0.9);*/
  cursor: default;
  /*box-shadow: 0 0 18px rgba(0, 255, 170, 0.8);*/
}

.reward-claim-btn.is-completed .claim-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(6, 46, 35, 0.9);
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: rgba(229, 255, 247, 0.9);
  /*box-shadow: 0 0 8px rgba(6, 214, 160, 0.7);*/
}

/* เวลาเพิ่งกดสำเร็จ ให้มี effect นิดหน่อย */
.reward-claim-btn.is-just-claimed {
  animation: claimPop 0.45s ease-out;
}

@keyframes claimPop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ปรับบนหน้าจอเล็ก */
@media (max-width: 576px) {
  .reward-row {
    grid-template-columns: 70px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .reward-status {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 6px;
  }

  .reward-claim-btn {
    width: 100%;
    justify-content: center;
  }
}

.abyss-footer {
  padding: 28px 0;
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
  /*margin-top: 40px;*/
}

.footer-inner {
  max-width: 700px;
  margin: auto;
}

.footer-logo {
  width: 160px;
  margin-bottom: 14px;
  opacity: 0.9;
}

.footer-links {
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-links a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s ease;
}

.footer-links a:hover {
  color: #ffd553;
}

.footer-links .divider {
  margin: 0 8px;
  color: #ddd;
}

.footer-copy {
  color: #ffffff;
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.5;
}
/* ---------- Cookie Consent (Modern Minimal) ---------- */
.cookie-wrapper {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
}

.cookie-box {
  pointer-events: auto;
  max-width: 520px;
  width: calc(100% - 32px);
  padding: 14px 16px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 55%), rgba(15, 22, 40, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: cookieFadeUp 0.35s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cookie-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* ใช้สีธีมจาก root */
  background: rgba(255, 213, 83, 0.18);
  font-size: 18px;
  flex-shrink: 0;
}

.cookie-text {
  flex: 1;
}

.cookie-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 2px;
}

.cookie-desc {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.88;
}

.cookie-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  text-decoration: underline;
  color: #ffd553;
}

.cookie-link:hover {
  opacity: 0.9;
}

.cookie-btn-group {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cookie-btn {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: 0.2s ease;
  font-weight: 600;
  white-space: nowrap;
}

.cookie-btn.primary {
  background: linear-gradient(135deg, #ffd553, #ffb53a);
  color: #3f2600;
  box-shadow: 0 0 12px rgba(255, 200, 80, 0.5);
}

.cookie-btn.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.cookie-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.cookie-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

@keyframes cookieFadeUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .cookie-box {
    padding: 12px 12px;
    border-radius: 14px;
  }

  .cookie-main {
    align-items: center;
  }

  .cookie-desc {
    font-size: 12px;
  }

  .cookie-btn-group {
    justify-content: space-between;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}
/* ซ่อน cookie bar ไว้ก่อน แล้วให้ JS เป็นคนเปิด */
#cookieConsent {
  display: none;
}
