:root {
  /* Galactic color palette with organic softness */
  --color-primary: #1a1a2e;
  --color-secondary: #16213e;
  --color-background: #0f0f1e;
  --color-footer: #0a0a15;
  --color-button: #6c63ff;
  --color-accent: #9d7cff;
  --color-text-primary: #ffffff;
  --color-text-secondary: #b8b8d1;
  --color-text-muted: #8a8a9e;
  
  /* Organic spacing system */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 6rem;
  
  /* Soft border radius system */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Gentle shadow system */
  --shadow-soft: 0 4px 20px -8px rgba(108, 99, 255, 0.3);
  --shadow-medium: 0 8px 30px -12px rgba(108, 99, 255, 0.4);
  --shadow-strong: 0 15px 40px -15px rgba(108, 99, 255, 0.5);
  --shadow-gentle: 0 3px 15px -5px rgba(26, 26, 46, 0.5);
  
  /* Typography */
  --font-primary: 'Inter', 'Nunito', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Poppins', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-button) 0%, var(--color-accent) 100%);
  --gradient-section: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-dark: linear-gradient(135deg, var(--color-background) 0%, var(--color-secondary) 100%);
}

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-background);
  color: var(--color-text-primary);
  line-height: 1.7;
  min-height: 100vh;
  font-size: var(--text-base);
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

/* Galactic organic typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradient-shift 6s ease infinite;
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--color-button);
  text-shadow: 0 0 10px rgba(108, 99, 255, 0.5);
}

/* Galactic organic sections */
section {
  padding: var(--spacing-2xl) 0;
  position: relative;
}

.section-dark {
  background: var(--gradient-dark);
}

.section-primary {
  background: var(--gradient-section);
}

.section-accent {
  background: linear-gradient(135deg, #2d1b69 0%, var(--color-secondary) 100%);
}

/* Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-md);
}

/* Organic cards */
.card {
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(108, 99, 255, 0.4);
}

.card:hover::before {
  opacity: 1;
}

.card-soft {
  background: rgba(22, 33, 62, 0.8);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(157, 124, 255, 0.15);
  box-shadow: var(--shadow-gentle);
}

.card-soft:hover {
  box-shadow: var(--shadow-medium);
  border-color: rgba(157, 124, 255, 0.3);
}

/* Galactic organic buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.025em;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Organic form elements */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--color-text-primary);
  font-size: var(--text-sm);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: var(--radius-md);
  background: rgba(26, 26, 46, 0.4);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-button);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
  background: rgba(26, 26, 46, 0.6);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Galactic navigation */
.navbar {
  background: rgba(10, 10, 21, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(108, 99, 255, 0.2);
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-nav {
  display: flex;
  list-style: none;
  align-items: center;
  gap: var(--spacing-md);
}

.nav-link {
  color: var(--color-text-secondary);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--color-text-primary);
  background: rgba(108, 99, 255, 0.1);
}

/* Organic grid system */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--spacing-sm));
}

.col {
  flex: 1;
  padding: 0 var(--spacing-sm);
}

.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333333%; }
.col-3 { width: 25%; }

/* Galactic utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Galaxy effects */
.galaxy-bg {
  position: relative;
  overflow: hidden;
}

.galaxy-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(108, 99, 255, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(157, 124, 255, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(108, 99, 255, 0.4), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(157, 124, 255, 0.3), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: sparkle 20s linear infinite;
  pointer-events: none;
}

@keyframes sparkle {
  from { transform: translateX(0); }
  to { transform: translateX(-200px); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Organic footer */
footer {
  background: var(--color-footer);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  border-top: 1px solid rgba(108, 99, 255, 0.2);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

/* Responsive design */
@media (max-width: 768px) {
  :root {
    --spacing-2xl: 3rem;
    --spacing-xl: 2.5rem;
  }
  
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  
  .col-6,
  .col-4,
  .col-3 {
    width: 100%;
    margin-bottom: var(--spacing-md);
  }
  
  .navbar-nav {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-2xl: 2rem;
    --spacing-xl: 1.5rem;
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* Selection */
::selection {
  background: rgba(108, 99, 255, 0.3);
  color: var(--color-text-primary);
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-button);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Loading states */
.loading {
  position: relative;
  color: transparent;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-text-muted);
  border-top: 2px solid var(--color-button);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}


/* Cookie Banner Additional Styles for Tailwind */
.cookie-banner-hover-effect:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner-hover-effect:hover {
        transform: none;
    }
}