/* =============================================
   bigtip.me — Black + Gold, mobile-first
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #FFD700;
  --gold-dim: #c9a800;
  --gold-glow: rgba(255, 215, 0, 0.35);
  --bg: #0a0a0a;
  --bg2: #111111;
  --white: #f5f5f5;
  --grey: #888;
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --radius: 6px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* RTL support */
[dir="rtl"] { font-family: 'Helvetica Neue', Helvetica, Arial, 'Noto Sans Arabic', sans-serif; }


/* =============================================
   SHARE BUTTON
   ============================================= */

.share-fab {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,215,0,0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background var(--transition), transform 0.15s;
}

.share-fab:hover { background: rgba(255,215,0,0.2); }
.share-fab:active { transform: scale(0.96); }

.share-icon { font-size: 15px; line-height: 1; }

[dir="rtl"] .share-fab { left: auto; right: 16px; }

.share-fab.copied {
  background: rgba(255,215,0,0.25);
  border-color: var(--gold);
}


/* =============================================
   LANGUAGE SWITCHER
   ============================================= */

.lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
}

[dir="rtl"] .lang-switcher { right: auto; left: 16px; }

.lang-btn {
  background: rgba(255,215,0,0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition);
}

.lang-btn:hover { background: rgba(255,215,0,0.2); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: var(--radius);
  padding: 6px 0;
  display: none;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

[dir="rtl"] .lang-dropdown { right: auto; left: 0; }

.lang-dropdown.open { display: block; }

.lang-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--white);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition);
}

[dir="rtl"] .lang-dropdown button { text-align: right; }

.lang-dropdown button:hover { background: rgba(255,215,0,0.1); color: var(--gold); }


/* =============================================
   HERO
   ============================================= */

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 48px;
  position: relative;
  overflow: hidden;
}

/* subtle radial glow behind counter */
.hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 100vw);
  height: min(600px, 100vw);
  background: radial-gradient(ellipse, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.hero-inner {
  width: 100%;
  max-width: 700px;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Record badge */
.record-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--gold-dim);
  background: rgba(255, 215, 0, 0.08);
  color: var(--gold);
  padding: 7px 18px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: badge-glow 3s ease-in-out infinite;
}

.badge-trophy { font-size: 16px; }

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(255,215,0,0); }
  50% { box-shadow: 0 0 16px rgba(255,215,0,0.25); }
}

/* Main hero headline */
.hero-headline {
  font-size: clamp(28px, 8vw, 62px);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-align: center;
}

.hero-headline br { display: block; }

/* Not list */
.not-list {
  max-width: 480px;
  text-align: center;
}

.not-list p {
  font-size: clamp(13px, 3vw, 16px);
  color: var(--grey);
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.counter-block { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.counter-label {
  letter-spacing: 0.25em;
  font-size: 11px;
  color: var(--grey);
  text-transform: uppercase;
}

.counter-value {
  font-size: clamp(52px, 13vw, 96px);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px var(--gold-glow);
  cursor: pointer;
  user-select: none;
}

.currency-hint {
  font-size: 11px;
  color: var(--grey);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-top: -4px;
  cursor: pointer;
}

.counter-sub {
  font-size: 14px;
  color: var(--grey);
  margin-top: 4px;
}

.counter-challenge {
  font-size: 11px;
  color: var(--grey);
  opacity: 0.5;
  font-style: italic;
  margin-top: 6px;
  text-align: center;
}

/* Mini recent badges */
.mini-tips-wrap {
  margin-top: 14px;
  overflow: hidden;
  max-width: 420px;
  width: 100%;
  position: relative;
}

.mini-tips-wrap::before,
.mini-tips-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 32px;
  z-index: 1;
  pointer-events: none;
}
.mini-tips-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.mini-tips-wrap::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }

.mini-tips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 4px;
  scroll-behavior: smooth;
}
.mini-tips::-webkit-scrollbar { display: none; }

.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,215,0,0.07);
  border: 1px solid rgba(255,215,0,0.18);
  border-radius: 20px;
  padding: 3px 10px 3px 7px;
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--white);
  opacity: 0.75;
  animation: badge-pop 0.3s ease;
}
.mini-badge .mb-icon { font-size: 10px; }
.mini-badge .mb-name { color: var(--grey); }
.mini-badge .mb-amount { color: var(--gold); font-weight: 700; }

@keyframes badge-pop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 0.75; transform: scale(1); }
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.hero-copy { display: flex; flex-direction: column; gap: 6px; }

.hero-line-1 {
  font-size: clamp(18px, 4.5vw, 28px);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.01em;
}

.hero-line-2 {
  font-size: clamp(14px, 3.5vw, 20px);
  color: var(--white);
  opacity: 0.75;
}

.cta-joke {
  font-size: 13px;
  color: var(--grey);
  opacity: 0.7;
  text-align: center;
  font-style: italic;
  max-width: 320px;
  line-height: 1.5;
}

.scroll-hint {
  font-size: 12px;
  color: var(--grey);
  text-decoration: none;
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
}

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }


/* =============================================
   CTA BUTTON
   ============================================= */

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  padding: 20px 32px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 32px var(--gold-glow), 0 4px 16px rgba(0,0,0,0.4);
  animation: cta-pulse 2.5s ease-in-out infinite;
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 48px rgba(255,215,0,0.55), 0 4px 20px rgba(0,0,0,0.5);
  animation: none;
}

.cta-btn:active { transform: scale(0.98); }

.cta-secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  box-shadow: 0 0 20px var(--gold-glow);
  margin-top: 16px;
  animation: none;
}

.cta-secondary:hover {
  background: var(--gold);
  color: #000;
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 32px var(--gold-glow), 0 4px 16px rgba(0,0,0,0.4); }
  50% { box-shadow: 0 0 56px rgba(255,215,0,0.6), 0 4px 20px rgba(0,0,0,0.5); }
}


/* =============================================
   DRAWER
   ============================================= */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #141414;
  border-top: 2px solid var(--gold-dim);
  border-radius: 20px 20px 0 0;
  padding: 32px 24px 40px;
  z-index: 300;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 92dvh;
  overflow-y: auto;
  max-width: 600px;
  margin: 0 auto;
}

.drawer.open { transform: translateY(0); }

.drawer-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--grey);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

[dir="rtl"] .drawer-close { right: auto; left: 20px; }

.drawer-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 380px) { .amount-grid { grid-template-columns: repeat(3, 1fr); } }

.amount-btn {
  background: #1e1e1e;
  border: 1px solid #333;
  color: var(--white);
  padding: 12px 6px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.amount-btn:hover, .amount-btn.selected {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.custom-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  border-color: var(--gold-dim);
}

.custom-btn.selected, .custom-btn:hover {
  background: var(--gold);
  color: #000;
}

.custom-input-wrap {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.currency-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--grey);
}

.cur-btn {
  background: #1e1e1e;
  border: 1px solid #333;
  color: var(--white);
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.cur-btn.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.name-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.input-label {
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 0.04em;
}

input[type="text"], input[type="number"] {
  background: #1e1e1e;
  border: 1px solid #333;
  color: var(--white);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
  font-family: var(--font);
}

input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--gold-dim);
}

.submit-btn {
  width: 100%;
  padding: 18px;
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s, opacity 0.15s;
}

.submit-btn:hover { transform: scale(1.02); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.submit-arrow { font-size: 22px; }

.drawer-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--grey);
  text-align: center;
  opacity: 0.7;
}


/* =============================================
   STORY
   ============================================= */

.story {
  background: var(--bg2);
  padding: 80px 24px;
}

.story-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.anon-icon {
  font-size: 64px;
  opacity: 0.25;
  filter: grayscale(1);
}

.story-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.story-lines p {
  font-size: clamp(16px, 4vw, 22px);
  line-height: 1.5;
  color: var(--white);
  opacity: 0.9;
}

.story-lines em { font-style: italic; color: var(--gold); }
.story-lines strong { color: var(--gold); font-weight: 800; }

.story-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #2a2a2a;
  padding-top: 32px;
  width: 100%;
}

.story-footer p {
  font-size: clamp(13px, 3vw, 16px);
  color: var(--grey);
  line-height: 1.6;
}


/* =============================================
   TOP 10
   ============================================= */

.top-section {
  background: var(--bg2);
  padding: 60px 24px;
}

.top-inner {
  max-width: 480px;
  margin: 0 auto;
}

.top-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--grey);
  margin-bottom: 28px;
}

.top-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #1a1a1a;
  border-radius: var(--radius);
  border: 1px solid #222;
  animation: badge-pop 0.4s ease;
}

.top-item.gold-rank  { border-color: #c9a800; background: rgba(201,168,0,0.08); }
.top-item.silver-rank{ border-color: #888; background: rgba(136,136,136,0.06); }
.top-item.bronze-rank{ border-color: #7a4f2a; background: rgba(122,79,42,0.08); }

.top-rank {
  font-size: 18px;
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.top-name {
  flex: 1;
  font-size: 15px;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}

.top-total-count {
  text-align: center;
  font-size: 12px;
  color: var(--grey);
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.top-total-count strong {
  color: var(--gold);
  font-weight: 800;
}

.top-empty {
  text-align: center;
  color: var(--grey);
  font-size: 14px;
  opacity: 0.5;
  padding: 24px 0;
  font-style: italic;
}


/* =============================================
   DONORS
   ============================================= */

.donors {
  padding: 48px 0;
  overflow: hidden;
}

.donors-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--grey);
  margin-bottom: 20px;
}

.donors-track-wrap {
  overflow: hidden;
  position: relative;
}

/* fade edges */
.donors-track-wrap::before,
.donors-track-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.donors-track-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.donors-track-wrap::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }

.donors-track {
  display: flex;
  gap: 12px;
  padding: 0 24px;
  animation: scroll-left 30s linear infinite;
  width: max-content;
}

.donors-track:hover { animation-play-state: paused; }

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.donor-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 40px;
  padding: 8px 16px;
  white-space: nowrap;
  font-size: 14px;
  flex-shrink: 0;
}

.donor-chip .chip-icon { color: var(--gold); }
.donor-chip .chip-name { color: var(--white); }
.donor-chip .chip-amount { color: var(--gold); font-weight: 700; }


/* =============================================
   FOOTER
   ============================================= */

.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--grey);
  opacity: 0.5;
  border-top: 1px solid #1a1a1a;
}

.footer .contact-info {
  margin-top: 12px;
  opacity: 0.7;
  font-size: 12px;
}

.footer .contact-info a {
  color: var(--gold);
  text-decoration: none;
}

.footer .contact-info a:hover {
  text-decoration: underline;
}


/* =============================================
   LOADING STATE
   ============================================= */

.counter-value.loading {
  opacity: 0.3;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink { 0%,100% { opacity: 0.3; } 50% { opacity: 0.6; } }


/* =============================================
   RESPONSIVE TWEAKS
   ============================================= */

@media (min-width: 600px) {
  .drawer { left: 50%; right: auto; transform: translateX(-50%) translateY(100%); width: 560px; }
  .drawer.open { transform: translateX(-50%) translateY(0); }
}

@media (max-width: 480px) {
  .hero { padding: 100px 20px 40px; }
  .cta-btn { padding: 18px 24px; font-size: 18px; }
}


/* =============================================
   FLOATING STICKERS
   ============================================= */

#stickerLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.sticker {
  position: absolute;
  background: #ffe566;
  color: #1a1a00;
  font-family: 'Caveat', cursive;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  padding: 14px 16px 12px;
  max-width: 200px;
  border-radius: 3px;
  box-shadow: 3px 4px 12px rgba(0,0,0,0.45), 0 1px 2px rgba(0,0,0,0.2);
  pointer-events: none;
  user-select: none;
  opacity: 0;
  animation: sticker-in 0.5s ease forwards, sticker-float 5s ease-in-out infinite;
}

/* tape strip at top */
.sticker::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 14px;
  background: rgba(255, 230, 80, 0.55);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sticker-tip {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: #7a5f00;
  border-top: 1px dashed rgba(0,0,0,0.15);
  padding-top: 5px;
}

@keyframes sticker-in {
  from { opacity: 0; transform: var(--rot) scale(0.6); }
  to   { opacity: 0.92; transform: var(--rot) scale(1); }
}

@keyframes sticker-float {
  0%, 100% { transform: var(--rot) translateY(0px); }
  50%       { transform: var(--rot) translateY(-7px); }
}

/* hide all stickers on small screens where they'd cover content */
@media (max-width: 768px) {
  #stickerLayer { display: none; }
}
