/*
 * 3D Model Tools - Modern Design System
 * Inspired by contemporary glassmorphism and gradient aesthetics
 * Version: 1.0
 */

/* ========================================
   COLOR SYSTEM
   ======================================== */

:root {
  /* Primary Gradient Colors */
  --color-primary: #2563eb;        /* Deep blue */
  --color-primary-dark: #1e40af;   /* Darker blue */
  --color-accent: #7c3aed;         /* Purple */
  --color-accent-light: #a78bfa;   /* Light purple */
  --color-cyan: #06b6d4;           /* Cyan accent */
  --color-cyan-light: #22d3ee;     /* Light cyan */

  /* Dark Theme Backgrounds */
  --bg-dark: #0f172a;              /* Deep navy */
  --bg-dark-lighter: #1e293b;      /* Lighter navy */
  --bg-card-glass: rgba(255, 255, 255, 0.1);
  --bg-card-glass-hover: rgba(255, 255, 255, 0.15);

  /* Neutral Palette */
  --text-primary: #f8fafc;         /* Off-white */
  --text-secondary: #cbd5e1;       /* Light gray */
  --text-muted: #94a3b8;           /* Muted gray */

  /* Borders & Shadows */
  --border-glass: rgba(255, 255, 255, 0.2);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.3);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 20px 50px rgba(0, 0, 0, 0.4);
}

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

.hero-gradient {
  background: linear-gradient(135deg,
    var(--color-primary) 0%,
    var(--color-accent) 50%,
    var(--color-cyan) 100%
  );
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.3) 0%, transparent 50%);
  animation: gradientShift 15s ease infinite;
}

.section-dark {
  background: var(--bg-dark);
  position: relative;
}

.section-dark-lighter {
  background: var(--bg-dark-lighter);
}

/* Gradient overlay for depth */
.gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.8) 100%);
  pointer-events: none;
}

/* ========================================
   GLASSMORPHISM CARDS
   ======================================== */

.card-glass {
  background: var(--bg-card-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
}

.card-glass:hover {
  background: var(--bg-card-glass-hover);
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(255, 255, 255, 0.3);
}

.card-glass-featured {
  background: linear-gradient(135deg,
    rgba(37, 99, 235, 0.15) 0%,
    rgba(124, 58, 237, 0.15) 100%
  );
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.card-glass-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent), var(--color-cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ========================================
   GRADIENT TEXT
   ======================================== */

.gradient-text {
  background: linear-gradient(90deg,
    var(--color-primary) 0%,
    var(--color-accent) 50%,
    var(--color-cyan) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 8s ease infinite;
}

.gradient-text-static {
  background: linear-gradient(90deg,
    var(--color-primary) 0%,
    var(--color-accent) 50%,
    var(--color-cyan) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   MODERN BUTTONS
   ======================================== */

.btn-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.6);
  color: white;
}

/* Shimmer animation removed - was causing visible artifacts and vibration */

.btn-glass {
  background: var(--bg-card-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.btn-glass:hover {
  background: var(--bg-card-glass-hover);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--text-primary);
}

.btn-outline-gradient {
  background: transparent;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-dark), var(--bg-dark)),
                    linear-gradient(135deg, var(--color-primary), var(--color-accent));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.btn-outline-gradient:hover {
  background-image: linear-gradient(135deg, var(--color-primary), var(--color-accent)),
                    linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: white;
  transform: translateY(-2px);
}

/* ========================================
   ICON BACKGROUNDS
   ======================================== */

.icon-gradient {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
  transition: all 0.3s ease;
}

.icon-gradient:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.icon-gradient i {
  font-size: 2rem;
  color: white;
}

/* Icon gradient variants */
.icon-gradient-purple {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
  transition: all 0.3s ease;
}

.icon-gradient-purple:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.4);
}

.icon-gradient-purple i {
  font-size: 2rem;
  color: white;
}

.icon-gradient-cyan {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-cyan-light) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
  transition: all 0.3s ease;
}

.icon-gradient-cyan:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.4);
}

.icon-gradient-cyan i {
  font-size: 2rem;
  color: white;
}

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

@keyframes gradientShift {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes gradientText {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

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

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

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

.float-animation:nth-child(2) {
  animation-delay: 1s;
}

.float-animation:nth-child(3) {
  animation-delay: 2s;
}

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

.text-gradient {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-text {
  text-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

.section-spacer {
  padding: 5rem 0;
}

.section-spacer-lg {
  padding: 8rem 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .hero-gradient {
    min-height: auto;
    padding: 4rem 0;
  }

  .section-spacer {
    padding: 3rem 0;
  }

  .section-spacer-lg {
    padding: 5rem 0;
  }

  .icon-gradient {
    width: 60px;
    height: 60px;
  }

  .icon-gradient i {
    font-size: 1.5rem;
  }

  .btn-gradient,
  .btn-glass,
  .btn-outline-gradient {
    padding: 0.75rem 1.5rem;
    min-height: 44px;
    min-width: 44px;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .float-animation,
  .gradient-text,
  .hero-gradient::before {
    animation: none;
  }

  .card-glass,
  .btn-gradient,
  .btn-glass,
  .icon-gradient {
    transition: none;
  }
}

/* Ensure sufficient color contrast */
.card-glass .text-muted {
  color: var(--text-secondary);
}

.card-glass h1,
.card-glass h2,
.card-glass h3,
.card-glass h4,
.card-glass h5,
.card-glass h6 {
  color: var(--text-primary);
}

.card-glass p {
  color: var(--text-secondary);
}

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

.navbar-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-gradient .nav-link {
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}

.navbar-gradient .nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.navbar-gradient .nav-link:active {
  color: white;
}

.navbar-gradient .navbar-brand {
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.navbar-gradient .navbar-brand:hover {
  color: white;
  transform: scale(1.05);
}

.navbar-gradient .dropdown-menu {
  background: var(--bg-dark-lighter);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar-gradient .dropdown-item {
  color: var(--text-secondary);
  transition: all 0.2s ease;
  border-radius: 0.375rem;
  margin: 0.25rem 0.5rem;
  padding: 0.5rem 0.75rem;
}

.navbar-gradient .dropdown-item:hover {
  background: var(--bg-card-glass);
  color: var(--text-primary);
  transform: translateX(4px);
}

.navbar-gradient .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.1);
}

.navbar-gradient .dropdown-header {
  color: var(--color-cyan);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.navbar-gradient .badge {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-cyan-light));
  font-size: 0.625rem;
  padding: 0.25rem 0.5rem;
}

/* ========================================
   BREADCRUMB NAVIGATION (Dark Background Fix)
   ======================================== */

/* Breadcrumbs on dark backgrounds need light text */
.section-dark .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.section-dark .breadcrumb-item {
  color: var(--text-secondary);
}

.section-dark .breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}

.section-dark .breadcrumb-item a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.section-dark .breadcrumb-item a:hover {
  color: var(--color-cyan-light);
  text-decoration: underline;
}

.section-dark .breadcrumb-item.active {
  color: var(--text-secondary);
}

/* ========================================
   FORM ELEMENTS (Dark Background Fix)
   ======================================== */

/* Form labels need light text on dark backgrounds */
.section-dark .form-label,
.section-dark .form-check-label {
  color: var(--text-primary);
}

/* Form help text */
.section-dark .form-text {
  color: var(--text-secondary);
}

/* Card headers in glass cards */
.section-dark .card-glass .card-header h5,
.section-dark .card-glass .card-header h6 {
  color: var(--text-primary);
}

/* Definition lists (dt/dd) */
.section-dark dt {
  color: var(--text-primary);
}

.section-dark dd {
  color: var(--text-secondary);
}

/* Ensure form controls have proper styling */
.section-dark .form-control {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.section-dark .form-control:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--color-cyan);
  color: var(--text-primary);
}

.section-dark .form-control::placeholder {
  color: var(--text-muted);
}

/* ========================================
   LIST ELEMENTS (Dark Background Fix)
   ======================================== */

/* Lists need light text on dark backgrounds */
.section-dark ul li,
.section-dark ol li {
  color: var(--text-primary);
}

/* Nested lists */
.section-dark ul ul li,
.section-dark ol ol li,
.section-dark ul ol li,
.section-dark ol ul li {
  color: var(--text-secondary);
}

/* List items in cards */
.section-dark .card-glass ul li,
.section-dark .card-glass ol li {
  color: var(--text-primary);
}
