/* Cairo & Tajawal Fonts for beautiful Arabic typography */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;700;800&family=Tajawal:wght@300;400;500;700;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Default Theme (Dark Mode) */
  --md-sys-color-background: #0E0B16;
  --md-sys-color-surface: #18122B;
  --md-sys-color-surface-variant: #2B243C;
  --md-sys-color-primary: #7F56DA;
  --md-sys-color-primary-container: #3B2A63;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-on-primary-container: #E8DDFF;
  --md-sys-color-secondary: #D4AF37; /* ذهبي للرؤى */
  --md-sys-color-secondary-container: #4D3D10;
  --md-sys-color-on-secondary: #2B2100;
  --md-sys-color-on-secondary-container: #FFE18D;
  --md-sys-color-outline: #938F99;
  --md-sys-color-on-surface: #E6E1E5;
  --md-sys-color-on-surface-variant: #CAC4D0;
  --md-sys-color-error: #FFB4AB;
  --md-sys-color-error-container: #93000A;
  --md-sys-color-success: #81C784;

  /* Typography */
  --font-family: 'Cairo', 'Tajawal', sans-serif;
  
  /* Shadow Elevation MD3 */
  --md-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
  --md-elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
  --md-elevation-3: 0px 1px 3px 0px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.2, 0, 0, 1);
  --transition-medium: 0.4s cubic-bezier(0.2, 0, 0, 1);
}

body[data-theme="light"] {
  /* Light Mode Palette */
  --md-sys-color-background: #FAF8FD;
  --md-sys-color-surface: #FFFFFF;
  --md-sys-color-surface-variant: #EDEAF4;
  --md-sys-color-primary: #6223E0;
  --md-sys-color-primary-container: #E8DDFF;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-on-primary-container: #1E0060;
  --md-sys-color-secondary: #9E7400; /* ذهبي أغمق للوضوح في المظهر الفاتح */
  --md-sys-color-secondary-container: #FFE18D;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-on-secondary-container: #322000;
  --md-sys-color-outline: #79747E;
  --md-sys-color-on-surface: #1C1B1F;
  --md-sys-color-on-surface-variant: #49454F;
  --md-sys-color-error: #BA1A1A;
  --md-sys-color-error-container: #FFDAD6;
  --md-sys-color-success: #2E7D32;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-surface);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* LTR Mode overrides */
body.ltr-mode {
  direction: ltr;
  text-align: left;
  --font-family: 'Outfit', sans-serif;
}

/* خلفية روحانية نجوم وغيوم */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(var(--md-sys-color-outline), rgba(255,255,255,.2) 2px, transparent 40px),
    radial-gradient(var(--md-sys-color-outline), rgba(255,255,255,.15) 1px, transparent 30px),
    radial-gradient(var(--md-sys-color-outline), rgba(255,255,255,.1) 2px, transparent 40px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
  opacity: 0.08;
  z-index: -1;
  pointer-events: none;
}

/* Header & Navigation */
header {
  background: rgba(24, 18, 43, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--md-elevation-1);
  transition: background var(--transition-fast);
}

body[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
}

.logo-icon {
  font-size: 2.2rem;
  color: var(--md-sys-color-secondary);
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
  animation: float 4s ease-in-out infinite;
}

.logo-text {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--md-sys-color-on-surface) 30%, var(--md-sys-color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.ltr-mode .logo-text {
  background: linear-gradient(135deg, var(--md-sys-color-secondary) 0%, var(--md-sys-color-on-surface) 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover, .nav-btn.active {
  color: var(--md-sys-color-primary);
  background-color: rgba(127, 86, 218, 0.1);
}

/* Container */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  border-radius: 28px;
  background: radial-gradient(circle at top right, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-surface) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--md-elevation-2);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  transition: background var(--transition-fast);
}

body[data-theme="light"] .hero {
  background: radial-gradient(circle at top right, var(--md-sys-color-surface-variant) 0%, #FFFFFF 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero p {
  font-size: 1.2rem;
  color: var(--md-sys-color-on-surface-variant);
  max-width: 650px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
  color: var(--md-sys-color-on-surface);
}

body[data-theme="light"] .hero-chip {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-chip i {
  color: var(--md-sys-color-secondary);
}

/* Service Pricing Card */
.pricing-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .pricing-section {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2rem;
  }
}

.info-card {
  background-color: var(--md-sys-color-surface);
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--md-elevation-1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

body[data-theme="light"] .info-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--md-sys-color-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.info-list {
  list-style: none;
  margin-bottom: 2rem;
}

.info-list li {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  color: var(--md-sys-color-on-surface-variant);
}

.info-list li i {
  color: var(--md-sys-color-primary);
  margin-top: 0.2rem;
  font-size: 1.2rem;
}

.price-tag {
  background: var(--md-sys-color-surface-variant);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.2);
  transition: background-color var(--transition-fast);
}

.price-val {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--md-sys-color-secondary);
}

.price-sub {
  font-size: 0.9rem;
  color: var(--md-sys-color-outline);
  margin-top: 0.3rem;
}

/* Material Outlined Input */
.input-group {
  position: relative;
  margin-bottom: 1.8rem;
  width: 100%;
}

.md-input, .md-textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  background-color: var(--md-sys-color-surface) !important;
  color: var(--md-sys-color-on-surface) !important;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 12px;
  outline: none;
  transition: var(--transition-fast);
  text-align: right;
  direction: rtl;
}

body.ltr-mode .md-input, body.ltr-mode .md-textarea {
  text-align: left;
  direction: ltr;
}

.md-textarea {
  min-height: 150px;
  resize: vertical;
}

.input-label {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--md-sys-color-surface);
  padding: 0 0.4rem;
  color: var(--md-sys-color-outline);
  pointer-events: none;
  transition: var(--transition-fast);
  font-size: 1rem;
}

body.ltr-mode .input-label {
  left: 1.2rem;
  right: auto;
}

.input-group-textarea .input-label {
  top: 1.2rem;
  transform: none;
}

/* Focus and Active States */
.md-input:focus, .md-textarea:focus {
  border-color: var(--md-sys-color-primary);
  border-width: 2px;
}

.md-input:focus ~ .input-label,
.md-input:not(:placeholder-shown) ~ .input-label {
  top: 0;
  font-size: 0.85rem;
  color: var(--md-sys-color-primary);
  font-weight: 500;
}

.md-textarea:focus ~ .input-label,
.md-textarea:not(:placeholder-shown) ~ .input-label {
  top: 0;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--md-sys-color-primary);
  font-weight: 500;
}


.input-helper {
  font-size: 0.8rem;
  color: var(--md-sys-color-outline);
  margin-top: 0.4rem;
  margin-right: 0.5rem;
}

body.ltr-mode .input-helper {
  margin-right: 0;
  margin-left: 0.5rem;
}

/* Buttons (MD3 Filled & Tonal) */
.md-btn {
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
  box-shadow: var(--md-elevation-1);
  position: relative;
  overflow: hidden;
}

.md-btn-primary {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.md-btn-primary:hover {
  background-color: #926bf3;
  box-shadow: var(--md-elevation-2);
}

body[data-theme="light"] .md-btn-primary:hover {
  background-color: #5112cc;
}

.md-btn-secondary {
  background-color: var(--md-sys-color-secondary);
  color: var(--md-sys-color-on-secondary);
}

.md-btn-secondary:hover {
  background-color: #eec854;
  box-shadow: var(--md-elevation-2);
}

body[data-theme="light"] .md-btn-secondary {
  color: #fff;
}

body[data-theme="light"] .md-btn-secondary:hover {
  background-color: #8c6700;
}

.md-btn-tonal {
  background-color: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-theme="light"] .md-btn-tonal {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.md-btn-tonal:hover {
  background-color: #3b3352;
}

body[data-theme="light"] .md-btn-tonal:hover {
  background-color: #e4dfeb;
}

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

/* Tabs & Sections Views */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view-section.active {
  display: block;
}

/* Submit Dream Card */
.form-card {
  background-color: var(--md-sys-color-surface);
  border-radius: 28px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--md-elevation-2);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

body[data-theme="light"] .form-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--md-sys-color-on-surface);
}

/* Tracking / Status section */
.tracking-card {
  max-width: 600px;
  margin: 0 auto;
}

.search-results {
  margin-top: 2rem;
}

.dream-item {
  background-color: var(--md-sys-color-surface-variant);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--md-elevation-1);
  transition: background-color var(--transition-fast);
}

body[data-theme="light"] .dream-item {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dream-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body[data-theme="light"] .dream-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dream-id {
  font-weight: 700;
  color: var(--md-sys-color-secondary);
}

.dream-date {
  font-size: 0.85rem;
  color: var(--md-sys-color-outline);
}

.status-badge {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status-pending_payment {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
}

.status-paid {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.status-interpreted {
  background-color: rgba(129, 199, 132, 0.15);
  color: var(--md-sys-color-success);
}

body[data-theme="light"] .status-interpreted {
  background-color: #E8F5E9;
}

.dream-content {
  margin-bottom: 1.5rem;
}

.dream-content h4 {
  font-size: 0.95rem;
  color: var(--md-sys-color-outline);
  margin-bottom: 0.5rem;
}

.dream-text-body {
  font-size: 1.05rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.interpretation-box {
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.08) 0%, rgba(24, 18, 43, 0.4) 100%);
  border: 1px dashed var(--md-sys-color-secondary);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

body[data-theme="light"] .interpretation-box {
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.05) 0%, rgba(255,255,255,0.8) 100%);
}

.interpretation-box::before {
  content: "\f689"; /* هلال إسلامي أو نجمة */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 1rem;
  bottom: 0.5rem;
  font-size: 4rem;
  color: var(--md-sys-color-secondary);
  opacity: 0.05;
  pointer-events: none;
}

body.ltr-mode .interpretation-box::before {
  left: auto;
  right: 1rem;
}

.interpretation-box h4 {
  color: var(--md-sys-color-secondary);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.interpretation-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--md-sys-color-on-surface);
  white-space: pre-wrap;
}

.interpretation-footer {
  font-size: 0.8rem;
  color: var(--md-sys-color-outline);
  margin-top: 1rem;
  text-align: left;
}

body.ltr-mode .interpretation-footer {
  text-align: right;
}

/* Stripe Banner / Notification styling */
.alert-banner {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  padding: 1rem 1.5rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(127, 86, 218, 0.2);
  animation: slideDown 0.3s ease-out;
}

body.ltr-mode .alert-banner-close {
  margin-left: auto;
  margin-right: 0;
}

.alert-banner.success {
  background-color: rgba(129, 199, 132, 0.15);
  color: var(--md-sys-color-success);
  border-color: rgba(129, 199, 132, 0.3);
}

.alert-banner.error {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error);
  border-color: rgba(255, 180, 171, 0.3);
}

.alert-banner-close {
  margin-right: auto;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
}

/* FAQs */
.faqs-section {
  max-width: 800px;
  margin: 4rem auto 2rem;
}

.faqs-section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--md-sys-color-on-surface);
}

.faq-item {
  background-color: var(--md-sys-color-surface);
  border-radius: 16px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  box-shadow: var(--md-elevation-1);
}

body[data-theme="light"] .faq-item {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-question {
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  user-select: none;
}

.faq-answer {
  padding: 0 1.5rem 1.2rem;
  line-height: 1.7;
  color: var(--md-sys-color-on-surface-variant);
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

body[data-theme="light"] .faq-answer {
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

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

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

.faq-question i {
  transition: var(--transition-fast);
}

/* Footer */
footer {
  background-color: #08060F;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
  text-align: center;
  transition: background-color var(--transition-fast);
}

body[data-theme="light"] footer {
  background-color: #F3EEFA;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--md-sys-color-outline);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--md-sys-color-primary);
}

.copyright {
  font-size: 0.85rem;
  color: var(--md-sys-color-outline);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  border-top: 3px solid var(--md-sys-color-on-primary);
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 11, 22, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body[data-theme="light"] .loading-overlay {
  background: rgba(255, 255, 255, 0.85);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-overlay .spinner {
  width: 50px;
  height: 50px;
  border-width: 5px;
  border-top-color: var(--md-sys-color-secondary);
}

/* Admin Styles */
.admin-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.admin-dream-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-dream-card {
  background-color: var(--md-sys-color-surface);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--md-elevation-1);
}

.admin-dream-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--md-sys-color-outline);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.8rem;
}

.admin-user-info {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-user-info span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-interpret-form {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
}

/* Mock Stripe Styling */
.mock-payment-body {
  background-color: #f8f9fa;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  direction: ltr; /* Stripe is always LTR */
  text-align: left;
}

.mock-stripe-card {
  background: white;
  width: 100%;
  max-width: 450px;
  border-radius: 12px;
  box-shadow: 0 50px 100px -20px rgba(50,50,93,.25),0 30px 60px -30px rgba(0,0,0,.3),inset 0 -2px 6px 0 rgba(10,37,64,.35);
  padding: 2.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mock-stripe-logo {
  color: #635bff;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mock-stripe-product {
  border-bottom: 1px solid #e6ebf1;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.mock-stripe-product .name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1f36;
}

.mock-stripe-product .price {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1f36;
  margin-top: 0.5rem;
}

.stripe-form-group {
  margin-bottom: 1.2rem;
}

.stripe-form-group label {
  display: block;
  font-size: 0.88rem;
  color: #4f5b66;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.stripe-input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #1a1f36;
  background: white;
  transition: border-color 0.15s ease;
}

.stripe-input:focus {
  border-color: #635bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99,91,255,0.15);
}

.stripe-btn {
  background: #635bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.stripe-btn:hover {
  background: #4b44d3;
}

.stripe-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #a3acb9;
  margin-top: 1.5rem;
}

.static-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 0.6rem;
  text-align: right;
}

body.ltr-mode .static-label {
  text-align: left;
}

/* Explicit Textarea & Input color overrides for theme safety */
body[data-theme="light"] .md-textarea,
body[data-theme="light"] .md-input {
  color: #1C1B1F !important;
}

body[data-theme="dark"] .md-textarea,
body[data-theme="dark"] .md-input,
body:not([data-theme="light"]) .md-textarea,
body:not([data-theme="light"]) .md-input {
  color: #E6E1E5 !important;
}

/* Animated Dream Cards */
.dream-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3.5rem;
  animation: fadeIn 0.8s ease-out;
}

.dream-card-item {
  background-color: var(--md-sys-color-surface);
  border-radius: 24px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--md-elevation-1);
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.4s cubic-bezier(0.2, 0, 0, 1), border-color 0.4s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body[data-theme="light"] .dream-card-item {
  border-color: rgba(0, 0, 0, 0.05);
}

/* Elegant glow underlay on hover */
.dream-card-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(127, 86, 218, 0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
  z-index: 0;
}

.dream-card-item:nth-child(1)::before {
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.12) 0%, transparent 65%);
}

.dream-card-item:nth-child(2)::before {
  background: radial-gradient(circle at 50% 0%, rgba(127, 86, 218, 0.15) 0%, transparent 65%);
}

.dream-card-item:nth-child(3)::before {
  background: radial-gradient(circle at 50% 0%, rgba(129, 199, 132, 0.12) 0%, transparent 65%);
}

.dream-card-item:hover::before {
  opacity: 1;
}

.dream-card-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 16px 36px rgba(14, 11, 22, 0.4), 0 0 20px rgba(127, 86, 218, 0.1);
  border-color: var(--md-sys-color-primary);
}

body[data-theme="light"] .dream-card-item:hover {
  box-shadow: 0 16px 36px rgba(98, 35, 224, 0.08);
}

.dream-card-item:nth-child(1):hover {
  border-color: var(--md-sys-color-secondary);
}

.dream-card-item:nth-child(3):hover {
  border-color: var(--md-sys-color-success);
}

.dream-card-img-wrapper {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  background-color: var(--md-sys-color-surface-variant);
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
  z-index: 1;
}

.dream-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.dream-card-item:hover .dream-card-img {
  transform: scale(1.08) rotate(1deg);
}

/* Subtle asynchronous floating animations on card image wrappers */
.dream-card-item:nth-child(1) .dream-card-img-wrapper {
  animation: floatCard1 7s ease-in-out infinite;
}

.dream-card-item:nth-child(2) .dream-card-img-wrapper {
  animation: floatCard2 6s ease-in-out infinite;
}

.dream-card-item:nth-child(3) .dream-card-img-wrapper {
  animation: floatCard3 8s ease-in-out infinite;
}

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

@keyframes floatCard2 {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes floatCard3 {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

.dream-card-item h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  margin-bottom: 0.6rem;
  transition: color var(--transition-fast);
  z-index: 1;
}

.dream-card-item:hover h3 {
  color: var(--md-sys-color-secondary);
}

.dream-card-item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--md-sys-color-on-surface-variant);
  z-index: 1;
}

/* Stars Background Effect */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  transition: opacity var(--transition-medium) ease;
}

body[data-theme="light"] .stars-container {
  opacity: 0.15;
}

.star {
  position: absolute;
  background-color: #FFFFFF;
  border-radius: 50%;
  opacity: 0.3;
  animation: twinkle 5s ease-in-out infinite;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

body[data-theme="light"] .star {
  background-color: var(--md-sys-color-outline);
  box-shadow: none;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.15;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.2);
  }
}

/* ==========================================================================
   MOBILE & RESPONSIVE DESIGN STYLES
   ========================================================================== */

/* Prevent horizontal overflow */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Tablet & Medium Screens (max-width: 992px) */
@media screen and (max-width: 992px) {
  .nav-container {
    padding: 0.75rem 1.2rem;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .logo-icon {
    font-size: 1.8rem;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .dream-cards-container {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
  }
}

/* Mobile Devices & Small Tablets (max-width: 768px) */
@media screen and (max-width: 768px) {
  header {
    position: sticky;
    top: 0;
    width: 100%;
  }

  .nav-container {
    padding: 0.6rem 0.8rem;
    width: 100%;
    max-width: 100%;
  }

  .logo {
    gap: 0.5rem;
  }

  .logo-icon {
    font-size: 1.5rem;
  }

  .logo-text {
    font-size: 1.15rem;
    white-space: nowrap;
  }

  .nav-links {
    gap: 0.35rem;
  }

  .nav-btn {
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
    gap: 0.3rem;
  }

  main {
    padding: 1.2rem 0.8rem;
    width: 100%;
    max-width: 100%;
  }

  /* Hero Section Mobile */
  .hero {
    padding: 2rem 1rem;
    border-radius: 20px;
    margin-bottom: 2rem;
  }

  .hero h1 {
    font-size: 1.75rem;
    margin-bottom: 0.8rem;
    line-height: 1.35;
  }

  .hero p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
  }

  .hero-features {
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
  }

  .hero-chip {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    box-sizing: border-box;
  }

  /* Dream Cards Mobile */
  .dream-cards-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
  }

  .dream-card-item {
    padding: 1.4rem 1.1rem;
    border-radius: 20px;
  }

  .dream-card-img-wrapper {
    height: 160px;
    border-radius: 14px;
  }

  .dream-card-item h3 {
    font-size: 1.2rem;
  }

  .dream-card-item p {
    font-size: 0.9rem;
  }

  /* Form & Tracking Cards Mobile */
  .form-card, .tracking-card {
    padding: 1.4rem 1.1rem;
    border-radius: 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .form-card h2 {
    font-size: 1.4rem;
    margin-bottom: 1.4rem;
  }

  .input-group {
    margin-bottom: 1.4rem;
  }

  .md-input, .md-textarea {
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
  }

  .md-btn {
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
  }

  /* Status & Results */
  .dream-item {
    padding: 1.1rem 1rem;
    border-radius: 16px;
  }

  .dream-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .interpretation-box {
    padding: 1.1rem;
    border-radius: 14px;
  }

  .interpretation-text {
    font-size: 0.98rem;
  }

  /* Admin Dashboard Mobile */
  #loginSection {
    margin: 2rem auto !important;
    padding: 1.5rem 1.1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .admin-dream-card {
    padding: 1.2rem 1rem;
    border-radius: 16px;
  }

  .admin-dream-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .admin-user-info {
    flex-direction: column;
    gap: 0.5rem;
  }

  .admin-user-info span {
    word-break: break-all;
  }

  .admin-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .submit-interpret-btn {
    width: 100% !important;
    min-width: unset !important;
  }

  /* FAQs & Footer */
  .faqs-section {
    margin: 2.5rem auto 1.5rem;
    padding: 0 0.5rem;
  }

  .faqs-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.4rem;
  }

  .faq-question {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
  }

  footer {
    padding: 2rem 1rem 1.5rem;
  }

  .footer-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Notification Banner Mobile */
  .alert-banner {
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    border-radius: 14px;
  }
}

/* Extra Small Mobile Screens (max-width: 480px) */
@media screen and (max-width: 480px) {
  .nav-container {
    padding: 0.5rem 0.5rem;
  }

  .logo {
    gap: 0.35rem;
  }

  .logo-icon {
    font-size: 1.3rem;
  }

  .logo-text {
    font-size: 0.98rem;
  }

  .nav-links {
    gap: 0.25rem;
  }

  /* Hide button text labels on narrow screens for maximum space & zero overflow */
  .nav-btn span {
    display: none;
  }

  .nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
  }

  .hero h1 {
    font-size: 1.45rem;
  }

  .hero p {
    font-size: 0.88rem;
  }

  .hero-chip {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  .form-card h2 {
    font-size: 1.25rem;
  }

  .price-val {
    font-size: 2rem;
  }
}
