/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #1a1a2e;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}

/* ===== WRAPPER ===== */
.page-wrapper {
  width: 100%;
  max-width: 640px;
  background: #16162a;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.page-wrapper::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("overlay.webp") center center / cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

/* ===== LOGO ===== */
.logo-bar {
  text-align: center;
  padding: 18px 16px 10px;
  background: linear-gradient(180deg, #1e1e3a 0%, #16162a 100%);
  position: relative;
  z-index: 1;
}
.logo-img {
  max-height: 80px;
  margin: 0 auto;
}

/* ===== HERO SECTION (Banner + Winners) ===== */
.hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 1;
}

/* Banner */
.banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}
.banner-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Winners panel overlay */
.winners-panel {
  position: absolute;
  top: 8px;
  right: 8px;
  width: min(180px, 35%);
  background: rgba(20, 20, 30, 0.25);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 12px;
  z-index: 10;
  overflow: hidden;
}
.winners-panel h3 {
  text-align: center;
  font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  background: rgba(20, 20, 30, 0.35);
  border-radius: 2rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 600;
  padding-bottom: 6px;
  padding-top: 6px;
}
.winners-list-container {
  height: clamp(90px, 25vw, 150px);
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}
.winners-list {
  animation: scrollWinners 20s linear infinite;
}
.winner-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: clamp(0.65rem, 2vw, 0.8rem);
}
.winner-row .user-id {
  color: #999;
  font-weight: 400;
}
.winner-row .amount {
  font-weight: 700;
}
.winner-row .amount.r1 {
  color: #ffd700;
}
.winner-row .amount.r3 {
  color: #ffd700;
}
.winner-row .amount.r5 {
  color: #ffd700;
}
.winner-row .amount.r20 {
  color: #ffd700;
}
.winner-row .amount.r444 {
  color: #ffd700;
  font-size: 0.85rem;
}

@keyframes scrollWinners {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* Site badge inside winners panel */
.site-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.site-badge span {
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  color: #ffd700;
  font-weight: 700;
}
.site-badge .badge-icon {
  width: clamp(18px, 4vw, 24px);
  height: clamp(18px, 4vw, 24px);
  display: block;
}

/* ===== MARQUEE ===== */
.marquee-bar {
  background: linear-gradient(90deg, #2a2a4a, #1e1e3e);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  position: relative;
  z-index: 1;
}
.marquee-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}
.marquee-text-wrapper {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-text {
  display: inline-block;
  animation: marquee 18s linear infinite;
  color: #ffd700;
  font-weight: 600;
  font-size: 0.9rem;
}
@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ===== LINK CARDS ===== */
.links-section {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.link-card {
  background: linear-gradient(135deg, #22223a 0%, #2a2a48 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.25);
}
.link-icon {
  width: 36px;
  height: 36px;
  background: #1a3a2a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.link-icon svg {
  width: 18px;
  height: 18px;
  fill: #4ecdc4;
}
.link-url {
  flex: 1;
  font-size: 0.9rem;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-label {
  color: #ffd700;
  font-weight: 800;
  font-size: 0.95rem;
  margin-right: 10px;
  flex-shrink: 0;
}
.link-visit-btn {
  background: linear-gradient(135deg, #ffd700 0%, #f0c030 100%);
  color: #1a1a2e;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition:
    background 0.25s,
    transform 0.2s,
    box-shadow 0.25s,
    filter 0.25s;
}
.link-visit-btn:hover {
  background: linear-gradient(135deg, #ffe44d 0%, #ffd700 100%);
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.5);
  filter: brightness(1.15);
}
.link-visit-btn svg {
  width: 14px;
  height: 14px;
  fill: #1a1a2e;
}

/* ===== SAVE LINKS MESSAGE ===== */
.save-msg {
  text-align: center;
  padding: 14px 16px 4px;
  color: #ffd700;
  font-weight: 600;
  font-size: 0.92rem;
  font-style: italic;
  position: relative;
  z-index: 1;
}

/* ===== VPN SECTION ===== */
.vpn-section {
  padding: 12px 16px 8px;
  display: flex;
  gap: 12px;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.vpn-btn {
  flex: 1;
  max-width: 260px;
  padding: 12px 16px;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.25s,
    filter 0.25s,
    border-color 0.25s;
}
.vpn-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  filter: brightness(1.2);
  border-color: #ffd700;
}
.vpn-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #555 0%, #333 100%);
  border: 1px solid #666;
  color: #fff;
}
.vpn-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #555 0%, #333 100%);
  border: 1px solid #666;
  color: #fff;
}
.vpn-note {
  text-align: center;
  padding: 12px 20px 16px;
  color: #ffd700;
  font-size: 0.78rem;
  line-height: 1.5;
  font-style: italic;
}

/* ===== INFO CARDS (Agent + App) ===== */
.info-cards {
  padding: 8px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.info-card {
  background: linear-gradient(135deg, #22223a 0%, #2a2a48 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.info-card-title {
  color: #ff9900;
  font-weight: 800;
  font-size: 0.88rem;
}
.info-card-sub {
  color: #aaa;
  font-size: 0.75rem;
  line-height: 1.3;
}
.info-card-btn {
  display: inline-block;
  margin-top: 8px;
  background: linear-gradient(135deg, #ffd700, #f0c030);
  color: #1a1a2e;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  width: fit-content;
  transition:
    transform 0.2s,
    box-shadow 0.25s,
    filter 0.25s;
  border: none;
}
.info-card-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
  filter: brightness(1.15);
}
.info-card-visual {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 3rem;
  opacity: 0.25;
}

/* ===== SOCIAL / SUPPORT GRID ===== */
.social-grid {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.social-card {
  background: linear-gradient(135deg, #22223a 0%, #2a2a48 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.2s;
}
.social-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 215, 0, 0.2);
}
.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
}
.social-icon.support {
  background: linear-gradient(135deg, #ffd700, #f0a030);
}
.social-icon.telegram {
  background: linear-gradient(135deg, #0088cc, #0077b5);
}
.social-icon.facebook {
  background: linear-gradient(135deg, #1877f2, #1565c0);
}
.social-icon.instagram {
  background: linear-gradient(135deg, #e4405f, #c13584);
}
.social-info h4 {
  font-size: 0.82rem;
  font-weight: 700;
}
.social-info p {
  font-size: 0.7rem;
  color: #888;
  margin-top: 2px;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 20px 16px 28px;
  color: #555;
  font-size: 0.7rem;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  z-index: 10001;
}
.lightbox-close:hover {
  color: #ffd700;
}

@media (max-width: 520px) {
  .hero-section {
    height: 160px;
  }
  .logo-img {
    max-height: 60px;
  }
  .winners-panel {
    width: 120px;
    padding: 8px 10px;
    top: 2px;
    right: 2px;
  }
  .winners-panel h3 {
    font-size: 0.6rem;
  }
  .winner-row {
    font-size: 0.5rem;
  }
  .winners-list-container {
    height: 80px;
  }
  .winner-row .amount.r444 {
    font-size: 0.65rem;
  }
  .marquee-bar {
    margin-top: 10px;
  }
  .site-badge span {
    font-size: 0.6rem;
  }
  .site-badge .badge-icon {
    width: 20px;
    height: 20px;
  }
  .link-card {
    padding: 12px 14px;
    gap: 10px;
  }
  .link-url {
    font-size: 0.65rem;
  }
  .link-label {
    font-size: 0.82rem;
    margin-right: 6px;
  }
  .link-visit-btn {
    padding: 7px 14px;
    font-size: 0.75rem;
  }
  .vpn-btn {
    font-size: 0.75rem;
    padding: 10px 12px;
  }
  .info-cards {
    gap: 10px;
  }
  .info-card {
    padding: 12px;
  }
  .social-grid {
    gap: 10px;
  }
  .social-card {
    padding: 12px;
  }
  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}

@media (max-width: 360px) {
  .logo-img {
    max-height: 50px;
  }
  .winners-panel {
    width: 120px;
    top: 2px;
    right: 2px;
    padding: 6px 8px;
  }
  .winners-panel h3 {
    font-size: 0.5rem;
  }
  .winner-row {
    font-size: 0.6rem;
  }
  .winners-list-container {
    height: 80px;
  }
  .site-badge span {
    font-size: 0.7rem;
  }
  .site-badge .badge-icon {
    width: 18px;
    height: 18px;
  }
  .link-card {
    padding: 10px 12px;
    gap: 8px;
    border-radius: 10px;
  }
  .link-icon {
    width: 30px;
    height: 30px;
  }
  .link-url {
    font-size: 0.72rem;
  }
  .link-label {
    font-size: 0.75rem;
  }
  .link-visit-btn {
    padding: 6px 12px;
    font-size: 0.7rem;
  }
}

@media (min-width: 641px) {
  body {
    background: #0f0f20;
  }
  .page-wrapper {
    margin: 0 auto;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
  }
}

/* ===== LINK ICON SVG ANIMATION ===== */
.link-icon-animated {
  animation: linkPulse 2s ease-in-out infinite;
}
@keyframes linkPulse {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}
