/**
 * VelocityJS Framework CSS
 * Core styles for the VelocityJS framework
 */

/* VelocityJS Enhanced CSS Framework v2.0.0 */

:root {
  --velocity-primary: #007bff;
  --velocity-secondary: #6c757d;
  --velocity-success: #28a745;
  --velocity-danger: #dc3545;
  --velocity-warning: #ffc107;
  --velocity-info: #17a2b8;
  --velocity-light: #f8f9fa;
  --velocity-dark: #343a40;
  
  /* Theme Variables */
  --velocity-bg-primary: #ffffff;
  --velocity-bg-secondary: #f8f9fa;
  --velocity-text-primary: #212529;
  --velocity-text-secondary: #6c757d;
  --velocity-border-color: #dee2e6;
  
  /* Typography */
  --velocity-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --velocity-font-size-base: 1rem;
  --velocity-line-height-base: 1.5;
  
  /* Spacing */
  --velocity-spacer: 1rem;
  --velocity-border-radius: 0.375rem;
  --velocity-border-width: 1px;
  
  /* Shadows */
  --velocity-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --velocity-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --velocity-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Transitions */
  --velocity-transition-base: all 0.2s ease-in-out;
  --velocity-transition-fast: all 0.15s ease-in-out;
  --velocity-transition-slow: all 0.3s ease-in-out;
  
  /* Smart Layout System Variables */
  --velocity-nav-height: 60px;
  --velocity-nav-height-mobile: 56px;
  --velocity-nav-width: 280px;
  --velocity-nav-width-collapsed: 64px;
  --velocity-nav-z-index: 1000;
  --velocity-content-padding: 24px;
  --velocity-content-padding-mobile: 16px;
  --velocity-layout-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --velocity-layout-gap: 16px;
  
  /* Responsive Breakpoints */
  --velocity-breakpoint-xs: 320px;
  --velocity-breakpoint-sm: 640px;
  --velocity-breakpoint-md: 768px;
  --velocity-breakpoint-lg: 1024px;
  --velocity-breakpoint-xl: 1280px;
  --velocity-breakpoint-2xl: 1536px;
  
  /* Layout Detection States */
  --velocity-has-top-nav: 0;
  --velocity-has-side-nav: 0;
  --velocity-has-bottom-nav: 0;
  --velocity-side-nav-collapsed: 0;
}

/* Dark Theme */
[data-theme="dark"] {
  --velocity-bg-primary: #1a1a1a;
  --velocity-bg-secondary: #2d2d2d;
  --velocity-text-primary: #ffffff;
  --velocity-text-secondary: #b3b3b3;
  --velocity-border-color: #404040;
  --velocity-primary: #0ea5e9;
}

/* Auto Theme (System Preference) */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --velocity-bg-primary: #1a1a1a;
    --velocity-bg-secondary: #2d2d2d;
    --velocity-text-primary: #ffffff;
    --velocity-text-secondary: #b3b3b3;
    --velocity-border-color: #404040;
    --velocity-primary: #0ea5e9;
  }
}

.velocity-border-color{
    border-color: var(--velocity-border-color);
}

/* Enhanced Base Styles */
* {
  box-sizing: border-box;
}

html {
  font-family: var(--velocity-font-family);
  font-size: var(--velocity-font-size-base);
  line-height: var(--velocity-line-height-base);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--velocity-bg-primary);
  color: var(--velocity-text-primary);
  transition: var(--velocity-transition-base);
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  line-height: 1.2;
  color: var(--velocity-text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 1rem 0;
  color: var(--velocity-text-primary);
}

a {
  color: var(--velocity-primary);
  text-decoration: none;
  transition: var(--velocity-transition-fast);
}

a:hover {
  color: var(--velocity-primary);
  text-decoration: underline;
}

/* Enhanced Button System */
.velocity-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: var(--velocity-font-size-base);
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: var(--velocity-border-width) solid transparent;
  border-radius: var(--velocity-border-radius);
  transition: var(--velocity-transition-base);
  position: relative;
  overflow: hidden;
}

.velocity-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.velocity-btn-primary {
  color: #fff;
  background-color: var(--velocity-primary);
  border-color: var(--velocity-primary);
}

.velocity-btn-primary:hover:not(:disabled) {
  background-color: color-mix(in srgb, var(--velocity-primary) 90%, black);
  border-color: color-mix(in srgb, var(--velocity-primary) 90%, black);
}

.velocity-btn-secondary {
  color: var(--velocity-text-primary);
  background-color: var(--velocity-secondary);
  border-color: var(--velocity-secondary);
}

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

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

.velocity-btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.velocity-btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Loading Button State */
.velocity-btn-loading {
  color: transparent;
}

.velocity-btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: velocity-spin 1s linear infinite;
}

/* Enhanced Form System */
.velocity-form-group {
  margin-bottom: 1.5rem;
}

.velocity-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--velocity-text-primary);
}

.velocity-form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--velocity-font-size-base);
  line-height: 1.5;
  color: var(--velocity-text-primary);
  background-color: var(--velocity-bg-primary);
  border: var(--velocity-border-width) solid var(--velocity-border-color);
  border-radius: var(--velocity-border-radius);
  transition: var(--velocity-transition-base);
}

.velocity-form-control:focus {
  outline: 0;
  border-color: var(--velocity-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.velocity-form-control::placeholder {
  color: var(--velocity-text-secondary);
  opacity: 1;
}

.velocity-form-control:disabled {
  background-color: var(--velocity-bg-secondary);
  opacity: 1;
}

/* Form Validation States */
.velocity-form-control.is-valid {
  border-color: var(--velocity-success);
}

.velocity-form-control.is-invalid {
  border-color: var(--velocity-danger);
}

.velocity-valid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--velocity-success);
}

.velocity-invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--velocity-danger);
}

/* Enhanced Card System */
.velocity-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--velocity-bg-primary);
  border: var(--velocity-border-width) solid var(--velocity-border-color);
  border-radius: var(--velocity-border-radius);
  box-shadow: var(--velocity-shadow-sm);
  transition: var(--velocity-transition-base);
}

.velocity-card:hover {
  box-shadow: var(--velocity-shadow);
  transform: translateY(-2px);
}

.velocity-card-header {
  padding: 1.25rem 1.25rem 0;
  margin-bottom: 0;
  border-bottom: var(--velocity-border-width) solid var(--velocity-border-color);
}

.velocity-card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}

.velocity-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: var(--velocity-border-width) solid var(--velocity-border-color);
}

/* Enhanced Grid System */
.velocity-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.velocity-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.velocity-col {
  flex: 1;
  padding: 0 0.75rem;
}

.velocity-col-auto {
  flex: 0 0 auto;
  width: auto;
}

/* Column sizes */
.velocity-col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.velocity-col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.velocity-col-3 { flex: 0 0 25%; max-width: 25%; }
.velocity-col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.velocity-col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.velocity-col-6 { flex: 0 0 50%; max-width: 50%; }
.velocity-col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.velocity-col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.velocity-col-9 { flex: 0 0 75%; max-width: 75%; }
.velocity-col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.velocity-col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.velocity-col-12 { flex: 0 0 100%; max-width: 100%; }

/* Enhanced Loading System */
.velocity-loading {
  opacity: 0.7;
  pointer-events: none;
}

#velocity-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

[data-theme="dark"] #velocity-loader {
  background-color: rgba(26, 26, 26, 0.9);
}

.velocity-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--velocity-border-color);
  border-top: 4px solid var(--velocity-primary);
  border-radius: 50%;
  animation: velocity-spin 1s linear infinite;
}

.velocity-progress {
  display: flex;
  height: 1rem;
  overflow: hidden;
  background-color: var(--velocity-bg-secondary);
  border-radius: var(--velocity-border-radius);
}

.velocity-progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  background-color: var(--velocity-primary);
  transition: width 0.6s ease;
}

/* Enhanced Error Boundaries */
.error-boundary {
  padding: 2rem;
  margin: 1rem 0;
  background-color: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--velocity-border-radius);
  color: #742a2a;
}

[data-theme="dark"] .error-boundary {
  background-color: #2d1b1b;
  border-color: #4a2c2c;
  color: #feb2b2;
}

.error-boundary h1 {
  color: #c53030;
  margin-bottom: 1rem;
}

.error-boundary pre {
  background-color: #f7fafc;
  padding: 1rem;
  border-radius: var(--velocity-border-radius);
  overflow-x: auto;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .error-boundary pre {
  background-color: #1a202c;
  border-color: #2d3748;
  color: #e2e8f0;
}

/* Enhanced Alerts */
.velocity-alert {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: var(--velocity-border-width) solid transparent;
  border-radius: var(--velocity-border-radius);
}

.velocity-alert-primary {
  color: #084298;
  background-color: #cff4fc;
  border-color: #b8daff;
}

.velocity-alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.velocity-alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.velocity-alert-warning {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffecb5;
}

/* Enhanced Modal System */
.velocity-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.velocity-modal.show {
  display: block;
}

.velocity-modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem;
  pointer-events: none;
}

.velocity-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: var(--velocity-bg-primary);
  border: var(--velocity-border-width) solid var(--velocity-border-color);
  border-radius: var(--velocity-border-radius);
  box-shadow: var(--velocity-shadow-lg);
  outline: 0;
}

.velocity-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Enhanced Navigation */
.velocity-nav {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.velocity-nav-item {
  display: list-item;
}

.velocity-nav-link {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--velocity-primary);
  text-decoration: none;
  transition: var(--velocity-transition-base);
}

.velocity-nav-link:hover {
  color: var(--velocity-primary);
  text-decoration: none;
}

.velocity-nav-link.active {
  color: var(--velocity-text-primary);
  background-color: var(--velocity-bg-secondary);
  border-radius: var(--velocity-border-radius);
}

/* Enhanced Utilities */
.velocity-d-none { display: none !important; }
.velocity-d-block { display: block !important; }
.velocity-d-flex { display: flex !important; }
.velocity-d-grid { display: grid !important; }

.velocity-text-left { text-align: left !important; }
.velocity-text-center { text-align: center !important; }
.velocity-text-right { text-align: right !important; }

.velocity-text-primary { color: var(--velocity-text-primary) !important; }
.velocity-text-secondary { color: var(--velocity-text-secondary) !important; }
.velocity-text-success { color: var(--velocity-success) !important; }
.velocity-text-danger { color: var(--velocity-danger) !important; }
.velocity-text-warning { color: var(--velocity-warning) !important; }
.velocity-text-info { color: var(--velocity-info) !important; }

.velocity-bg-primary { background-color: var(--velocity-bg-primary) !important; }
.velocity-bg-secondary { background-color: var(--velocity-bg-secondary) !important; }

/* Spacing utilities */
.velocity-m-0 { margin: 0 !important; }
.velocity-m-1 { margin: 0.25rem !important; }
.velocity-m-2 { margin: 0.5rem !important; }
.velocity-m-3 { margin: 1rem !important; }
.velocity-m-4 { margin: 1.5rem !important; }
.velocity-m-5 { margin: 3rem !important; }

.velocity-p-0 { padding: 0 !important; }
.velocity-p-1 { padding: 0.25rem !important; }
.velocity-p-2 { padding: 0.5rem !important; }
.velocity-p-3 { padding: 1rem !important; }
.velocity-p-4 { padding: 1.5rem !important; }
.velocity-p-5 { padding: 3rem !important; }

/* Enhanced Animations */
@keyframes velocity-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes velocity-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes velocity-fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes velocity-slideIn {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes velocity-slideOut {
  from { transform: translateY(0); }
  to { transform: translateY(-100%); }
}

.velocity-fade-in {
  animation: velocity-fadeIn 0.3s ease-in-out;
}

.velocity-fade-out {
  animation: velocity-fadeOut 0.3s ease-in-out;
}

.velocity-slide-in {
  animation: velocity-slideIn 0.3s ease-in-out;
}

.velocity-slide-out {
  animation: velocity-slideOut 0.3s ease-in-out;
}

/* Enhanced Page Transitions */
.velocity-page-transition {
  opacity: 1;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.velocity-page-transition.out {
  opacity: 0;
  transform: translateX(-20px);
}

.velocity-page-transition.in {
  opacity: 1;
  transform: translateX(0);
}

/* Enhanced Accessibility */
.velocity-skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--velocity-dark);
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
  border-radius: var(--velocity-border-radius);
  transition: var(--velocity-transition-fast);
}

.velocity-skip-link:focus {
  top: 6px;
}

.velocity-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Enhanced Focus Management */
*:focus {
  outline: 2px solid var(--velocity-primary);
  outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--velocity-primary);
  outline-offset: 2px;
}

/* Enhanced Dark Mode Support */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .velocity-alert-primary {
    color: #9ec5fe;
    background-color: #031633;
    border-color: #084298;
  }
  
  [data-theme="auto"] .velocity-alert-success {
    color: #75b798;
    background-color: #051b11;
    border-color: #0f5132;
  }
  
  [data-theme="auto"] .velocity-alert-danger {
    color: #ea868f;
    background-color: #2c0b0e;
    border-color: #842029;
  }
  
  [data-theme="auto"] .velocity-alert-warning {
    color: #ffda6a;
    background-color: #332701;
    border-color: #664d03;
  }
}

/* Enhanced Responsive Design */
@media (max-width: 576px) {
  .velocity-container {
    padding: 0 0.5rem;
  }
  
  .velocity-modal-dialog {
    margin: 1rem;
  }
  
  .velocity-btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .velocity-card-body {
    padding: 1rem;
  }
  
  /* Stack columns on mobile */
  .velocity-col-sm-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .velocity-modal-dialog {
    max-width: 500px;
    margin: 1.75rem auto;
  }
}

@media (min-width: 992px) {
  .velocity-modal-lg {
    max-width: 800px;
  }
}

@media (min-width: 1200px) {
  .velocity-modal-xl {
    max-width: 1140px;
  }
}

/* Enhanced Print Styles */
@media print {
  .velocity-d-print-none {
    display: none !important;
  }
  
  .velocity-d-print-block {
    display: block !important;
  }
  
  .velocity-btn,
  .velocity-nav,
  .velocity-modal {
    display: none !important;
  }
  
  .velocity-card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
}

/* Enhanced Performance Optimizations */
.velocity-will-change {
  will-change: transform, opacity;
}

.velocity-gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Enhanced Component System Support */
.velocity-component {
  display: block;
  position: relative;
}

.velocity-component.loading {
  opacity: 0.5;
  pointer-events: none;
}

.velocity-component.error {
  border: 1px solid var(--velocity-danger);
  background-color: #fff5f5;
  padding: 1rem;
  border-radius: var(--velocity-border-radius);
}

/* Enhanced Developer Tools */
#velocity-dev-tools {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--velocity-dark);
  color: #fff;
  padding: 10px;
  border-radius: var(--velocity-border-radius);
  font-size: 12px;
  z-index: 10000;
  max-width: 300px;
  box-shadow: var(--velocity-shadow-lg);
  font-family: 'Courier New', monospace;
}

#velocity-dev-tools button {
  background: var(--velocity-primary);
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  margin-top: 5px;
}

#velocity-dev-tools button:hover {
  background: color-mix(in srgb, var(--velocity-primary) 90%, black);
}

/* Enhanced Theme Support */
.velocity-theme-light {
  color-scheme: light;
}

.velocity-theme-dark {
  color-scheme: dark;
}

.velocity-theme-auto {
  color-scheme: light dark;
}

/* =====================================================
   SMART LAYOUT SYSTEM - Next.js Inspired
   ===================================================== */

/* Core Layout Container */
.velocity-layout {
  display: grid;
  min-height: 100vh;
  grid-template-areas: "content";
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
  transition: var(--velocity-layout-transition);
  background-color: var(--velocity-bg-primary);
}

/* Layout Variants Based on Navigation */
.velocity-layout.has-top-nav {
  --velocity-has-top-nav: 1;
  grid-template-areas: 
    "nav"
    "content";
  grid-template-rows: var(--velocity-nav-height) 1fr;
}

.velocity-layout.has-side-nav {
  --velocity-has-side-nav: 1;
  grid-template-areas: "nav content";
  grid-template-columns: var(--velocity-nav-width) 1fr;
}

.velocity-layout.has-side-nav.collapsed {
  --velocity-side-nav-collapsed: 1;
  grid-template-columns: var(--velocity-nav-width-collapsed) 1fr;
}

.velocity-layout.has-top-nav.has-side-nav {
  grid-template-areas: 
    "nav nav"
    "sidebar content";
  grid-template-rows: var(--velocity-nav-height) 1fr;
  grid-template-columns: var(--velocity-nav-width) 1fr;
}

.velocity-layout.has-top-nav.has-side-nav.collapsed {
  grid-template-columns: var(--velocity-nav-width-collapsed) 1fr;
}

.velocity-layout.has-bottom-nav {
  --velocity-has-bottom-nav: 1;
  grid-template-areas: 
    "content"
    "bottom-nav";
  grid-template-rows: 1fr var(--velocity-nav-height);
}

/* Navigation Components */
.velocity-nav-top {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--velocity-content-padding);
  background-color: var(--velocity-bg-secondary);
  border-bottom: 1px solid var(--velocity-border-color);
  height: var(--velocity-nav-height);
  z-index: var(--velocity-nav-z-index);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background-color: color-mix(in srgb, var(--velocity-bg-secondary) 95%, transparent);
}

.velocity-nav-side {
    grid-area: nav;
    height: 100vh;
    top: 0;
    display: flex;
    position: sticky;
  flex-direction: column;
  background-color: var(--velocity-bg-secondary);
  border-right: 1px solid var(--velocity-border-color);
  width: var(--velocity-nav-width);
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1), 
              transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: var(--velocity-nav-z-index);
  overflow: hidden;
  will-change: width, transform;
  transform: translateZ(0); /* Hardware acceleration */
}

.velocity-nav-side:hover {
  box-shadow: 0px 0 3px rgba(0, 0, 0, 0.08);
}

.velocity-nav-side.collapsed {
  width: var(--velocity-nav-width-collapsed);
}

.velocity-nav-side.collapsed:hover {
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.12);
}

.velocity-nav-bottom {
  grid-area: bottom-nav;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--velocity-content-padding);
  background-color: var(--velocity-bg-secondary);
  border-top: 1px solid var(--velocity-border-color);
  height: var(--velocity-nav-height);
  z-index: var(--velocity-nav-z-index);
  position: sticky;
  bottom: 0;
}

/* Content Area */
.velocity-content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  background-color: var(--velocity-bg-primary);
}

.velocity-main {
  flex: 1;
  padding: var(--velocity-content-padding);
  container-type: inline-size;
  position: relative;
}

/* Smart Auto-adjusting Content Padding */
.velocity-layout.has-top-nav .velocity-main {
  padding-top: var(--velocity-content-padding);
}

.velocity-layout.has-side-nav .velocity-main {
  padding-left: var(--velocity-content-padding);
}

.velocity-layout.has-bottom-nav .velocity-main {
  padding-bottom: var(--velocity-content-padding);
}

/* Header and Footer within Content */
.velocity-header {
  flex-shrink: 0;
  background-color: var(--velocity-bg-primary);
  padding: var(--velocity-content-padding) var(--velocity-content-padding) 0;
  border-bottom: 1px solid var(--velocity-border-color);
  margin-bottom: var(--velocity-layout-gap);
}

.velocity-footer {
  flex-shrink: 0;
  background-color: var(--velocity-bg-primary);
  padding: 0 var(--velocity-content-padding) var(--velocity-content-padding);
  border-top: 1px solid var(--velocity-border-color);
  margin-top: var(--velocity-layout-gap);
}

/* Navigation Components Internal Structure */
.velocity-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--velocity-text-primary);
  text-decoration: none;
  transition: var(--velocity-transition-fast);
}

.velocity-nav-brand:hover {
  color: var(--velocity-primary);
}

.velocity-nav-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--velocity-primary), var(--velocity-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.velocity-nav-menu {
  display: flex;
  align-items: center;
  gap: var(--velocity-layout-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.velocity-nav-side .velocity-nav-menu {
  flex-direction: column;
  align-items: stretch;
  padding: var(--velocity-content-padding);
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

/* Sidebar Header Section */
.velocity-nav-header {
  padding: var(--velocity-content-padding);
  border-bottom: 1px solid var(--velocity-border-color);
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--velocity-primary) 8%, transparent),
    color-mix(in srgb, var(--velocity-secondary) 5%, transparent));
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.velocity-nav-header:hover {
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--velocity-primary) 12%, transparent),
    color-mix(in srgb, var(--velocity-secondary) 8%, transparent));
}

/* Sidebar Footer Section */
.velocity-nav-footer {
  margin-top: auto;
  padding: var(--velocity-content-padding);
  border-top: 1px solid var(--velocity-border-color);
  background: color-mix(in srgb, var(--velocity-bg-secondary) 95%, transparent);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.velocity-nav-footer:hover {
  background: color-mix(in srgb, var(--velocity-bg-secondary) 90%, transparent);
}

/* Account/User Section in Footer */
.velocity-nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--velocity-border-radius);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  text-decoration: none;
  color: var(--velocity-text-primary);
}

.velocity-nav-user:hover {
  background: color-mix(in srgb, var(--velocity-primary) 10%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.velocity-nav-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--velocity-primary), var(--velocity-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.velocity-nav-user:hover .velocity-nav-user-avatar {
  transform: scale(1.1) rotate(5deg);
}

.velocity-nav-user-info {
  flex: 1;
  min-width: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.velocity-nav-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--velocity-text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.velocity-nav-user-role {
  font-size: 0.75rem;
  color: var(--velocity-text-secondary);
  margin: 2px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.velocity-nav-user-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--velocity-success);
  margin-left: auto;
  flex-shrink: 0;
  animation: velocity-nav-pulse-status 2s infinite;
}

@keyframes velocity-nav-pulse-status {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1); 
  }
  50% { 
    opacity: 0.7; 
    transform: scale(1.2); 
  }
}

/* Collapsed state adjustments */
.velocity-nav-side.collapsed .velocity-nav-header,
.velocity-nav-side.collapsed .velocity-nav-footer {
  padding: calc(var(--velocity-content-padding) / 2);
}

.velocity-nav-side.collapsed .velocity-nav-user-info {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.velocity-nav-side.collapsed .velocity-nav-user {
  justify-content: center;
}

.velocity-nav-side.collapsed .velocity-nav-user-status {
  display: none;
}

.velocity-nav-side.collapsed .velocity-nav-user:hover .velocity-nav-user-avatar {
  transform: scale(1.3) rotate(10deg);
}

/* Header Logo/Brand Enhancement */
.velocity-nav-brand-enhanced {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--velocity-text-primary);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 8px 0;
}

.velocity-nav-brand-enhanced:hover {
  color: var(--velocity-primary);
  transform: translateX(2px);
}

.velocity-nav-brand-logo-enhanced {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--velocity-primary), var(--velocity-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.velocity-nav-brand-enhanced:hover .velocity-nav-brand-logo-enhanced {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.velocity-nav-brand-text {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.velocity-nav-brand-version {
  font-size: 0.7rem;
  color: var(--velocity-text-secondary);
  font-weight: 400;
  margin-left: 4px;
  opacity: 0.8;
}

/* Collapsed brand state */
.velocity-nav-side.collapsed .velocity-nav-brand-text,
.velocity-nav-side.collapsed .velocity-nav-brand-version {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.velocity-nav-side.collapsed .velocity-nav-brand-enhanced {
  justify-content: center;
}

/* Action buttons in footer */
.velocity-nav-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--velocity-border-color) 50%, transparent);
}

.velocity-nav-action-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--velocity-border-color);
  background: transparent;
  color: var(--velocity-text-secondary);
  border-radius: var(--velocity-border-radius);
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.velocity-nav-action-btn:hover {
  background: color-mix(in srgb, var(--velocity-primary) 10%, transparent);
  border-color: var(--velocity-primary);
  color: var(--velocity-primary);
  transform: translateY(-1px);
}

.velocity-nav-side.collapsed .velocity-nav-actions {
  flex-direction: column;
}

.velocity-nav-side.collapsed .velocity-nav-action-btn {
  padding: 8px;
  font-size: 0;
}

.velocity-nav-side.collapsed .velocity-nav-action-btn::before {
  font-size: 14px;
}

.velocity-nav-item {
    
  position: relative;
  animation: velocity-nav-item-enter 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Staggered animation for menu items */
.velocity-nav-item:nth-child(1) { animation-delay: 0.1s; }
.velocity-nav-item:nth-child(2) { animation-delay: 0.2s; }
.velocity-nav-item:nth-child(3) { animation-delay: 0.3s; }
.velocity-nav-item:nth-child(4) { animation-delay: 0.4s; }
.velocity-nav-item:nth-child(5) { animation-delay: 0.5s; }
.velocity-nav-item:nth-child(6) { animation-delay: 0.6s; }
.velocity-nav-item:nth-child(7) { animation-delay: 0.7s; }
.velocity-nav-item:nth-child(8) { animation-delay: 0.8s; }

/* Enhanced nav item hover with ripple effect */
.velocity-nav-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: color-mix(in srgb, var(--velocity-primary) 20%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.velocity-nav-item:hover::after {
  width: 100%;
  height: 100%;
  opacity: 0.1;
}

.velocity-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--velocity-text-secondary);
  text-decoration: none;
  border-radius: var(--velocity-border-radius);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  will-change: transform, background-color;
}

.velocity-nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--velocity-primary) 20%, transparent), transparent);
  transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
}

.velocity-nav-link:hover::before {
  left: 100%;
}

.velocity-nav-link > * {
  position: relative;
  z-index: 1;
}

.velocity-nav-top .velocity-nav-link {
  padding: 8px 16px;
}

.velocity-nav-link:hover {
  color: var(--velocity-text-primary);
  background-color: color-mix(in srgb, var(--velocity-primary) 10%, transparent);
  transform: translateX(4px) scale(1.02);
}

.velocity-nav-top .velocity-nav-link:hover {
  transform: translateY(-2px) scale(1.02);
}

.velocity-nav-link:active {
  transform: scale(0.98);
}

.velocity-nav-link.active {
  color: var(--velocity-primary);
  border: 1px solid #cacaca;
  background-color: color-mix(in srgb, var(--velocity-primary) 15%, transparent);
  transform: translateX(2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--velocity-primary) 25%, transparent);
}

.velocity-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background-color: var(--velocity-primary);
  border-radius: 0 2px 2px 0;
}

.velocity-nav-top .velocity-nav-link.active::before {
  display: none;
}

.velocity-nav-top .velocity-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background-color: var(--velocity-primary);
  border-radius: 2px 2px 0 0;
}

.velocity-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

.velocity-nav-link:hover .velocity-nav-icon {
  opacity: 1;
  transform: scale(1.1) rotate(5deg);
}

.velocity-nav-link.active .velocity-nav-icon {
  opacity: 1;
  transform: scale(1.05);
}

.velocity-nav-text {
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              width 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
  overflow: hidden;
  transform-origin: left center;
}

.velocity-nav-link:hover .velocity-nav-text {
  transform: translateX(2px);
}

.velocity-nav-side.collapsed .velocity-nav-text {
  opacity: 0;
  width: 0;
  transform: translateX(-10px) scale(0.9);
}

.velocity-nav-side.collapsed .velocity-nav-link {
  justify-content: center;
  padding: 12px;
  transform: none;
}

.velocity-nav-side.collapsed .velocity-nav-link:hover {
  transform: scale(1.1);
  background-color: color-mix(in srgb, var(--velocity-primary) 15%, transparent);
}

.velocity-nav-side.collapsed .velocity-nav-link.active {
  transform: scale(1.05);
}

.velocity-nav-side.collapsed .velocity-nav-link:hover .velocity-nav-icon {
  transform: scale(1.2) rotate(10deg);
}

/* Mobile Navigation */
.velocity-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  color: var(--velocity-text-primary);
  cursor: pointer;
  border-radius: var(--velocity-border-radius);
  transition: var(--velocity-transition-fast);
}

.velocity-nav-toggle:hover {
  background-color: color-mix(in srgb, var(--velocity-primary) 10%, transparent);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .velocity-layout.has-side-nav {
    grid-template-areas: "content";
    grid-template-columns: 1fr;
  }
  
  .velocity-layout.has-top-nav.has-side-nav {
    grid-template-areas: 
      "nav"
      "content";
    grid-template-rows: var(--velocity-nav-height-mobile) 1fr;
    grid-template-columns: 1fr;
  }
  
  .velocity-nav-top {
    height: var(--velocity-nav-height-mobile);
    padding: 0 var(--velocity-content-padding-mobile);
  }
  
  .velocity-nav-side {
    position: fixed;
    top: var(--velocity-nav-height-mobile);
    left: 0;
    height: calc(100vh - var(--velocity-nav-height-mobile));
    transform: translateX(-100%);
    z-index: calc(var(--velocity-nav-z-index) + 1);
    box-shadow: var(--velocity-shadow-lg);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .velocity-nav-side.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
  }
  
  /* Enhanced mobile slide animation */
  .velocity-nav-side.open .velocity-nav-item {
    animation: velocity-nav-bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  
  .velocity-nav-side.open .velocity-nav-item:nth-child(1) { animation-delay: 0.1s; }
  .velocity-nav-side.open .velocity-nav-item:nth-child(2) { animation-delay: 0.15s; }
  .velocity-nav-side.open .velocity-nav-item:nth-child(3) { animation-delay: 0.2s; }
  .velocity-nav-side.open .velocity-nav-item:nth-child(4) { animation-delay: 0.25s; }
  .velocity-nav-side.open .velocity-nav-item:nth-child(5) { animation-delay: 0.3s; }
  
  .velocity-nav-toggle {
    display: flex;
  }
  
  .velocity-main {
    padding: var(--velocity-content-padding-mobile);
  }
}

/* Mobile Overlay */
.velocity-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--velocity-nav-z-index);
  opacity: 0;
  visibility: hidden;
  transition: var(--velocity-transition-fast);
}

.velocity-nav-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Legacy Sidebar Support */
.velocity-sidebar {
  background-color: var(--velocity-bg-secondary);
  border-right: var(--velocity-border-width) solid var(--velocity-border-color);
  padding: 1rem;
}

/* Enhanced Table System */
.velocity-table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--velocity-text-primary);
  border-collapse: collapse;
}

.velocity-table th,
.velocity-table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: var(--velocity-border-width) solid var(--velocity-border-color);
}

.velocity-table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--velocity-border-color);
  font-weight: 600;
}

.velocity-table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--velocity-bg-secondary);
}

.velocity-table-hover tbody tr:hover {
  background-color: var(--velocity-bg-secondary);
}

/* Responsive table */
.velocity-table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --velocity-border-width: 2px;
    --velocity-shadow: 0 0 0 2px var(--velocity-text-primary);
  }
  
  .velocity-btn {
    border-width: 2px;
  }
  
  .velocity-form-control:focus {
    box-shadow: 0 0 0 3px var(--velocity-primary);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .velocity-spinner {
    animation: none;
  }
}

/* Loading States */
.velocity-loading {
    position: relative;
}

#velocity-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    z-index: 9999;
    animation: velocity-loading 1.5s ease-in-out infinite;
}

.velocity-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: velocity-spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes velocity-loading {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

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

/* Navigation Styles */
.velocity-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 700;
}

.nav-brand .version {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #667eea;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    opacity: 0.9;
    line-height: 1.6;
}

/* Demo Section */
.demo-section {
    background: white;
    padding: 40px;
    border-radius: 15px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.demo-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #28a745;
    color: white;
}

.btn-tertiary {
    background: #ffc107;
    color: #333;
}

.btn-quaternary {
    background: #dc3545;
    color: white;
}

.demo-output {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    min-height: 120px;
}

/* Code Examples */
.code-example {
    background: #2d3748;
    color: #e2e8f0;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    overflow-x: auto;
}

.code-example h3 {
    margin-bottom: 20px;
    color: #667eea;
}

.code-example pre {
    margin: 0;
    font-family: 'Fira Code', 'Courier New', monospace;
    line-height: 1.6;
}

.code-example code {
    font-size: 0.9rem;
}

/* Log Entries */
.log-entries {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
}

.log-entry {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    border-left: 3px solid;
}

.log-error {
    background: #fff5f5;
    border-color: #e53e3e;
    color: #c53030;
}

.log-warn {
    background: #fffbeb;
    border-color: #d69e2e;
    color: #b7791f;
}

.log-info {
    background: #ebf8ff;
    border-color: #3182ce;
    color: #2c5282;
}

.log-debug {
    background: #f0fff4;
    border-color: #38a169;
    color: #2f855a;
}

.log-trace {
    background: #f7fafc;
    border-color: #a0aec0;
    color: #4a5568;
}

.log-time {
    opacity: 0.7;
    font-size: 0.8rem;
}

.log-message {
    margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .nav-links {
        margin-top: 15px;
        gap: 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 40px 0;
    }
    
    .demo-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .demo-section {
        padding: 25px;
    }
    
    .code-example {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .demo-section {
        padding: 20px;
    }
}

/* Animation Classes */
.velocity-fade-in {
    animation: velocity-fade-in 0.5s ease-in-out;
}

.velocity-slide-up {
    animation: velocity-slide-up 0.5s ease-out;
}

.velocity-slide-down {
    animation: velocity-slide-down 0.5s ease-out;
}

@keyframes velocity-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Enhanced Navigation Animations */
@keyframes velocity-nav-item-enter {
  0% { 
    transform: translateX(-20px) scale(0.95); 
    opacity: 0; 
  }
  60% {
    transform: translateX(2px) scale(1.02);
  }
  100% { 
    transform: translateX(0) scale(1); 
    opacity: 1; 
  }
}

@keyframes velocity-nav-item-exit {
  from { 
    transform: translateX(0) scale(1); 
    opacity: 1; 
  }
  to { 
    transform: translateX(-20px) scale(0.95); 
    opacity: 0; 
  }
}

@keyframes velocity-nav-pulse {
  0%, 100% { 
    transform: scale(1); 
  }
  50% { 
    transform: scale(1.05); 
  }
}

@keyframes velocity-nav-bounce-in {
  0% {
    transform: scale(0.3) translateX(-20px);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) translateX(5px);
  }
  70% {
    transform: scale(0.9) translateX(-2px);
  }
  100% {
    transform: scale(1) translateX(0);
    opacity: 1;
  }
}

@keyframes velocity-nav-icon-spin {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1.1);
  }
}

@keyframes velocity-nav-shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Utility Classes */
.velocity-hidden {
    display: none !important;
}

.velocity-visible {
    display: block !important;
}

.velocity-text-center {
    text-align: center;
}

.velocity-text-left {
    text-align: left;
}

.velocity-text-right {
    text-align: right;
}

.velocity-mt-1 { margin-top: 0.25rem; }
.velocity-mt-2 { margin-top: 0.5rem; }
.velocity-mt-3 { margin-top: 1rem; }
.velocity-mt-4 { margin-top: 1.5rem; }
.velocity-mt-5 { margin-top: 3rem; }

.velocity-mb-1 { margin-bottom: 0.25rem; }
.velocity-mb-2 { margin-bottom: 0.5rem; }
.velocity-mb-3 { margin-bottom: 1rem; }
.velocity-mb-4 { margin-bottom: 1.5rem; }
.velocity-mb-5 { margin-bottom: 3rem; }

.velocity-p-1 { padding: 0.25rem; }
.velocity-p-2 { padding: 0.5rem; }
.velocity-p-3 { padding: 1rem; }
.velocity-p-4 { padding: 1.5rem; }
.velocity-p-5 { padding: 3rem; }

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .velocity-nav {
        background: rgba(45, 55, 72, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a {
        color: #e2e8f0;
    }
    
    .demo-section {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .demo-output {
        background: #4a5568;
        color: #e2e8f0;
    }
}

/* =====================================================
   ENHANCED LAYOUT UTILITIES & SMART HELPERS
   ===================================================== */

/* Container Variants for Different Use Cases */
.velocity-container-smart {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--velocity-content-padding);
}

.velocity-container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--velocity-content-padding);
}

.velocity-container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--velocity-content-padding);
}

.velocity-container-full {
  width: 100%;
  padding: 0 var(--velocity-content-padding);
}

/* Responsive Container Behavior */
@media (max-width: 768px) {
  .velocity-container-smart,
  .velocity-container-wide,
  .velocity-container-narrow {
    padding: 0 var(--velocity-content-padding-mobile);
  }
}

/* Enhanced Flexbox Utilities */
.velocity-flex {
  display: flex;
}

.velocity-flex-col {
  display: flex;
  flex-direction: column;
}

.velocity-flex-wrap {
  flex-wrap: wrap;
}

.velocity-items-center {
  align-items: center;
}

.velocity-items-start {
  align-items: flex-start;
}

.velocity-items-end {
  align-items: flex-end;
}

.velocity-justify-center {
  justify-content: center;
}

.velocity-justify-between {
  justify-content: space-between;
}

.velocity-justify-around {
  justify-content: space-around;
}

.velocity-justify-evenly {
  justify-content: space-evenly;
}

/* Advanced Spacing */
.velocity-gap-1 { gap: 0.25rem; }
.velocity-gap-2 { gap: 0.5rem; }
.velocity-gap-3 { gap: 1rem; }
.velocity-gap-4 { gap: 1.5rem; }
.velocity-gap-5 { gap: 3rem; }

/* Aspect Ratios */
.velocity-aspect-square {
  aspect-ratio: 1;
}

.velocity-aspect-video {
  aspect-ratio: 16/9;
}

.velocity-aspect-photo {
  aspect-ratio: 4/3;
}

/* Layout-aware positioning */
.velocity-sticky-smart {
  position: sticky;
  top: var(--velocity-content-padding);
  z-index: 10;
}

.velocity-layout.has-top-nav .velocity-sticky-smart {
  top: calc(var(--velocity-nav-height) + var(--velocity-content-padding));
}

/* Auto-adjusting content spacing */
.velocity-layout-padding {
  padding: var(--velocity-content-padding);
}

.velocity-layout-padding-x {
  padding-left: var(--velocity-content-padding);
  padding-right: var(--velocity-content-padding);
}

.velocity-layout-padding-y {
  padding-top: var(--velocity-content-padding);
  padding-bottom: var(--velocity-content-padding);
}

/* Enhanced glass effects for modern layouts */
.velocity-glass-strong {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: color-mix(in srgb, var(--velocity-bg-secondary) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--velocity-border-color) 30%, transparent);
}

.velocity-glass-subtle {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: color-mix(in srgb, var(--velocity-bg-secondary) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--velocity-border-color) 60%, transparent);
}

/* Page structure helpers */
.velocity-page-header {
  padding: calc(var(--velocity-content-padding) * 2) 0;
  border-bottom: 1px solid var(--velocity-border-color);
  margin-bottom: var(--velocity-layout-gap);
}

.velocity-page-footer {
  padding: calc(var(--velocity-content-padding) * 2) 0;
  border-top: 1px solid var(--velocity-border-color);
  margin-top: auto;
}

.velocity-page-section {
  padding: calc(var(--velocity-content-padding) * 1.5) 0;
}

/* Smart scroll container */
.velocity-scroll-smart {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--velocity-border-color) transparent;
}

.velocity-scroll-smart::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.velocity-scroll-smart::-webkit-scrollbar-track {
  background: transparent;
}

.velocity-scroll-smart::-webkit-scrollbar-thumb {
  background-color: var(--velocity-border-color);
  border-radius: 3px;
}

.velocity-scroll-smart::-webkit-scrollbar-thumb:hover {
  background-color: var(--velocity-text-secondary);
}

/* Container queries for responsive layouts */
@container (max-width: 500px) {
  .velocity-grid-2,
  .velocity-grid-3,
  .velocity-grid-4 {
    grid-template-columns: 1fr;
  }
}

  @container (max-width: 800px) {
    .velocity-grid-3,
    .velocity-grid-4 {
      grid-template-columns: repeat(2, 1fr);
    }
  }

/* =====================================================
   ENHANCED NAVIGATION INTERACTION CLASSES
   ===================================================== */

/* Special animation states */
.velocity-nav-item.animate-pulse {
  animation: velocity-nav-pulse 2s infinite;
}

.velocity-nav-item.animate-bounce {
  animation: velocity-nav-bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.velocity-nav-icon.animate-spin {
  animation: velocity-nav-icon-spin 1s linear infinite;
}

.velocity-nav-link.velocity-enhanced:hover {
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--velocity-primary) 15%, transparent),
    color-mix(in srgb, var(--velocity-secondary) 10%, transparent));
}

.velocity-nav-link.velocity-enhanced.active {
  background: linear-gradient(135deg, 
    color-mix(in srgb, var(--velocity-primary) 20%, transparent),
    color-mix(in srgb, var(--velocity-secondary) 15%, transparent));
  box-shadow: inset 0px 0px 2px 0px  color-mix(in srgb, var(--velocity-primary) 30%, transparent)
}

.velocity-nav-link:focus-visible {
  outline: 2px solid var(--velocity-primary);
  outline-offset: 2px;
  transform: translateX(4px) scale(1.02);
}

.velocity-nav-side.collapsed .velocity-nav-link:focus-visible {
  transform: scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .velocity-nav-item,
  .velocity-nav-link,
  .velocity-nav-icon,
  .velocity-nav-text {
    animation: none !important;
    transition: none !important;
  }
  
  .velocity-nav-side {
    transition: width 0.2s ease !important;
  }
  
  .velocity-nav-link:hover,
  .velocity-nav-link:focus-visible {
    transform: none !important;
  }
}

@media (prefers-contrast: high) {
  .velocity-nav-link:hover {
    background-color: var(--velocity-primary) !important;
    color: var(--velocity-bg-primary) !important;
  }
  .velocity-nav-link.active {
    background-color: var(--velocity-primary) !important;
    color: var(--velocity-bg-primary) !important;
    border: 2px solid var(--velocity-text-primary);
  }
}