/* ==========================================================================
   X Fund - Apple-Style Minimalist Luxury Dark Styling
   Color Palette Rule:
   - 60% Dominant Background: #0B0B0C / #070708
   - 30% Content & Typography: #FFFFFF / #A1A1AA
   - 10% Accent/Identity: #FF8500 (Electric Orange)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
  --bg-main: #0B0B0C;
  --bg-surface: #121316;
  --bg-card: rgba(18, 19, 22, 0.7);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 133, 0, 0.22);
  --text-primary: #FFFFFF;
  --text-muted: #A1A1AA;
  --text-dim: #71717A;
  --accent-orange: #FF8500;
  --accent-orange-hover: #FFA033;
  --accent-orange-glow: rgba(255, 133, 0, 0.12);
  --accent-green: #10B981;
  --accent-green-glow: rgba(16, 185, 129, 0.20);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-main);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Font adaptation */
[dir="rtl"] {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
}

[dir="ltr"] {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.01em;
}

/* Ambient glow & mesh backdrop (Softened Apple-style subtle luminescence) */
.ambient-glow-top {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 480px;
  background: radial-gradient(circle at center, rgba(255, 133, 0, 0.035) 0%, rgba(255, 133, 0, 0.008) 50%, transparent 75%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-secondary {
  position: absolute;
  top: 45%;
  right: 5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(255, 133, 0, 0.018) 0%, transparent 65%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

/* Apple-style Glassmorphism */
.glass-header {
  background: rgba(11, 11, 12, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.glass-card {
  background: linear-gradient(180deg, rgba(24, 25, 29, 0.75) 0%, rgba(14, 15, 18, 0.85) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(255, 133, 0, 0.25);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 16px 0 rgba(255, 133, 0, 0.06);
  transform: translateY(-4px);
}

.glass-disclaimer {
  background: rgba(18, 19, 23, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
}

/* Pulsing Green Status Dot */
.pulse-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pulse-indicator::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--accent-green);
  opacity: 0.75;
  animation: ping-pulse 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Glowing Apple Accent Buttons (Subtle Soft Glow) */
.btn-electric {
  background-color: var(--accent-orange);
  color: #000000;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px -1px rgba(255, 133, 0, 0.22);
}

.btn-electric:hover {
  background-color: var(--accent-orange-hover);
  box-shadow: 0 4px 16px 0 rgba(255, 133, 0, 0.32);
  transform: translateY(-1px);
}

.btn-electric:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Subtle Gradient Text with generous padding to prevent glyph clipping */
.text-gradient-white {
  background: linear-gradient(180deg, #FFFFFF 20%, #D4D4D8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding: 0.15em 0.3em;
  margin: -0.15em -0.3em;
  line-height: 1.35;
}

.text-gradient-orange {
  background: linear-gradient(135deg, #FF9E2C 0%, #FF8500 60%, #E07500 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding: 0.15em 0.3em;
  margin: -0.15em -0.3em;
  line-height: 1.35;
}

/* Fluid responsive hero title - guarantees single line without horizontal or vertical clipping */
.hero-main-title {
  font-size: clamp(1.5rem, 4.1vw, 3.8rem);
  line-height: 1.32;
  width: 100%;
  max-width: 1150px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0B0B0C;
}
::-webkit-scrollbar-thumb {
  background: #27272A;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3F3F46;
}

/* Modal Drawer Transitions */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content-panel {
  transform: scale(0.96) translateY(12px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #27272A;
  height: 6px;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-orange);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 133, 0, 0.28);
  border: 2px solid #FFFFFF;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
