/* ============================================
   AMUN RA SOLAR LEGACY FLOW - Custom CSS
   Egyptian theme with gold gradients & refined ornamental details
   ============================================ */

/* CSS Custom Properties */
:root {
  --gold-light: #f4d47c;
  --gold-primary: #d4a438;
  --gold-dark: #9c7a2e;
  --gold-deep: #6b5420;
  --sand-light: #f5f0e1;
  --sand-medium: #e8dcc8;
  --papyrus: #f7f3e8;
  --obsidian: #1a1a2e;
  --obsidian-light: #2d2d44;
  --lapis: #1e3a5f;
  --lapis-light: #2a4d7a;
  --scarab-teal: #2a7d6e;
  --ruby: #8b2942;
  --cream: #fefcf7;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes tilt {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@keyframes tiltHover {
  0%,
  100% {
    transform: rotate(-3deg) scale(1.02);
  }
  50% {
    transform: rotate(3deg) scale(1.02);
  }
}

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

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.5rem);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 1rem rgba(212, 164, 56, 0.3);
  }
  50% {
    box-shadow: 0 0 2rem rgba(212, 164, 56, 0.5);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation Utility Classes */
.animate-tilt {
  animation: tilt 4s ease-in-out infinite;
}

.animate-tilt-hover:hover {
  animation: tiltHover 0.6s ease-in-out infinite;
}

.animate-marquee {
  animation: marquee 25s linear infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  background-size: 200% auto;
  animation: shimmer 3s ease-in-out infinite;
  -webkit-background-clip: text;
  background-clip: text;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* ============================================
   GRADIENT BACKGROUNDS
   ============================================ */

.gradient-gold {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 50%, var(--gold-light) 100%);
}

.gradient-obsidian {
  background: linear-gradient(180deg, var(--obsidian) 0%, var(--obsidian-light) 100%);
}

.gradient-solar {
  background: linear-gradient(180deg, var(--obsidian) 0%, var(--lapis) 40%, var(--gold-deep) 100%);
}

.gradient-papyrus {
  background: linear-gradient(180deg, var(--papyrus) 0%, var(--sand-medium) 100%);
}

/* ============================================
   SVG PATTERNS
   ============================================ */

.pattern-hieroglyph {
  background-image: 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='M30 5 L35 15 L30 25 L25 15 Z' fill='%23d4a43815'/%3E%3Ccircle cx='15' cy='40' r='4' fill='%23d4a43810'/%3E%3Crect x='45' y='35' width='8' height='15' rx='2' fill='%23d4a43810'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

.pattern-scarab {
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='40' cy='40' rx='12' ry='8' fill='none' stroke='%23d4a43812' stroke-width='1'/%3E%3Ccircle cx='40' cy='30' r='6' fill='none' stroke='%23d4a43812' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

.pattern-pyramid {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 10 L90 90 L10 90 Z' fill='none' stroke='%23d4a43808' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 100%);
  color: var(--obsidian);
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 0.25rem 1rem rgba(212, 164, 56, 0.3);
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-light) 100%);
  box-shadow: 0 0.375rem 1.5rem rgba(212, 164, 56, 0.5);
  transform: translateY(-0.125rem);
}

.btn-secondary {
  background: transparent;
  color: var(--gold-light);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border: 0.125rem solid var(--gold-primary);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--gold-primary);
  color: var(--obsidian);
}

/* ============================================
   CARD STYLES
   ============================================ */

.card-game {
  background: linear-gradient(145deg, var(--obsidian-light) 0%, var(--obsidian) 100%);
  border: 0.0625rem solid var(--gold-dark);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-game:hover {
  border-color: var(--gold-primary);
  transform: translateY(-0.25rem);
  box-shadow: 0 0.5rem 1.5rem rgba(212, 164, 56, 0.2);
}

.card-promo {
  background: linear-gradient(145deg, var(--lapis-light) 0%, var(--lapis) 100%);
  border: 0.0625rem solid var(--gold-dark);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card-promo:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0.5rem 1.5rem rgba(212, 164, 56, 0.15);
}

/* ============================================
   BONUS BADGE
   ============================================ */

.bonus-badge {
  background: linear-gradient(145deg, rgba(26, 26, 46, 0.95) 0%, rgba(45, 45, 68, 0.95) 100%);
  border: 0.125rem solid var(--gold-primary);
  border-radius: 1rem;
  box-shadow: 0 0 2rem rgba(212, 164, 56, 0.3), inset 0 0.0625rem 0 rgba(244, 212, 124, 0.1);
}

/* ============================================
   TABLE STYLES
   ============================================ */

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.table-payments {
  width: 100%;
  border-collapse: collapse;
  min-width: 30rem;
}

.table-payments th,
.table-payments td {
  padding: 1rem;
  text-align: left;
  border-bottom: 0.0625rem solid var(--gold-dark);
}

.table-payments th {
  background: var(--obsidian-light);
  color: var(--gold-light);
  font-weight: 600;
}

.table-payments td {
  background: var(--obsidian);
  color: var(--sand-light);
}

.table-payments tr:hover td {
  background: var(--obsidian-light);
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav-link {
  color: var(--sand-light);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--gold-light);
  background: rgba(212, 164, 56, 0.1);
}

/* Mobile Menu */
.mobile-menu {
  background: var(--obsidian);
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* ============================================
   STEP BADGES
   ============================================ */

.step-badge {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 100%);
  color: var(--obsidian);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 0.25rem 1rem rgba(212, 164, 56, 0.3);
}

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

.footer-link {
  color: var(--sand-medium);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--gold-light);
}

.badge-18 {
  background: var(--ruby);
  color: var(--cream);
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  font-weight: 700;
  font-size: 0.875rem;
}

/* ============================================
   PROSE STYLING FOR MARKDOWN CONTENT
   ============================================ */

.prose {
  color: var(--sand-light);
  line-height: 1.75;
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

.prose h2 {
  color: var(--gold-light);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.125rem solid var(--gold-dark);
}

.prose h3 {
  color: var(--gold-primary);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose h4 {
  color: var(--sand-light);
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1.25rem;
  font-size: clamp(1rem, 2vw, 1.0625rem);
}

.prose a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 0.1875rem;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: var(--gold-primary);
}

.prose strong {
  color: var(--gold-light);
  font-weight: 600;
}

.prose em {
  color: var(--sand-medium);
  font-style: italic;
}

/* Prose Lists */
.prose ul {
  list-style: none;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose ul li {
  position: relative;
  margin-bottom: 0.625rem;
  padding-left: 0.5rem;
}

.prose ul li::before {
  content: "◆";
  color: var(--gold-primary);
  position: absolute;
  left: -1.25rem;
  font-size: 0.625rem;
  top: 0.5rem;
}

.prose ol {
  list-style: none;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  counter-reset: prose-counter;
}

.prose ol li {
  position: relative;
  margin-bottom: 0.625rem;
  padding-left: 0.5rem;
  counter-increment: prose-counter;
}

.prose ol li::before {
  content: counter(prose-counter) ".";
  color: var(--gold-primary);
  position: absolute;
  left: -1.5rem;
  font-weight: 600;
}

/* Prose Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.prose thead th {
  background: var(--obsidian-light);
  color: var(--gold-light);
  font-weight: 600;
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 0.125rem solid var(--gold-dark);
}

.prose tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 0.0625rem solid rgba(212, 164, 56, 0.2);
  color: var(--sand-light);
}

.prose tbody tr:hover td {
  background: rgba(212, 164, 56, 0.05);
}

/* Prose Blockquotes */
.prose blockquote {
  border-left: 0.25rem solid var(--gold-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(212, 164, 56, 0.05);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--sand-medium);
}

.prose blockquote p {
  margin-bottom: 0;
}

/* Prose Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  border: 0.0625rem solid var(--gold-dark);
}

/* Prose Code */
.prose code {
  background: var(--obsidian-light);
  color: var(--gold-light);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.prose pre {
  background: var(--obsidian-light);
  border: 0.0625rem solid var(--gold-dark);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background: transparent;
  padding: 0;
}

/* Prose HR */
.prose hr {
  border: none;
  height: 0.0625rem;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
  margin: 2rem 0;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-gold {
  color: var(--gold-primary);
}

.text-gold-light {
  color: var(--gold-light);
}

.text-sand {
  color: var(--sand-light);
}

.bg-obsidian {
  background-color: var(--obsidian);
}

.bg-obsidian-light {
  background-color: var(--obsidian-light);
}

.border-gold {
  border-color: var(--gold-dark);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}

::-webkit-scrollbar-track {
  background: var(--obsidian);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 48rem) {
  .prose {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .prose h2 {
    margin-top: 2rem;
  }

  .prose h3 {
    margin-top: 1.5rem;
  }
}

/* FAQ Accordion Styles */
.faq-item {
  border: 0.0625rem solid var(--gold-dark);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--obsidian-light);
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--gold-light);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(212, 164, 56, 0.1);
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--sand-light);
  line-height: 1.6;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.2s ease;
  color: var(--gold-primary);
}
