/* พื้นหลัง Login */
body {
    font-family: 'Kanit', sans-serif;
    background-color: #0d0a07;
    background-image: url('images/header_bg.png'); /* ภาพพื้นหลังของคุณ */
    background-size: cover;
    background-position: center;
    color: #fff;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/bg.jpg') center/cover;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

.card {
  background: rgba(25, 20, 15, 0.95);
  border: 1px solid rgba(209, 163, 118, 0.2);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(180, 126, 80, 0.2);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(180, 126, 80, 0.3);
  transform: translateY(-2px);
}

/* Header กล่อง */
.login-card .card-header {
    background: #8d6e3c;
    text-align: center;
    color: #fff;
    border-bottom: none;
    padding: 20px;
    font-weight: bold;
    font-size: 20px;
}

.card-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.logo-container {
  margin-bottom: 2rem;
  position: relative;
}

.logo-container img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.3));
}

.username-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stat-card {
/*  background: rgba(209, 163, 118, 0.1);
  border: 1px solid rgba(209, 163, 118, 0.2);
*/
  background-color: rgba(80, 80, 80, 0.05); /* เทาโปร่งใสจางๆ */
  border: 1px solid #fffff0; /* ขอบสีน้ำตาลทอง */
  border-radius: 10px;
  padding: 1.2rem;
  text-align: left;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(209, 163, 118, 0.2);
  border-color: rgba(209, 163, 118, 0.4);
  background: rgba(209, 163, 118, 0.15);
}

.stat-icon {
  font-size: 1.5rem;
  color: #d1a376;
  margin-right: 1rem;
  text-shadow: 0 0 10px rgba(209, 163, 118, 0.5);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.bg-nav {
  background: rgba(25, 20, 15, 0.95);
  border-top: 1px solid rgba(209, 163, 118, 0.2);
  border-bottom: 1px solid rgba(209, 163, 118, 0.2);
  backdrop-filter: blur(10px);
}

.nav-link {
  color: #fff !important;
  padding: 1rem 1.5rem !important;
  border-radius: 5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.1), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.nav-link:hover::before {
  transform: translateX(100%);
}

.nav-link:hover {
  background: rgba(209, 163, 118, 0.1);
  color: #d1a376 !important;
  transform: translateY(-2px);
}

/* ปุ่มเข้าสู่ระบบ */
.btn-golden-glow {
    background: linear-gradient(to right, #b07f32, #e1c178);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.btn-golden-glow:hover {
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.btn-logout {
  background: transparent;
  border: 1px solid #d1a376;
  color: #d1a376;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-logout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, #d1a376 0%, #b47e50 100%);
  transition: 0.5s;
  z-index: -1;
}

.btn-logout:hover::before {
  width: 100%;
}

.btn-logout:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

.content-section {
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-title {
  color: #fff;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-left: 15px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background: #ff6b00;
  border-radius: 2px;
}

.notice-box {
  background: rgba(209, 163, 118, 0.1);
  border: 1px solid rgba(209, 163, 118, 0.2);
  padding: 1.2rem;
  margin: 1.5rem 0;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.notice-box:hover {
  border-color: rgba(209, 163, 118, 0.4);
  box-shadow: 0 4px 15px rgba(180, 126, 80, 0.1);
  background: rgba(209, 163, 118, 0.15);
}

.notice-icon {
  color: #d1a376;
  font-size: 1.2rem;
  margin-right: 1rem;
  margin-top: 0.2rem;
}

.notice-content {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ปิดเอฟเฟกต์จาก shadow-sm */
.card.shadow-sm::before { display: none !important; }

/* ปิด shimmer จาก header */
.card-header::after { display: none !important; }
.card.shadow-sm::before {
  background: none !important;
  animation: none !important;
}

/* Gaming style card design */
.card.shadow-sm {
  background: rgba(25, 20, 15, 0.95);
  border: 1px solid rgba(209, 163, 118, 0.2) !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card.shadow-sm::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 107, 0, 0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: rotate(45deg) translateY(-100%);
  }
  100% {
    transform: rotate(45deg) translateY(100%);
  }
}

.card.shadow-sm:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(180, 126, 80, 0.3) !important;
  border-color: rgba(209, 163, 118, 0.4) !important;
}

/* Badge styles */
.badge-warning {
  background: linear-gradient(135deg, #d1a376 0%, #b47e50 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(180, 126, 80, 0.3);
}

.badge-success {
  background: linear-gradient(135deg, #8a6d4b 0%, #6b4e2f 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(138, 109, 75, 0.3);
}

/* Custom button styles */
.btn-refill {
  background: linear-gradient(135deg, #d1a376 0%, #b47e50 100%);
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(180, 126, 80, 0.3);
}

.btn-refill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(180, 126, 80, 0.4);
}

.btn-refill:active {
  transform: translateY(1px);
}

.btn-refill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn-refill:hover::before {
  left: 100%;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.5em 1.2em;
    font-size: 14px;
    font-weight: bold;
    border-radius: 999px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    color: #fff;
    letter-spacing: 1px;
}

.status-badge.completed {
  background: linear-gradient(135deg, #28a745, #218838);
}

.status-badge.pending {
  background: linear-gradient(135deg, #ffc107, #d39e00);
}

.status-badge.failed {
  background: linear-gradient(135deg, #dc3545, #c82333);
}

.status-badge i {
  font-size: 1rem;
}


@media (max-width: 768px) {
  .stat-card {
    margin-bottom: 1rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .last-update {
    margin-top: 0.5rem;
  }
}



.navbar-nav .nav-link {
    cursor: pointer;
}


/* กล่องรวม */
.donatecard-promo-row {
    display: flex;
    background: #2b1d12; /* น้ำตาลเข้ม */
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    color: #fff3d1;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
    border: 1px solid #a1864f;
    min-height: 220px;
}

/* กล่องด้านซ้าย */
.donatecard-price-tag {
    background: linear-gradient(to bottom, #f4c542, #c29d3b);
    border-radius: 14px;
    padding: 15px 10px;
    width: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-right: 25px;
    position: relative;
    overflow: hidden;

    /* เพิ่มขอบเรืองแสงสีขาว */
    border: 2px solid #ffffff;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8); /* Gold Glow */
}


.donatecard-amount {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff; /* สีตัวหนังสือเข้มเพื่อ contrast */
}

.donatecard-unit {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 10px;
}


/* ราคาปกติที่ขีดฆ่า */
.donatecard-original-price {
    font-size: 18px;
    color: #ff0000;
    text-decoration: line-through;
    font-weight: bold;
    opacity: 0.8;
    margin-bottom: 5px;
}

/* ราคาลดแบบเด่น + shimmer */
.donatecard-discount-price {
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 5px #f5e132, 0 0 12px #f5e132;
    margin-bottom: 8px;
}

/* เอฟเฟกต์ shimmer animation */
.shimmer-price-animated {
    background: linear-gradient(90deg, #ffd700, #ffffff, #ffd700);
    background-size: 200% auto;
    animation: shimmer-glow-price 2s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

@keyframes shimmer-glow-price {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}


/* ปุ่มเหลืองทอง พร้อม effect วูบวาบ */
.btn-orange-gradient {
    background: linear-gradient(to right, #f4c542, #b88a44); /* เหลืองทอง */
    color: #2b1d12;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    /* เพิ่มเส้นขอบสีขาว */
    border: 0.1px solid #f5dd8e;
}

.btn-orange-gradient:hover {
    background: linear-gradient(to right, #ffe066, #e6ac00);
    color: #000;
}

.btn-orange-gradient:focus,
.btn-orange-gradient:active {
    outline: none;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8) !important; /* เรืองแสงสีทอง */
}

/* เอฟเฟกต์แสงวูบวาบบนปุ่ม */
.shimmer-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    height: 100%;
    width: 50%;
    background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.6), rgba(255,255,255,0.1));
    transform: skewX(-20deg);
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% { left: -75%; }
    100% { left: 125%; }
}

/* ด้านขวา */
.donatecard-promo-details {
    flex: 1;
}

/* แสดง cash และ bonus ในแถวเดียว */
.donatecard-info-pair {
    display: flex;
    gap: 40px;
    align-items: center;
    font-size: 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: #f4c542;
}

.info-box span {
    color: #fff8dc;
    font-size: 20px;
}


/* ของแถม */
.donatecard-label {
    margin: 14px 0 8px;
    font-size: 15px;
    color: #e8c882;
    font-weight: bold;
}

.donatecard-bonus-items-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.donatecard-bonus-item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #b88a44;
    border-radius: 8px;
    padding: 10px;
    width: 100px;
    height: 120px; /* ✅ เพิ่มความสูงคงที่ */
    text-align: center;
    color: #fff9e6;
    transition: transform 0.2s;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* ✅ ช่องห่างสม่ำเสมอ */
    align-items: center;
	gap: 6px;
}


.donatecard-bonus-item-card:hover {
    transform: scale(1.15);
    border: 1px solid #ffd700; /* ขอบเหลืองทองเข้มเมื่อ hover */
}

.donatecard-bonus-item-card img {
    max-width: 48px;
    height: auto;
    object-fit: contain;
    margin-bottom: 4px;
	margin-top: 10px;
}

.donatecard-item-name {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;

    height: 32px; /* ✅ กำหนดความสูงคงที่ให้ชื่อไอเท็ม */
    line-height: 16px;
	margin: 0;
}


.donatecard-item-qty {
    font-size: 14px;
    color: #ffeb3b;
    font-weight: bold;
    min-height: 16px;
}

.donatecard-info-pair.center-align {
    justify-content: center;
}

.info-box i {
    font-size: 20px;
}

.info-box i.fa-coins {
    color: #ffcc00; /* สีทอง */
}
.info-box i.fa-book {
    color: #ffc107; /* เหลืองอมน้ำตาล */
}

.icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 6px;
    vertical-align: middle;
}

.icon-img.membercoin {
  margin-left: 10px;
}


/* สีข้อความของหัวตารางประวัติเติมเงิน */
.table thead th {
    background: linear-gradient(to right, #a1864f, #bfa772); /* สีทองสวย */
    color: #1b1005; /* น้ำตาลเข้ม */
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid #d1a376;
}

/* สีข้อความของข้อมูลแถวทั่วไป */
.table tbody td {
    background: rgba(255, 255, 255, 0.02);
    color: #fffbdc;
    font-size: 15px;
    vertical-align: middle;
}

/* สีของข้อความ status: สำเร็จ */
.table tbody td.text-success {
    color: #90ee90 !important; /* เขียวอ่อน */
}

/* สีของข้อความ status: ผิดพลาด */
.table tbody td.text-danger {
    color: #ff6961 !important; /* แดงอ่อน */
}

/* กล่องป้าย promotion badge */
.promo-badge {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  color: #fff;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.promo-badge:hover {
  animation: shakeBadge 0.4s;
}

/* สีของ badge */
.badge-bestseller {
  background-color: #c62828;
}
.badge-special {
  background-color: #FF3030;
  color: #fff;
}
.badge-recommended {
  background-color: #EEC900;
}
.badge-limited {
  background-color: #B8860B;
}

/* shimmer effect แบบเดียวกับปุ่มเติมเงิน */
.shimmer-badge span::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  height: 100%;
  width: 80%;
  background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.6), rgba(255,255,255,0.1));
  transform: skewX(-20deg);
  animation: shimmerBadge 2.5s infinite;
  z-index: 0;
  border-radius: 20px;
}

@keyframes shimmerBadge {
  0% { left: -100%; }
  100% { left: 100%; }
}
@keyframes shakeBadge {
  0% { transform: translate(0px, 0px) rotate(0deg); }
  20% { transform: translate(-1px, 1px) rotate(-1deg); }
  40% { transform: translate(-1px, -1px) rotate(1deg); }
  60% { transform: translate(1px, 1px) rotate(0deg); }
  80% { transform: translate(1px, -1px) rotate(1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}

/* ✨ สไตล์เริ่มต้น: ชัดเจน เห็นทอง มีแสง */
.shimmer-text {
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 4px #d4af37, 0 0 8px #FFD700;
    transition: all 0.5s ease-in-out;
}

/* ✨ เมื่อครบ 3 วินาที ค่อยแปลงเป็น shimmer */
.shimmer-active {
    background: linear-gradient(90deg, #ffd700, #ffffff, #ffd700);
    background-size: 200% auto;
    animation: shimmerGlow 2s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 8px #fff4b3, 0 0 12px #d4af37;
}

@keyframes shimmerGlow {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.tooltip-card {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip-card .tooltip-text {
  visibility: hidden;
  opacity: 0;
  max-width: 240px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff9e6;
  border: 1px solid rgba(255, 255, 255, 0.6);

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  text-align: center;
  padding: 10px 14px;
  border-radius: 10px;
  position: absolute;
  z-index: 10;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s ease-in-out;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.tooltip-card .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.4) transparent transparent transparent;
}

.tooltip-card:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
