:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
}

body {
  background: #ffffff;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 40% 20%, rgba(79, 172, 254, 0.03) 0%, transparent 50%);
  z-index: -2;
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Floating Particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  opacity: 0;
  animation: float 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 25%; animation-delay: 2s; animation-duration: 15s; }
.particle:nth-child(3) { left: 40%; animation-delay: 4s; animation-duration: 18s; }
.particle:nth-child(4) { left: 55%; animation-delay: 1s; animation-duration: 14s; }
.particle:nth-child(5) { left: 70%; animation-delay: 3s; animation-duration: 16s; }
.particle:nth-child(6) { left: 85%; animation-delay: 5s; animation-duration: 13s; }

@keyframes float {
  0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(100px) rotate(360deg); opacity: 0; }
}

.card-body-head {
  flex: 1 1 auto;
  color: var(--bs-card-color);
  padding: 20px;
}

/* Gradient Orbs */
.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  bottom: -175px;
  right: -175px;
  animation-delay: 5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  top: 50%;
  right: 10%;
  animation-delay: 10s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -50px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.9); }
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  animation: fadeInDown 0.6s ease-out;
  position: relative;
  display: inline-block;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
  animation: expandWidth 0.8s ease-out 0.3s forwards;
}

@keyframes expandWidth {
  to { width: 100%; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out;
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.glass-card:hover::before {
  left: 100%;
}

.glass-card:hover {
  box-shadow: 0 16px 48px rgba(102, 126, 234, 0.2);
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(102, 126, 234, 0.3);
}

.card-header-gradient {
  background: var(--primary-gradient);
  color: white;
  padding: 1.5rem;
  border: none;
  position: relative;
  overflow: hidden;
}

.card-header-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  animation: ripple 15s infinite;
}

@keyframes ripple {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -30px) scale(1.1); }
}

.alert-custom {
  border: none;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.6s ease-out 0.2s both;
  position: relative;
  overflow: hidden;
}

.alert-custom::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 0;
  animation: heightGrow 0.6s ease-out 0.4s forwards;
}

@keyframes heightGrow {
  to { height: 100%; }
}

.alert-info-custom {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
  border-left: 4px solid #667eea;
}

.alert-info-custom::before {
  background: var(--primary-gradient);
}

.alert-warning-custom {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, rgba(255, 152, 0, 0.08) 100%);
  border-left: 4px solid #ff9800;
}

.alert-warning-custom::before {
  background: linear-gradient(135deg, #ffd93d 0%, #ffb800 100%);
}

.form-control-modern {
  border: 2px solid #e8ecef;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.9);
}

.form-control-modern:focus {
  border-color: #667eea;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.btn-gradient {
  background: var(--primary-gradient);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-gradient:hover::before {
  width: 300px;
  height: 300px;
}

.btn-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-success-gradient {
  background: var(--success-gradient);
}

.btn-success-gradient:hover {
  box-shadow: 0 8px 24px rgba(79, 172, 254, 0.4);
}

.section-title {
  background: var(--primary-gradient);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px 12px 0 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, white, transparent);
  animation: shimmerSlide 3s infinite;
}

@keyframes shimmerSlide {
  to { left: 100%; }
}

.badge-modern {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

.table-modern {
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.table-modern thead th {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  position: relative;
}

.table-modern thead th:first-child {
  border-radius: 12px 0 0 12px;
}

.table-modern thead th:last-child {
  border-radius: 0 12px 12px 0;
}

.table-modern thead th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.table-modern thead th:hover::after {
  width: 100%;
}

.table-modern tbody tr {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-modern tbody tr:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.table-modern tbody td {
  padding: 1rem;
  border: none;
  vertical-align: middle;
}

.table-modern tbody tr td:first-child {
  border-radius: 12px 0 0 12px;
  border-left: 3px solid transparent;
  transition: border-color 0.3s ease;
}

.table-modern tbody tr:hover td:first-child {
  border-left-color: #667eea;
}

.table-modern tbody tr td:last-child {
  border-radius: 0 12px 12px 0;
}

.config-value {
  border: 2px solid #e8ecef;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(248, 249, 250, 0.8);
  font-family: 'Courier New', monospace;
}

.config-value:focus {
  border-color: #667eea;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn-save {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-save:not(:disabled) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border: none;
  color: white;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(240, 147, 251, 0.5); }
  50% { box-shadow: 0 0 20px rgba(245, 87, 108, 0.7); }
}

.btn-delete {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  border: none;
  color: white;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

code {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.icon-emoji {
  font-size: 1.2em;
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(241, 241, 241, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.stagger-animation > * {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }

/* Search highlight styles */
.search-match {
  background: rgba(255, 255, 0, 0.1) !important;
  transition: all 0.3s ease;
}

.search-current {
  background: rgba(102, 126, 234, 0.15) !important;
  border-left-color: #667eea !important;
  border-left-width: 5px !important;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3) !important;
  animation: highlightPulse 1.5s ease-in-out infinite;
}

@keyframes highlightPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.5); }
}

/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ========================================
   🌐 LANGUAGE CONFIG STYLES
   ======================================== */

/* ✅ Ensure font inheritance */
.glass-card,
.card-body-head,
.form-control,
.table-modern,
.alert-custom {
  font-family: inherit !important;
}

/* ✅ Code elements should remain monospace */
code,
.config-value {
  font-family: 'Courier New', Consolas, Monaco, monospace !important;
}
