/* базовые утилиты */
:root {
  --section-min-h: 35vh;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

.sections { gap: 1rem; display: flex; flex-direction: column; }
.section-tall { width: 100%; min-height: var(--section-min-h); overflow: hidden; border-radius: 0.75rem; }
.section-inner { padding: 0.875rem; height: 100%; display: flex; flex-direction: column; }
.section-inner h3 { font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.5rem; }

.fade-in { opacity: 0; transform: translateY(12px); animation: fadeIn .6s ease-out forwards; }
@keyframes fadeIn { to { opacity: 1; transform: none; } }

.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

* { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
img { max-height: 520px; object-fit: contain; background: transparent; }
.table > :not(caption) > * > * { background-color: transparent; }

/* ---- Dark tech theme (deep blue) ---- */
:root { --mono-bg:#0a1024; --mono-surface:#0d1533; --mono-text:#ffffff; --mono-border:#1b2447; --mono-grid:rgba(120,150,255,0.08); }
html, body { height: 100%; }
body { background: var(--mono-bg) !important; color: var(--mono-text) !important; }
.navbar { background: #0a1024 !important; border-color: var(--mono-border) !important; }
.navbar .nav-link, .navbar .navbar-brand, .navbar-text { color: #fff !important; text-decoration: none !important; }
.navbar .nav-link:hover, .navbar .navbar-brand:hover { text-decoration: none !important; }
.sections { gap: 2rem; display: flex; flex-direction: column; }
.section-tall { background: var(--mono-surface) !important; border: 1px solid var(--mono-border) !important; color: var(--mono-text) !important; }
.section-inner { padding: 1.5rem; height: 100%; display: flex; flex-direction: column; }
.list-group-item { background: transparent !important; color: var(--mono-text) !important; border-color: var(--mono-border) !important; padding: 0.75rem 1rem; }
.list-group-item h5 { font-size: 1.1rem; line-height: 1.25; margin-bottom: 0.5rem; }
.list-group-item-action:hover { background: rgba(80,120,255,0.08) !important; }
.list-group-item p { font-size: 0.95rem; margin-bottom: 0.5rem; }
.bg-dark-2 { background: var(--mono-surface) !important; }
.glow { box-shadow: 0 0 14px rgba(59,130,246,.22), 0 0 36px rgba(0,229,255,.12) !important; }
.tech-grid { position: fixed; inset: 0; pointer-events: none; z-index: -1; background-image: linear-gradient(var(--mono-grid) 1px, transparent 1px), linear-gradient(90deg, var(--mono-grid) 1px, transparent 1px); background-size: 24px 24px; animation: gridShift 20s linear infinite; }
@keyframes gridShift { 0% { background-position: 0 0, 0 0; } 100% { background-position: 24px 24px, 24px 24px; } }

/* Links */
a, .link, .link-neon { color: #93c5fd; text-decoration: none; }
a:hover { color: #a5f3fc; text-decoration: none; }

/* Dates and muted text should be white on dark */
.text-muted { color: #ffffff !important; opacity: 0.9; }

/* Page load slide-down animation */
.animate-load { 
  animation: slideDownFade .6s cubic-bezier(.22,1,.36,1) forwards; 
  animation-delay: var(--delay, 0s); 
}
@keyframes slideDownFade { 
  from { 
    opacity: 0; 
    transform: translateY(-16px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  } 
}

/* Section hover accent */
.section-tall:hover { box-shadow: 0 0 0 1px rgba(59,130,246,.35), 0 8px 32px rgba(0,0,0,.45), 0 0 24px rgba(0,229,255,.12); transition: box-shadow .25s ease; }

/* Schedule lesson cards with group badges */
.lesson-card { 
  padding: 0.5rem; 
  border-radius: 0.5rem; 
  background: rgba(59,130,246,0.05) !important; 
  border: 1px solid rgba(59,130,246,0.15) !important;
  transition: all 0.2s ease;
  position: relative;
}
.lesson-card:hover { 
  background: rgba(59,130,246,0.1) !important; 
  border-color: rgba(59,130,246,0.3) !important;
  transform: translateX(2px);
}
.lesson-card .badge { 
  font-size: 0.7rem; 
  font-weight: 500; 
  padding: 0.25rem 0.5rem;
  background: linear-gradient(135deg, #3b82f6, #06b6d4) !important;
  color: #ffffff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

/* Lesson status indicators */
.lesson-status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
  animation: pulse 2s ease-in-out infinite;
}

.status-ongoing {
  background: #22c55e;
  box-shadow: 0 0 12px #22c55e, 0 0 24px rgba(34,197,94,0.4);
}

.status-cancelled {
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444, 0 0 24px rgba(239,68,68,0.4);
  animation: none;
}

.status-passed {
  background: #6b7280;
  box-shadow: 0 0 8px #6b7280;
  opacity: 0.6;
  animation: none;
}

.status-scheduled {
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
  opacity: 0.4;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Lesson status text */
.lesson-status-text {
  font-weight: 600;
  white-space: nowrap;
}

.status-ongoing-text {
  color: #22c55e !important;
}

.status-cancelled-text {
  color: #ef4444 !important;
}

.status-passed-text {
  color: #6b7280 !important;
}

.status-scheduled-text {
  color: #3b82f6 !important;
}

/* Info badges */
.info-badge {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

#current-date-info {
  color: #06b6d4 !important;
  background: rgba(6,182,212,0.15);
  border: 1px solid rgba(6,182,212,0.3);
}

.timer-badge {
  color: #22c55e !important;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  animation: timerPulse 2s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 12px rgba(34,197,94,0.6); }
}

/* Holiday message */
.holiday-message {
  padding: 4rem 2rem;
  background: rgba(34,197,94,0.05);
  border-radius: 1rem;
  border: 2px dashed rgba(34,197,94,0.3);
  animation: fadeIn 0.8s ease-out;
}

.holiday-message h2 {
  color: #22c55e;
  font-size: 2rem;
}

.holiday-message p {
  font-size: 1.25rem;
}

/* Sunday message (выходной) */
#sunday-message {
  background: rgba(251,191,36,0.05);
  border: 2px dashed rgba(251,191,36,0.3);
}

#sunday-message h2 {
  color: #fbbf24;
}

#sunday-message p {
  color: #ffffff !important;
  opacity: 0.9;
}

/* Buttons: deep blue */
.btn,
.btn-primary { background-color: #0d1b4a !important; border-color: #0d1b4a !important; color: #ffffff !important; }
.btn:hover,
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline-light { color: #ffffff !important; border-color: #93c5fd !important; }
.btn-outline-light:hover { background-color: #0d1b4a !important; border-color: #93c5fd !important; }

/* Pagination dark */
.pagination .page-link { background-color: var(--mono-surface); border-color: var(--mono-border); color: #ffffff; }
.pagination .page-item.disabled .page-link { background-color: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); border-color: var(--mono-border); }
.pagination .page-item.active .page-link { background-color: #0d1b4a; border-color: #0d1b4a; }

/* Tables: white text */
.table { color: #ffffff !important; }
.table th, .table td { color: #ffffff !important; }

/* Forms and cards - dark surfaces */
.card, .card-body { background: var(--mono-surface) !important; color: var(--mono-text) !important; border: 1px solid var(--mono-border) !important; }
.form-control, .form-select, textarea, input[type="text"], input[type="password"], input[type="file"] {
  background-color: #0f1a3d !important; color: #fff !important; border-color: var(--mono-border) !important;
}
.form-control::placeholder, textarea::placeholder { color: rgba(255,255,255,0.55) !important; }
.form-control:focus, .form-select:focus, textarea:focus {
  box-shadow: 0 0 0 .25rem rgba(59,130,246,.25) !important; border-color: #3b82f6 !important;
}
.list-group { --bs-list-group-bg: transparent; }
.list-group-item { background: transparent !important; color: var(--mono-text) !important; border-color: var(--mono-border) !important; }
.btn-primary { background-color: #3b82f6; border-color: #3b82f6; }
.btn-primary:hover { filter: brightness(1.1); }

.scrollable-section { max-height: 60vh; overflow-y: auto; scrollbar-color: #253773 #111c2e; scrollbar-width: thin; }
.scrollable-section::-webkit-scrollbar { width: 7px; background: #111c2e; }
.scrollable-section::-webkit-scrollbar-thumb { background: #253773; border-radius: 8px; }

/* Countdown timers */
.lesson-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.timer-label {
  font-weight: 600;
  color: #93c5fd;
  white-space: nowrap;
}

.timer-label-passed {
  color: #6b7280 !important;
}

.countdown-part {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  padding: 0.25rem 0.5rem;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 0.375rem;
  font-weight: 700;
  font-size: 1.1em;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(59,130,246,0.2);
  transition: all 0.3s ease;
}

.countdown-part:hover {
  background: rgba(59,130,246,0.25);
  border-color: rgba(59,130,246,0.5);
  transform: translateY(-1px);
}

.countdown-part small {
  font-size: 0.75em;
  font-weight: 500;
  color: #93c5fd;
  margin-left: 0.1rem;
}

/* Кастомное модальное окно подтверждения */
.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.custom-modal-content {
  background: var(--mono-surface);
  border: 1px solid var(--mono-border);
  border-radius: 1rem;
  box-shadow: 0 0 40px rgba(59,130,246,.35), 0 0 80px rgba(0,229,255,.2);
  width: 90%;
  max-width: 500px;
  animation: slideInScale 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--mono-border);
}

.custom-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--mono-text);
}

.custom-modal-body {
  padding: 2rem 1.5rem;
}

.custom-modal-body p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--mono-text);
  line-height: 1.6;
}

.custom-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--mono-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Rich text content styling */
.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 {
  color: #93c5fd !important;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.post-body h1 { font-size: 2.5rem; }
.post-body h2 { font-size: 2rem; }
.post-body h3 { font-size: 1.75rem; }
.post-body h4 { font-size: 1.5rem; }
.post-body h5 { font-size: 1.25rem; }
.post-body h6 { font-size: 1.1rem; }

.post-body p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.post-body strong, .post-body b {
  font-weight: 700;
  color: #fff !important;
}

.post-body em, .post-body i {
  font-style: italic;
}

.post-body u {
  text-decoration: underline;
}

.post-body s, .post-body strike, .post-body del {
  text-decoration: line-through;
  opacity: 0.7;
}

.post-body ul, .post-body ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.post-body ul {
  list-style-type: disc;
}

.post-body ol {
  list-style-type: decimal;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #93c5fd !important;
  background: rgba(59, 130, 246, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
}

.post-body code {
  background: rgba(59, 130, 246, 0.15);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #a5f3fc;
}

.post-body pre {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.post-body pre code {
  background: transparent;
  padding: 0;
}

.post-body a {
  color: #93c5fd;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.post-body a:hover {
  color: #a5f3fc;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0.5rem;
  overflow: hidden;
}

.post-body table th {
  background: rgba(59, 130, 246, 0.2);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #fff !important;
}

.post-body table td {
  padding: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.post-body table tr:nth-child(even) {
  background: rgba(59, 130, 246, 0.05);
}

.post-body table tr:hover {
  background: rgba(59, 130, 246, 0.1);
}

.post-body hr {
  border: none;
  border-top: 2px solid rgba(59, 130, 246, 0.3);
  margin: 2rem 0;
}

.post-body .text-start { text-align: left; }
.post-body .text-center { text-align: center; }
.post-body .text-end { text-align: right; }
.post-body .text-justify { text-align: justify; }

/* Font families support */
.post-body [style*="font-family"] {
  line-height: 1.6;
}

/* Color preservation */
.post-body [style*="color"] {
  /* Colors set inline will be preserved */
}

.post-body [style*="background-color"] {
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
}

/* ==================== TECH UPGRADE: Advanced Animations & Effects ==================== */

/* Enhanced Color Palette */
:root {
  --neon-blue: #00d4ff;
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --neon-green: #10b981;
  --glow-intensity: 0 0 20px, 0 0 40px, 0 0 60px;
}

/* Glassmorphism Cards */
.glass {
  background: rgba(13, 21, 51, 0.6) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 212, 255, 0.1);
}

.glass:hover {
  border-color: rgba(0, 212, 255, 0.3) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 212, 255, 0.2), 0 0 15px rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animated Gradient Background */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 40% 20%, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
  animation: gradientShift 20s ease infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-5%, -5%) rotate(5deg); }
}

/* Enhanced Navigation */
.navbar {
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  background: rgba(10, 16, 36, 0.85) !important;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible !important;
  max-width: 100vw !important;
}

.navbar .container-fluid {
  max-width: 100%;
  overflow: visible !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.navbar-nav {
  max-width: 100%;
  flex-wrap: nowrap !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar .nav-link {
  position: relative;
  padding: 0.4rem 0.6rem !important;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.navbar .nav-link i {
  font-size: 1rem;
  transition: all 0.3s ease;
}

.navbar .dropdown-toggle {
  padding: 0.4rem 0.6rem !important;
  font-size: 0.9rem;
}

.navbar .btn {
  padding: 0.3rem 0.6rem !important;
  font-size: 0.85rem;
}

.navbar .nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar .nav-link:hover::before {
  width: 80%;
}

.navbar .nav-link:hover {
  color: var(--neon-blue) !important;
  transform: translateY(-2px);
}

.navbar .nav-link:hover i {
  transform: scale(1.15);
  color: var(--neon-blue);
}

/* Иконка в кнопке входа */
.btn i {
  margin-right: 0.3rem;
}

/* ==================== MODAL WINDOWS ==================== */

.modal-backdrop {
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1050 !important;
}

.modal-backdrop.show {
  opacity: 1 !important;
}

.modal {
  z-index: 1055 !important;
}

.modal-dialog {
  animation: modalZoomIn 0.3s ease-out;
}

@keyframes modalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content {
  background: linear-gradient(135deg, #0a1628 0%, #1a2d4d 100%) !important;
  border: 3px solid var(--neon-blue) !important;
  border-radius: 15px !important;
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.6),
              0 8px 32px rgba(0, 212, 255, 0.4),
              0 4px 16px rgba(0, 0, 0, 0.8),
              inset 0 0 30px rgba(0, 212, 255, 0.1) !important;
  color: white !important;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(138, 43, 226, 0.2)) !important;
  border-bottom: 2px solid var(--neon-blue) !important;
  padding: 1.2rem 1.5rem !important;
}

.modal-title {
  color: #ffffff !important;
  font-weight: 600;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
  display: flex !important;
  align-items: center;
  gap: 0.8rem;
}

.modal-title i {
  color: var(--neon-blue);
  filter: drop-shadow(0 0 10px var(--neon-blue));
}

.modal-body {
  padding: 1.5rem !important;
}

.modal-body .form-label {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.modal-body .form-control,
.modal-body .form-select {
  background: rgba(13, 21, 51, 0.6) !important;
  border: 2px solid rgba(0, 212, 255, 0.3) !important;
  color: white !important;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  transition: all 0.3s ease;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  background: rgba(13, 21, 51, 0.8) !important;
  border-color: var(--neon-blue) !important;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4),
              inset 0 0 20px rgba(0, 212, 255, 0.1) !important;
  outline: none;
}

.modal-body .form-control option,
.modal-body .form-select option {
  background: #0d1533 !important;
  color: white !important;
}

.modal-footer {
  background: rgba(0, 0, 0, 0.2) !important;
  border-top: 2px solid rgba(0, 212, 255, 0.3) !important;
  padding: 1rem 1.5rem !important;
}

.btn-close {
  background: transparent !important;
  opacity: 1 !important;
  color: white !important;
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
  transition: all 0.3s ease;
}

.btn-close:hover {
  transform: rotate(90deg) scale(1.2);
  filter: drop-shadow(0 0 15px rgba(255, 0, 100, 0.8));
}

/* ==================== DROPDOWN MENUS FIX ==================== */

.dropdown-menu {
  background: rgba(10, 15, 35, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 3px solid var(--neon-blue) !important;
  border-radius: 12px !important;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.6),
              0 8px 32px rgba(0, 212, 255, 0.4),
              0 4px 16px rgba(0, 0, 0, 0.7),
              inset 0 0 20px rgba(0, 212, 255, 0.1) !important;
  padding: 0.5rem !important;
  margin-top: 0.5rem !important;
  animation: dropdownFadeIn 0.3s ease-out;
  min-width: 200px !important;
  z-index: 9999 !important;
  position: absolute !important;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu.show {
  display: block !important;
}

.dropdown-item {
  color: #ffffff !important;
  padding: 0.7rem 1.2rem !important;
  border-radius: 8px !important;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.dropdown-item:hover, .dropdown-item:focus {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.3), rgba(138, 43, 226, 0.3)) !important;
  color: #00d4ff !important;
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5),
              inset 0 0 15px rgba(0, 212, 255, 0.2);
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
}

.dropdown-item i {
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover i {
  transform: scale(1.15);
  filter: drop-shadow(0 0 5px var(--neon-blue));
}

.dropdown-divider {
  border-color: rgba(0, 212, 255, 0.2) !important;
  margin: 0.5rem 0 !important;
}

/* ==================== ADVANCED SEARCH BAR ==================== */

.search-form {
  margin-left: 1rem;
  margin-right: 1.5rem;
}

.search-container {
  position: relative;
  width: 180px;
  height: 38px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container:hover {
  width: 250px;
}

.search-container:focus-within {
  width: 320px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-blue);
  font-size: 1.1rem;
  z-index: 2;
  transition: all 0.3s ease;
  pointer-events: none;
}

.search-container:focus-within .search-icon {
  color: #fff;
  transform: translateY(-50%) scale(1.1);
  filter: drop-shadow(0 0 8px var(--neon-blue));
}

.search-input {
  width: 100%;
  height: 100%;
  padding: 0.5rem 1rem 0.5rem 2.8rem;
  background: rgba(13, 21, 51, 0.4);
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-radius: 20px;
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.search-input:hover {
  background: rgba(13, 21, 51, 0.6);
  border-color: rgba(0, 212, 255, 0.4);
}

.search-input:focus {
  background: rgba(13, 21, 51, 0.8);
  border-color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4),
              inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.search-input:focus::placeholder {
  color: rgba(255, 255, 255, 0.6);
  transform: translateX(5px);
}

/* Animated glow effect removed per user request */

/* Pulse animation on hover */
.search-container:hover .search-input {
  animation: searchPulse 2s ease-in-out infinite;
}

@keyframes searchPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  }
}

.navbar-brand i {
  margin-right: 0.3rem;
  color: var(--neon-blue);
  transition: all 0.3s ease;
}

.navbar-brand:hover i {
  transform: rotateY(180deg);
  filter: drop-shadow(0 0 8px var(--neon-blue));
}

/* Animated Cards */
.card, .section-tall {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before, .section-tall::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0, 212, 255, 0.05), transparent);
  transform: rotate(0deg);
  transition: all 0.6s ease;
  pointer-events: none;
}

.card:hover::before, .section-tall:hover::before {
  transform: rotate(180deg);
}

.card:hover, .section-tall:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3), 
              0 0 60px rgba(168, 85, 247, 0.2),
              0 15px 50px rgba(0, 0, 0, 0.5);
}

/* Neon Buttons */
.btn-primary {
  position: relative;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%) !important;
  border: none !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::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-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), 0 0 60px rgba(6, 182, 212, 0.4);
}

.btn-primary:active {
  transform: translateY(-1px);
}

/* Ripple Effect */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn, .list-group-item, .card {
  position: relative;
  overflow: hidden;
}

.btn::after, .list-group-item::after, .card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(0, 212, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

.btn:active::after, .list-group-item:active::after {
  animation: ripple 0.6s ease-out;
}

/* List Group Enhancements */
.list-group-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent !important;
}

.list-group-item:hover {
  transform: translateX(10px);
  border-left-color: var(--neon-blue) !important;
  background: rgba(59, 130, 246, 0.15) !important;
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

/* Form Inputs with Glow */
.form-control:focus, .form-select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3), 
              0 0 20px rgba(0, 212, 255, 0.2) !important;
  border-color: var(--neon-blue) !important;
  transform: scale(1.01);
  transition: all 0.3s ease;
}

/* Floating Label Animation */
.form-floating label {
  transition: all 0.3s ease;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label {
  color: var(--neon-blue) !important;
  transform: translateY(-1.5rem) translateX(0.15rem) scale(0.85);
}

/* Skeleton Loading */
@keyframes skeleton-loading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, 
    rgba(27, 36, 71, 0.8) 25%, 
    rgba(59, 130, 246, 0.2) 50%, 
    rgba(27, 36, 71, 0.8) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}

/* Stagger Animation for Lists */
.animate-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerFadeIn 0.5s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(n+6) { animation-delay: 0.6s; }

@keyframes staggerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulsing Badge */
.badge {
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(13, 21, 51, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #06b6d4);
  border-radius: 6px;
  border: 2px solid rgba(13, 21, 51, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #06b6d4, #3b82f6);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Hover Lift Effect */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Neon Text */
.neon-text {
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue),
               0 0 20px var(--neon-blue),
               0 0 30px var(--neon-blue);
  animation: neonFlicker 3s ease-in-out infinite;
}

@keyframes neonFlicker {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
  }
  50% {
    opacity: 0.8;
    text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
  }
}

/* Progress Bar Animation */
.progress-bar {
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
  background-size: 200% 100%;
  animation: progressShine 2s ease infinite;
}

@keyframes progressShine {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* Tooltip Enhancement */
[title] {
  position: relative;
  cursor: help;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--neon-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page Transition */
.page-transition {
  animation: pageSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 999;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.9);
}

/* Particle Effect Background */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--neon-blue);
  border-radius: 50%;
  animation: float 3s ease-in-out infinite;
  opacity: 0.5;
  box-shadow: 0 0 10px var(--neon-blue);
}
