/* ================================
   Trust Wallet Card — Styles
   Light Theme (trustwallet.com)
   ================================ */

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

html { scroll-behavior: smooth; }

body {
  background-color: #ffffff;
  color: #111827;
}

/* Orbs — light/pastel */
.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: .25;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-a {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #0500FF 0%, transparent 70%);
  top: -5%; left: -5%;
  animation-duration: 14s;
}
.orb-b {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #2D9FFF 0%, transparent 70%);
  top: 25%; right: -5%;
  animation-duration: 16s;
  animation-delay: -4s;
}
.orb-c {
  width: 220px; height: 220px;
  background: radial-gradient(circle, #48FF91 0%, transparent 70%);
  bottom: 10%; left: 25%;
  animation-duration: 18s;
  animation-delay: -8s;
}
@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -40px) scale(1.08); }
}

/* Card art */
.card-art {
  background: linear-gradient(145deg, #f8fafc, #ffffff);
}

/* ============ REALISTIC VISA CARD ============ */
.visa-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1.586;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px rgba(5,0,255,.25),
    0 8px 24px -8px rgba(0,0,0,.15),
    inset 0 0 0 1px rgba(255,255,255,.15);
  transform-style: preserve-3d;
  transition: transform .4s ease;
}
.visa-card:hover { transform: translateY(-8px) rotateX(4deg) rotateY(-2deg); }

.visa-card-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(45,159,255,.35) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 90%, rgba(5,0,255,.25) 0%, transparent 50%),
    linear-gradient(135deg, #1a1d3a 0%, #0d0f22 40%, #050614 100%);
}
.visa-card-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,.03)' stroke-width='.5'/%3E%3Ccircle cx='50' cy='50' r='30' fill='none' stroke='rgba(255,255,255,.03)' stroke-width='.5'/%3E%3C/svg%3E");
  background-size: 80px 80px;
  opacity: .6;
}

.visa-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
}

/* EMV Chip */
.chip {
  width: 48px; height: 36px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d4af37, #f0d878, #c5a028, #e8c860);
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,.25), inset 0 0 8px rgba(255,255,255,.2);
  overflow: hidden;
}
.chip::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%);
}
.chip-line {
  position: absolute;
  background: rgba(100,70,10,.35);
  border-radius: 1px;
}
.chip-line-h { top: 50%; left: 4px; right: 4px; height: 1px; transform: translateY(-50%); }
.chip-line-v { left: 50%; top: 4px; bottom: 4px; width: 1px; transform: translateX(-50%); }
.chip-line-d1 { top: 0; left: 0; width: 140%; height: 1px; transform-origin: 0 0; transform: rotate(45deg); opacity: .2; }
.chip-line-d2 { top: 0; right: 0; width: 140%; height: 1px; transform-origin: 100% 0; transform: rotate(-45deg); opacity: .2; }

.chip-gold { background: linear-gradient(135deg, #e8c25a, #ffe082, #d4aa37, #f5cf72); }

/* Visa logo width */
.w-18 { width: 4.5rem; }

/* Visa logo override */
.visa-card .visa-logo path {
  fill: rgba(255,255,255,.95);
}

/* Premium variant */
.visa-card-premium { box-shadow: 0 25px 50px -12px rgba(212,175,55,.25), 0 8px 24px -8px rgba(0,0,0,.15); }
.visa-card-premium-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(212,175,55,.25) 0%, transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 90%, rgba(180,140,40,.25) 0%, transparent 50%),
    linear-gradient(135deg, #2a1d0a 0%, #1a1205 40%, #0f0a03 100%);
}
.visa-card-premium-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30 L60 30 M30 0 L30 60' stroke='rgba(255,255,255,.025)' stroke-width='.5'/%3E%3C/svg%3E");
  background-size: 50px 50px;
  opacity: .5;
}

/* Embedded single shield (inside card, more visible) */
.visa-card-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('shield-bg.png') no-repeat center 70%;
  background-size: 55% auto;
  opacity: .15;
  z-index: 0;
}
.visa-card-premium-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('shield-bg.png') no-repeat center 70%;
  background-size: 55% auto;
  opacity: .15;
  z-index: 0;
}

/* Feature cards */
.feature-card {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: #c7c7ff;
  box-shadow: 0 12px 40px rgba(5,0,255,.08);
}

/* FAQ */
.faq-item {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: .875rem;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.faq-item[open] { border-color: #c7c7ff; box-shadow: 0 4px 20px rgba(5,0,255,.06); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "›";
  font-size: 1.25rem;
  color: #9ca3af;
  transition: transform .2s ease, color .2s ease;
  display: inline-block;
  transform: rotate(90deg);
}
.faq-item[open] summary::after { transform: rotate(-90deg); color: #0500FF; }
.faq-answer {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: #6b7280;
  font-size: .925rem;
  line-height: 1.65;
}

/* Scroll reveal */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Focus */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #0500FF;
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgba(5,0,255,.15);
  color: #111827;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f3f4f6; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ============ WALLET SLIDER ============ */
.wallet-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 8px 0;
}

.wallet-track {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  animation: slideWallets 30s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

.wallet-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  opacity: .65;
  transition: opacity .35s ease;
}

/* All logos always grey */
.wallet-item img {
  max-height: 30px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(.9);
  user-select: none;
  pointer-events: none;
}

/* Icon-only logos (coinbase, phantom, metamask, trust) need more size */
.wallet-item img[src*="coinbase"],
.wallet-item img[src*="phantom"],
.wallet-item img[src*="metamask"],
.wallet-item img[src*="wallet-trust"] {
  max-height: 34px;
}

/* Dark text logos need extra brightness in grey mode */
.wallet-item img[src*="exodus"],
.wallet-item img[src*="atomic"],
.wallet-item img[src*="electrum"] {
  filter: grayscale(1) brightness(1.2);
}

/* Fade edges */
.wallet-slider::before,
.wallet-slider::after {
  content: '';
  position: absolute;
  inset-y: 0;
  width: 80px;
  z-index: 10;
  pointer-events: none;
}
.wallet-slider::before {
  left: 0;
  background: linear-gradient(to right, #f9fafb, transparent);
}
.wallet-slider::after {
  right: 0;
  background: linear-gradient(to left, #f9fafb, transparent);
}

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

/* ============ REWARDS SECTION ============ */
/* Shimmer on bars */
.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  background-size: 200% 100%;
  animation: shimmerBar 2s ease-in-out infinite;
}
@keyframes shimmerBar {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Floating emojis */
.animate-float {
  animation: floatEmoji 4s ease-in-out infinite;
}
@keyframes floatEmoji {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(4deg); }
  50% { transform: translateY(0) rotate(-3deg); }
  75% { transform: translateY(-5px) rotate(2deg); }
}

/* Rewards card hover */
.rewards-card {
  transition: transform .4s ease, box-shadow .4s ease;
}
.rewards-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -12px rgba(5,0,255,.12);
}

/* Crypto reward grid items */
.crypto-reward-item {
  position: relative;
  border: 1px solid #f3f4f6;
  border-radius: .875rem;
  padding: 12px;
  text-align: center;
  background: linear-gradient(135deg, #fff 0%, #fafbfc 100%);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.crypto-reward-item:hover {
  transform: translateY(-3px);
  border-color: #c7c7ff;
  box-shadow: 0 8px 20px rgba(5,0,255,.08);
}
.crypto-reward-icon { font-size: 24px; line-height: 1; }
.crypto-reward-icon .coin-logo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.crypto-reward-item:hover .coin-logo {
  transform: scale(1.2) rotate(12deg);
  box-shadow: 0 4px 14px rgba(5,0,255,.18);
}
/* Tiny blue badge per coin */
.crypto-reward-badge {
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to right, #0500FF, #2D9FFF);
  padding: 1px 8px;
  border-radius: 999px;
  margin-top: 5px;
  display: inline-block;
  transition: transform .2s ease;
}
.crypto-reward-item:hover .crypto-reward-badge { transform: scale(1.08); }

@media (max-width: 640px) {
  .wallet-track { gap: 40px; animation-duration: 22s; }
  .wallet-item img { max-height: 24px; }
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  background: rgba(0,0,0,.45);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -12px rgba(0,0,0,.25);
  transform: scale(.96) translateY(12px);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal card option */
.modal-card-option {
  display: block;
  cursor: pointer;
}
.modal-card-option .option-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #ffffff;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.modal-card-option:hover .option-inner {
  border-color: #c7c7ff;
}
.modal-card-option .peer:checked + .option-inner {
  border-color: #0500FF;
  background: #f8f9ff;
  box-shadow: 0 0 0 3px rgba(5,0,255,.08);
}

/* Mini card thumbnail */
.mini-card {
  position: relative;
  width: 72px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
}
.mini-card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,.2) 0%, transparent 40%);
  z-index: 1;
}
.mini-card-body {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 5px;
  display: flex;
  flex-direction: column;
}
.mini-card-logo {
  height: 7px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .9;
}
.mini-card-visa {
  position: absolute;
  bottom: 3px;
  right: 4px;
  width: 22px;
  height: auto;
  opacity: .9;
  filter: brightness(0) invert(1);
  z-index: 2;
}
.mini-card-badge {
  position: absolute;
  top: 0; right: 0;
  font-size: 6px;
  font-weight: 700;
  color: #fff;
  background: rgba(212,175,55,.7);
  padding: 1px 4px;
  border-radius: 0 0 0 4px;
  z-index: 3;
}

/* Mini card variants */
.mini-card-white {
  background: linear-gradient(135deg, #f2f4f8 0%, #e8ecf3 50%, #dfe5ef 100%);
  position: relative;
}
.mini-card-white::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('shield-bg.png') no-repeat center 70%;
  background-size: 45% auto;
  opacity: .12;
  z-index: 0;
}
.mini-card-white .mini-card-logo { filter: brightness(0) invert(0); opacity: .7; }
.mini-card-white .mini-card-visa { filter: brightness(0); opacity: .6; }

.mini-card-blue {
  background: linear-gradient(135deg, #0500FF 0%, #0033cc 50%, #0500dd 100%);
  position: relative;
}
.mini-card-blue::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('shield-bg.png') no-repeat center 70%;
  background-size: 45% auto;
  opacity: .14;
  filter: brightness(0) invert(1);
  z-index: 0;
}

.mini-card-metal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
}
.mini-card-metal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('shield-bg.png') no-repeat center 70%;
  background-size: 45% auto;
  opacity: .14;
  filter: brightness(0) invert(1);
  z-index: 0;
}

/* Mini chip */
.mini-chip {
  width: 10px; height: 7px;
  border-radius: 1.5px;
  background: linear-gradient(135deg, #d4af37, #f0d878, #c5a028);
}
.mini-chip-gold { background: linear-gradient(135deg, #e8c25a, #ffe082, #d4aa37); }

/* Radio circle */
.radio-circle {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.radio-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #0500FF;
  transform: scale(0);
  transition: transform .2s cubic-bezier(.22,1,.36,1);
}
.modal-card-option .peer:checked + .option-inner .radio-circle {
  border-color: #0500FF;
}
.modal-card-option .peer:checked + .option-inner .radio-dot {
  transform: scale(1);
}

/* Scroll lock */
body.modal-open { overflow: hidden; }

/* ========================================
   Language Switcher & i18n
   ======================================== */

#langSwitcher { position: relative; }
#langDropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,.15);
  overflow: hidden;
  z-index: 999999;
}
#langDropdown button { width: 100%; transition: background .15s; }
#langDropdown button:hover { background: #f9fafb; }
#langDropdown button.active { background: #eff6ff; color: #0500FF; font-weight: 600; }

/* RTL */
body.rtl-mode { direction: rtl; }
body.rtl-mode .rewards-card,
body.rtl-mode .feature-card,
body.rtl-mode .faq-item,
body.rtl-mode .mini-card,
body.rtl-mode .visa-card-content { direction: rtl; text-align: right; }

/* Flex direction reversal helpers for common patterns */
body.rtl-mode .hero-text { text-align: right; }
body.rtl-mode .hero-text .flex { flex-direction: row-reverse; }
body.rtl-mode .feature-card .flex { flex-direction: row-reverse; }
body.rtl-mode .steps-block .flex { flex-direction: row-reverse; }
body.rtl-mode .rewards-block .flex { flex-direction: row-reverse; }
body.rtl-mode .faq-item .flex { flex-direction: row-reverse; }
body.rtl-mode .cta-block .flex { flex-direction: row-reverse; }
body.rtl-mode .modal-body .flex { flex-direction: row-reverse; }
body.rtl-mode #langDropdown { right: auto; left: 0; }
