@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

body {
  background: hsl(0, 0%, 0%);
  color: #e6eef3;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
}
.viewer-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#viewerPoints {
  margin: 0;
  font-size: 14px;
  color: #00ff99;
}

.auth-info {
  position: absolute;
  right: 20px;
  top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.auth-info close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  transition: 0.2s;
}

.auth-info close-btn:hover {
  color: #ca2626;
  transform: scale(1.1);
}
#viewerName {
  color: #797979;
}

.auth-info button {
  background: linear-gradient(90deg, #ca2626, #5f0f0f);
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.auth-info button.hidden {
  display: none;
}

.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none; /* ← Mặc định ẩn */
  justify-content: center;
  align-items: center;
  z-index: 9999; /* vẫn nằm trên cùng khi hiện */
}
.popup.active {
  display: flex !important; /* chỉ hiện khi có class active */
}
.popup.hidden {
  display: none !important;
  pointer-events: none;
}


.popup-content {
  background: #1a1a1a;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  width: 350px;
}

.popup-content input {
  width: 94%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #555;
  background: #000;
  color: #fff;
}

.verified {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  vertical-align: middle;
}

.verified svg {
  width: 20px;
  height: 20px;
  fill: #1da1f2; /* màu xanh xác minh */
  filter: drop-shadow(0 0 3px rgba(29,161,242,0.6));
  transition: transform 0.2s ease, filter 0.3s ease;
}

.verified:hover svg {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px rgba(29,161,242,0.8));
}

header {
  background: #1a1a1a;
  padding: 10px;
  justify-content: center;
  box-shadow: 0 7px 10px rgba(0,0,0,0.3);
}

.profile {
  display: flex;
  align-items: center;
  gap: 28px;
  color: white;
  padding: 25px 20px;
}

.profile .avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.profile .info {
  display: flex;
  flex-direction: column;
  align-items: center; /* Căn giữa theo chiều ngang */
  text-align: center;
  line-height: 2.2; /* 👈 thu nhỏ khoảng cách dòng */
}

.profile .info h1 {
  margin: 0;
  font-size: 2.4em;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.profile .info p {
  margin: 4px 0 6px 0; /* 👈 thu khoảng cách trên-dưới */
  color: #ccc;
  font-size: 1.05em;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 4px; /* 👈 giảm khoảng cách giữa icon và mô tả */
}

.social-links a {
  color: #aaa;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.social-links a:hover {
  color: #fff;
  transform: scale(1.2);
}

/* màu thương hiệu khi hover */
.social-links a[title="Facebook"]:hover { color: #1877f2; }
.social-links a[title="YouTube"]:hover { color: #ff0000; }
.social-links a[title="TikTok"]:hover { color: #69C9D0; }

.main-layout {
  display: flex;
  max-width: 1100px;
  margin: 30px auto;
  gap: 20px;
}

.donate-panel {
  flex: 1;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.donate-panel input, .donate-panel textarea {
  width: 97%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ffffff;
  background: #1a1a1a;
  color: #fff;
}

textarea { resize: none; height: 70px; }

.preset-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.preset {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #ffffff;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  color: #fff;
}

.donate-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, #ca2626, #5f0f0f);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  margin-top: 5px;
}

.progress {
  margin-top: 15px;
  background: #1a1a1a;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

.bar {
  height: 8px;
  background: linear-gradient(90deg, #ca2626, #5f0f0f);
  width: 0%;
}

.progress span {
  font-size: 13px;
  color: #aaa;
  position: absolute;
  top: 10px;
  left: 10px;
}

.side-panels {
  width: 330px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 15px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.tab {
  flex: 1;
  padding: 5px 0;
  border: none;
  border-radius: 6px;
  background: #474747;
  color: #fff;
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(90deg, #ca2626, #5f0f0f);
  color: #ffffff;
}

#leaderboard-list p {
  background: linear-gradient(rgba(255,255,255,0.05), rgba(255,255,255,0.05));
  padding: 8px;
  border-radius: 6px;
  margin: 6px 0;
  font-size: 14px;
  transition: all 0.3s ease;
}

/* 🥇 Top 1 – vàng */
#leaderboard-list p:nth-child(1) {
  background: linear-gradient(90deg, #ffd70033, #ffea0033);
  border-left: 3px solid #FFD700;
  font-weight: bold;
  color: #fff6c0;
}

/* 🥈 Top 2 – bạc */
#leaderboard-list p:nth-child(2) {
  background: linear-gradient(90deg, #c0c0c033, #e0e0e033);
  border-left: 3px solid #C0C0C0;
  color: #f5f5f5;
}

/* 🥉 Top 3 – đồng */
#leaderboard-list p:nth-child(3) {
  background: linear-gradient(90deg, #cd7f3233, #b8733333);
  border-left: 3px solid #CD7F32;
  color: #ffe2c4;
}

#recent p {
  background: rgba(255,255,255,0.05);
  padding: 8px;
  border-radius: 6px;
  margin: 6px 0;
  font-size: 14px;
}

.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup.hidden { display: none; }

.popup-content {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.popup-content img {
  width: 230px;
  margin: 10px 0;
}

footer {
  text-align: center;
  color: #777;
  margin: 30px 0;
}
.hidden { display: none; }

.spin_list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.spin_list .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.spin_list .item:hover {
  background: rgba(255,255,255,0.15);
}

.spin_list .text {
  font-weight: 500;
  font-size: 14px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.spin_list .rate {
  font-weight: 600;
  font-size: 13px;
  color: #00ffcc;
  min-width: 45px;
  text-align: right;
}
.spin_list .rate.low {
  color: #ff6666;
}