/* 
  XU Engine - Premium Vanilla CSS 
  Design System and Styles
*/

:root {
  /* Color Palette */
  --bg-color: #0b0f19;
  --bg-color-secondary: #131b2f;
  --bg-glass: rgba(19, 27, 47, 0.7);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  
  --primary-color: #4361ee;
  --primary-hover: #3f37c9;
  --primary-gradient: linear-gradient(135deg, #4361ee, #f72585);
  
  --secondary-color: #4cc9f0;
  --accent-color: #f72585;
  --success-color: #10b981;
  --warning-color: #f59e0b;

  --border-color: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-family: 'Poppins', sans-serif;
  
  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 6rem;

  /* Misc */
  --border-radius: 12px;
  --border-radius-lg: 24px;
  --transition-speed: 0.3s;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Typography Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--secondary-color); }
.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lead { font-size: 1.125rem; color: var(--text-secondary); }
.fw-bold { font-weight: 700; }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.6);
}

.btn-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-dark:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Navbar auth button */
#auth-button,
.nav-auth-btn {
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#auth-button:hover,
.nav-auth-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  transform: none !important;
  color: #fff !important;
}

/* Pill Badges */
.badge-pill {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(67, 97, 238, 0.15);
  color: var(--secondary-color);
  margin-bottom: var(--spacing-md);
  border: 1px solid rgba(67, 97, 238, 0.3);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-speed);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 1rem;
}

.nav-links a:hover {
  color: var(--secondary-color);
}

.nav-actions {
  display: flex;
  align-items: center;
}

/* Hero Section */
.hero-section {
  padding-top: 150px;
  padding-bottom: 100px;
  background: radial-gradient(circle at top right, rgba(67, 97, 238, 0.15) 0%, transparent 50%),
              radial-gradient(circle at bottom left, rgba(247, 37, 133, 0.1) 0%, transparent 50%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Curve Dividers */
.curve-divider {
  position: relative;
  height: 50px;
  overflow: hidden;
  margin-top: -1px;
}

.curve-divider svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  fill: var(--bg-color-secondary);
}

.curve-divider.reverse svg {
  transform: rotateY(180deg) rotateX(180deg);
  fill: var(--bg-color);
}

/* Layout Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

/* Section Common */
.section {
  padding: var(--spacing-xxl) 0;
}

.section-alt {
  background-color: var(--bg-color-secondary);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

/* Services / Features Section */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(67, 97, 238, 0.1);
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 1px solid rgba(67, 97, 238, 0.2);
}

/* Feature Image Container */
.feature-image-container {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border: 1px solid var(--border-color);
}

.feature-image-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(67,97,238,0.2), transparent);
  pointer-events: none;
}

/* Cards */
.card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  transition: all var(--transition-speed);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(67, 97, 238, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(67, 97, 238, 0.1);
}

.card-icon {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Pricing / Plan Card */
.plan-card {
  background: linear-gradient(145deg, #1a233a, #0f172a);
  border: 1px solid rgba(67, 97, 238, 0.3);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}

.plan-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 5px;
  background: var(--primary-gradient);
}

.plan-grid {
  align-items: stretch;
}

.plan-grid .plan-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plan-grid .feature-list,
.plan-grid .mini-grid {
  flex: 1;
}

.plan-card-action {
  margin-top: auto;
}

/* Small grid inside plan card */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.mini-grid-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.03);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.mini-grid-item i {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 5rem 0;
  background: var(--bg-color-secondary);
}

.cta-highlight {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  color: var(--success-color);
  margin: 2rem 0;
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  height: 40px;
  margin-bottom: 1.5rem;
}

.footer-col h6 {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
}

.social-icons a:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; /* simple mobile menu toggle normally required here */ }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .hero-buttons { flex-direction: column; }
}


/* --- BOOTSTRAP UTILITY COMPATIBILITY --- */
.row { display: flex; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
.col-12, .col-md-6, .col-md-4, .col-md-5, .col-md-7, .col-md-10, .col-lg-6, .col-lg-2, .col-lg-10 { position: relative; width: 100%; padding-right: 15px; padding-left: 15px; }
@media (min-width: 768px) {
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
}
@media (min-width: 992px) {
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .order-lg-2 { order: 2; }
}
.g-4, .gx-4 { --bs-gutter-x: 1.5rem; gap: 1.5rem; }
.g-4, .gy-4 { --bs-gutter-y: 1.5rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.ms-md-auto { margin-left: auto !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.pt-0 { padding-top: 0 !important; }
.pt-5 { padding-top: 3rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.flex-column { flex-direction: column !important; }
.text-danger { color: #dc3545 !important; }
.text-light { color: #f8f9fa !important; }
.text-muted { color: var(--text-secondary) !important; }
.fw-light { font-weight: 300 !important; }
.fst-italic { font-style: italic !important; }
.small { font-size: 0.875em; }
.fs-3 { font-size: 1.75rem !important; }
.display-md-4 { font-size: 2.5rem; font-weight: 700; }
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important; }
.shadow { box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important; }
.rounded-3 { border-radius: .3rem !important; }
.rounded-4 { border-radius: .5rem !important; }
.border { border: 1px solid var(--border-color) !important; }

/* Forms */
.form-control {
  display: block; width: 100%; padding: .375rem .75rem;
  font-size: 1rem; font-weight: 400; line-height: 1.5;
  color: #fff; background-color: var(--bg-color-secondary);
  background-clip: padding-box; border: 1px solid var(--border-color);
  border-radius: .25rem; transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.form-control:focus {
  border-color: var(--primary-color);
  outline: 0; box-shadow: 0 0 0 .25rem rgba(67, 97, 238, .25);
}
.form-label { margin-bottom: .5rem; }
.invalid-feedback { display: none; width: 100%; margin-top: .25rem; font-size: .875em; color: #dc3545; }

/* Tables */
.table { width: 100%; margin-bottom: 1rem; color: #fff; border-collapse: collapse; }
.table th, .table td { padding: .5rem; border-bottom: 1px solid var(--border-color); text-align: left; }
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255,255,255,.02); }

/* Badges */
.badge { display: inline-block; padding: .35em .65em; font-size: .75em; font-weight: 700; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25rem; }
.bg-success { background-color: #10b981 !important; }
.bg-warning { background-color: #f59e0b !important; color: #000; }

/* Progress */
.progress { display: flex; height: 1rem; overflow: hidden; font-size: .75rem; background-color: var(--bg-color-secondary); border-radius: .25rem; }
.progress-bar { display: flex; flex-direction: column; justify-content: center; overflow: hidden; color: #fff; text-align: center; white-space: nowrap; background-color: var(--primary-color); transition: width .6s ease; }

/* Accordion */
.accordion { border: 1px solid var(--border-color); border-radius: .25rem; }
.accordion-item { background-color: transparent; border: 1px solid rgba(0,0,0,.125); }

/* Lists and Links */
.list-unstyled { list-style: none; padding-left: 0; }
.nav-link { display: block; padding: .5rem 1rem; text-decoration: none; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out; }
.nav-link.active { color: var(--primary-color); }
