
:root {
  --primary-dark: #304250;
  --primary-gray: #64748B;
  --primary-light: #F1F5F9;
  --primary-success: #10B981;
  
  /* Legacy Support */
  --primary-black: #000000;
  --primary-white: #FFFFFF;
  --accent-blue: #1D9BF0;
  
  /* Gray Scale */
  --gray-50: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-500: #64748B;
  --gray-900: #304250;
  
  /* Status Colors */
  --success: #10B981;
  --warning: #F7931A;
  --error: #E0245E;
  
  /* Layout Variables */
  --sidebar-width: 240px;
  --main-content-width: 600px;
  --right-panel-width: 290px;
  --header-height: 64px;
  
  /* Typography - Brand */
  --font-headlines: 'Comfortaa', cursive;
  --font-body: 'Urbanist', sans-serif;
  --font-primary: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', Consolas, monospace;
  
  /* Font Sizes */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 24px;
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  /* Border Radius - Booth Brand */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-full: 50%;
}

/* Dark Mode Colors - Booth Brand */
[data-theme="dark"] {
  --primary-black: #FFFFFF;
  --primary-white: #000000;
  --primary-dark: #F1F5F9;
  --primary-gray: #94A3B8;
  --primary-light: #1E293B;
  --gray-50: #1E293B;
  --gray-200: #334155;
  --gray-500: #94A3B8;
  --gray-900: #F1F5F9;
}

/* ========================================================================
  Base Styles & Typography - Booth Brand
========================================================================== */
* {
  font-family: var(--font-primary);
}

body {
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--gray-50);
}

/* Typography Hierarchy - Booth Brand */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headlines);
  font-weight: var(--font-bold);
  color: var(--primary-dark);
}

h1 {
  font-size: var(--text-2xl);
  line-height: 1.2;
}

h2 {
  font-size: var(--text-xl);
  line-height: 1.3;
}

/* Logo Typography */
.logo-text {
  font-family: var(--font-headlines);
  font-weight: var(--font-bold);
  color: var(--primary-dark);
}

.logo-text.dark {
  color: var(--primary-white);
}

/* Booth Brand Specific Styles */
.booth-logo {
  font-family: var(--font-headlines);
  font-weight: var(--font-bold);
  color: var(--primary-dark);
}

.booth-logo.dark {
  color: var(--primary-white);
}

.booth-icon {
  background: var(--primary-dark);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.booth-icon.dark {
  background: var(--primary-white);
}

/* Brand Color Utilities */
.text-booth-primary { color: var(--primary-dark); }
.text-booth-gray { color: var(--primary-gray); }
.text-booth-light { color: var(--primary-light); }
.text-booth-success { color: var(--primary-success); }

.bg-booth-primary { background-color: var(--primary-dark); }
.bg-booth-gray { background-color: var(--primary-gray); }
.bg-booth-light { background-color: var(--primary-light); }
.bg-booth-success { background-color: var(--primary-success); }

.border-booth-primary { border-color: var(--primary-dark); }
.border-booth-gray { border-color: var(--primary-gray); }
.border-booth-light { border-color: var(--primary-light); }
.border-booth-success { border-color: var(--primary-success); }

h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  line-height: 1.4;
}

/* ========================================================================
  Modern Component Styles
========================================================================== */

/* Modern clean styles */
.bg-secondary {
  background-color: var(--gray-50);
}

.border-modern {
  border: 1px solid var(--gray-200);
}

/* Button Icon - Booth Brand */
.button-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--primary-gray);
}

.button-icon:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

[data-theme="dark"] .button-icon:hover {
  background-color: var(--gray-200);
  color: var(--primary-light);
}

/* Card Modern - Booth Brand */
.card-modern {
  background: var(--primary-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.card-modern:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .card-modern {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

/* Navigation Items - Booth Brand */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--primary-gray);
  font-weight: var(--font-medium);
  border: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background-color: var(--gray-50);
  color: var(--gray-900);
}

.nav-item.active {
  background-color: var(--accent-blue);
  color: var(--primary-white);
}

.nav-item.active:hover {
  background-color: #1a8cd8; /* Slightly darker blue */
}

.nav-item svg {
  transition: color 0.2s ease;
}

.nav-item:hover svg {
  color: currentColor;
}

/* Special styling for logout button */
.nav-item.text-red-600 {
  color: var(--error);
}

.nav-item.text-red-600:hover {
  background-color: rgba(224, 36, 94, 0.1);
  color: #c53030;
}

[data-theme="dark"] .nav-item.text-red-600:hover {
  background-color: rgba(224, 36, 94, 0.2);
  color: #fc8181;
}

/* ========================================================================
  Glass Morphism & Modern Effects - Booth Brand
========================================================================== */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .glass {
  background: rgba(0, 0, 0, 0.8);
}

/* Enhanced Header Glass Effect - Warm & Human-Centered */
.header-glass {
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.4);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .header-glass {
  background: rgba(17, 24, 39, 0.90);
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15);
}

/* Logo Hover Effects - Refined & Warm */
.logo-container {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container:hover .logo-icon {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 4px 20px rgba(139, 90, 60, 0.25);
}

.logo-container:hover .logo-text {
  color: #8B5A3C;
}

/* Subtle Gradients */
.gradient-bg {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-white) 100%);
}

/* ========================================================================
  Custom Scrollbar
========================================================================== */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--gray-50);
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--gray-200);
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ========================================================================
  Animations & Transitions - Booth Brand
========================================================================== */
.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

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

.slide-up {
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
  from { 
      opacity: 0;
      transform: translateY(20px);
  }
  to { 
      opacity: 1;
      transform: translateY(0);
  }
}

/* Booth Brand Micro-interactions */
.bounce-gentle {
  animation: bounceGentle 0.6s ease;
}

@keyframes bounceGentle {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0,-8px,0);
  }
  70% {
    transform: translate3d(0,-4px,0);
  }
  90% {
    transform: translate3d(0,-2px,0);
  }
}

.scale-hover {
  transition: transform 0.2s ease;
}

.scale-hover:hover {
  transform: scale(1.05);
}

.pulse-subtle {
  animation: pulseSubtle 2s infinite;
}

@keyframes pulseSubtle {
  0% {
    box-shadow: 0 0 0 0 rgba(48, 66, 80, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(48, 66, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(48, 66, 80, 0);
  }
}

/* Smooth transitions for interactive elements */
.transition-smooth {
  transition: all 0.2s ease;
}

/* Enhanced button interactions - Subtle & Human-Centered */
.button-enhanced {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.button-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 90, 60, 0.08), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-enhanced:hover::before {
  left: 100%;
}

/* Header Icon Button Enhancement */
.header-icon-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header-icon-button:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

/* ========================================================================
  Form Elements
========================================================================== */
.input-modern {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: var(--text-base);
  transition: all 0.2s ease;
  background: var(--primary-white);
  color: var(--gray-900);
}

.input-modern:focus {
  border-color: var(--accent-blue);
  outline: 2px solid rgba(29, 155, 240, 0.2);
  outline-offset: 0;
}

/* Button Styles */
.btn-primary {
  background: var(--primary-black);
  color: var(--primary-white);
  border-radius: var(--radius-xl);
  padding: 8px 16px;
  font-weight: var(--font-medium);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--primary-white);
  color: var(--primary-black);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 8px 16px;
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-500);
}

/* ========================================================================
  Theme Toggle Switch
========================================================================== */
.theme-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  cursor: pointer;
  border-radius: 50px;
  transition: 0.4s;
}

.theme-toggle input {
  display: none;
}

.theme-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-200);
  border-radius: 50px;
  transition: 0.4s;
}

.theme-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: var(--primary-white);
  border-radius: 50px;
  transition: 0.4s;
  box-shadow: var(--shadow-sm);
}

.theme-toggle input:checked + .theme-toggle-slider {
  background-color: var(--accent-blue);
}

.theme-toggle input:checked + .theme-toggle-slider:before {
  transform: translateX(24px);
}

/* ========================================================================
  Responsive Design
========================================================================== */
@media (max-width: 768px) {
  :root {
      --sidebar-width: 100%;
      --header-height: 56px;
  }
  
  .card-modern {
      padding: 12px 16px;
  }
  
  .nav-item {
      padding: 16px;
      gap: 16px;
  }
  
  .button-icon {
      width: 44px;
      height: 44px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  :root {
      --sidebar-width: 200px;
  }
}

/* ========================================================================
  Original Components (Updated with Modern Theme)
========================================================================== */

[hidden] {
  display: none !important;
}

/* ========================================================================
  On/Off Switch (Updated)
========================================================================== */
.switch-button {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  cursor: pointer;
  border-radius: 50px;
  transition: 0.4s;
  margin: 0 7px 0 0;
  top: 4px;
  position: absolute;
  top: 2px;
  left: 0;
  background-color: var(--gray-200);
}
 
.switch input {
  display: none;
}

.switch.interactive-effect input:checked + .switch-button:before {
  animation: switch-shadow-color 0.4s;
}

.switch.interactive-effect .switch-button:before {
  animation: switch-shadow 0.4s;
}

@keyframes switch-shadow {
  0% {
      box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.3);
  }
  100% {
      box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0);
  }
}

@keyframes switch-shadow-color {
  0% {
      box-shadow: 0 0 0 0 rgba(29, 155, 240, 0.6);
  }
  100% {
      box-shadow: 0 0 0px 10px rgba(0, 0, 0, 0);
  }
}

.switch-button:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  bottom: 2px;
  left: 2px;
  transition: 0.4s, box-shadow 0.3s;
  border-radius: 50px;
  background-color: var(--primary-white);
  box-shadow: var(--shadow-sm);
}

input:checked + .switch-button {
  background-color: var(--accent-blue);
}

input:checked + .switch-button:before {
  transform: translateX(14px);
}

/* ========================================================================
  Ripple Effect (Updated)
========================================================================== */
.ripple-effect-dark {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ripple-effect {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ripple-effect span.ripple-overlay {
  animation: ripple 0.9s;
  border-radius: 100%;
  background: #fff;
  height: 12px;
  position: absolute;
  width: 12px;
  line-height: 12px;
  opacity: 0.1;
  pointer-events: none;
}

.ripple-effect-dark span.ripple-overlay {
  animation: ripple 0.9s;
  border-radius: 100%;
  background: #000;
  height: 12px;
  position: absolute;
  width: 12px;
  line-height: 12px;
  opacity: 0.07;
  pointer-events: none;
}

@keyframes ripple {
  0% {
      transform: scale(4);
  }
  100% {
      opacity: 0;
      transform: scale(40);
  }
}

/* ========================================================================
  Modal (Updated)
========================================================================== */
.uk-modal {
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.15s linear;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
} 

.uk-modal-dialog {
  transition: 0.3s ease;
  transition-property: opacity, transform;
  box-sizing: border-box;
  background: var(--primary-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ========================================================================
  Lightbox (Updated)
========================================================================== */
.uk-lightbox {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1010;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.15s linear;
  touch-action: pinch-zoom;
  transform: scale(0.95);
}

.uk-lightbox.uk-open {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.uk-lightbox-page {
  overflow: hidden;
}

.uk-lightbox-items > * {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  will-change: transform, opacity;
}

.uk-lightbox-items > * > * {
  max-width: 100vw;
  max-height: 100vh;
}

.uk-lightbox-items > * > :not(iframe) {
  width: auto;
  height: auto;
}

.uk-lightbox-items > .uk-active {
  display: flex;
}

.uk-lightbox-toolbar {
  padding: 10px 10px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  color: white;
  border-radius: var(--radius-lg);
}

.uk-lightbox-toolbar.uk-position-top {
  background-color: transparent !important;
}

.uk-lightbox-button,
.uk-lightbox-toolbar-icon {
  background-color: var(--primary-white) !important;
  color: var(--primary-black) !important;
  border-radius: var(--radius-full);
  padding: 0.5rem;
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.uk-lightbox-button:hover,
.uk-lightbox-toolbar-icon:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.uk-lightbox-toolbar-icon.uk-close {
  position: absolute;
  right: 10px;
  top: -25px;
}

.uk-transition-active .uk-lightbox-toolbar-icon.uk-close {
  top: 16px;
}

.uk-lightbox-caption {
  text-align: center;
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  padding: 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.uk-lightbox-caption:empty {
  display: none;
}

.uk-lightbox-iframe {
  width: 80%;
  height: 80%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.uk-lightbox-button[hidden] {
  display: none !important;
}

.uk-lightbox-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.15s ease;
}

.uk-lightbox-button svg > *,
.uk-lightbox-toolbar-icon.uk-close svg > * {
  stroke: var(--primary-black) !important;
}

.uk-lightbox-button.uk-position-center-right {
  right: 16px;
}

.uk-lightbox-button.uk-position-center-left {
  left: 16px;
}

.uk-lightbox-button.uk-position-center-right:hover {
  right: 12px;
}

.uk-lightbox-button.uk-position-center-left:hover {
  left: 12px;
}

/* ========================================================================
  Animations (Enhanced)
========================================================================== */
[class*="uk-animation-"] {
  animation: 0.5s ease-out both;
}

.uk-animation-fade {
  animation-name: uk-fade;
  animation-duration: 0.8s;
  animation-timing-function: ease;
}

.uk-animation-scale-up {
  animation-name: uk-fade, uk-scale-up;
}

.uk-animation-scale-down {
  animation-name: uk-fade, uk-scale-down;
}

.uk-animation-slide-top {
  animation-name: uk-fade, uk-slide-top;
}

.uk-animation-slide-bottom {
  animation-name: uk-fade, uk-slide-bottom;
}

.uk-animation-slide-left {
  animation-name: uk-fade, uk-slide-left;
}

.uk-animation-slide-right {
  animation-name: uk-fade, uk-slide-right;
}

.uk-animation-slide-top-small {
  animation-name: uk-fade, uk-slide-top-small;
}

.uk-animation-slide-bottom-small {
  animation-name: uk-fade, uk-slide-bottom-small;
}

.uk-animation-slide-left-small {
  animation-name: uk-fade, uk-slide-left-small;
}

.uk-animation-slide-right-small {
  animation-name: uk-fade, uk-slide-right-small;
}

.uk-animation-slide-top-medium {
  animation-name: uk-fade, uk-slide-top-medium;
}

.uk-animation-slide-bottom-medium {
  animation-name: uk-fade, uk-slide-bottom-medium;
}

.uk-animation-slide-left-medium {
  animation-name: uk-fade, uk-slide-left-medium;
}

.uk-animation-slide-right-medium {
  animation-name: uk-fade, uk-slide-right-medium;
}

.uk-animation-kenburns {
  animation-name: uk-kenburns;
  animation-duration: 15s;
}

.uk-animation-shake {
  animation-name: uk-shake;
}

.uk-animation-stroke {
  animation-name: uk-stroke;
  animation-duration: 2s;
  stroke-dasharray: var(--uk-animation-stroke);
}

.uk-animation-reverse {
  animation-direction: reverse;
  animation-timing-function: ease-in;
}

.uk-animation-fast {
  animation-duration: 0.1s;
}

.uk-animation-toggle:not(:hover):not(:focus) [class*="uk-animation-"] {
  animation-name: none;
}

/* Animation Keyframes */
@keyframes uk-fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes uk-scale-up {
  0% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@keyframes uk-scale-down {
  0% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes uk-slide-top {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(0); }
}

@keyframes uk-slide-bottom {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}

@keyframes uk-slide-left {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

@keyframes uk-slide-right {
  0% { transform: translateX(100%); }
  100% { transform: translateX(0); }
}

@keyframes uk-slide-top-small {
  0% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@keyframes uk-slide-bottom-small {
  0% { transform: translateY(10px); }
  100% { transform: translateY(0); }
}

@keyframes uk-slide-left-small {
  0% { transform: translateX(-10px); }
  100% { transform: translateX(0); }
}

@keyframes uk-slide-right-small {
  0% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

@keyframes uk-slide-top-medium {
  0% { transform: translateY(-50px); }
  100% { transform: translateY(0); }
}

@keyframes uk-slide-bottom-medium {
  0% { transform: translateY(50px); }
  100% { transform: translateY(0); }
}

@keyframes uk-slide-left-medium {
  0% { transform: translateX(-50px); }
  100% { transform: translateX(0); }
}

@keyframes uk-slide-right-medium {
  0% { transform: translateX(50px); }
  100% { transform: translateX(0); }
}

@keyframes uk-kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.2); }
}

@keyframes uk-shake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-9px); }
  20% { transform: translateX(8px); }
  30% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  50% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
  70% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
  90% { transform: translateX(-1px); }
}

@keyframes uk-stroke {
  0% { stroke-dashoffset: var(--uk-animation-stroke); }
  100% { stroke-dashoffset: 0; }
}

/* ========================================================================
  Transitions (Enhanced)
========================================================================== */
:where(.uk-transition-fade),
:where([class*="uk-transition-scale"]),
:where([class*="uk-transition-slide"]) {
  --uk-position-translate-x: 0;
  --uk-position-translate-y: 0;
}

.uk-transition-fade,
[class*="uk-transition-scale"],
[class*="uk-transition-slide"] {
  --uk-translate-x: 0;
  --uk-translate-y: 0;
  --uk-scale-x: 1;
  --uk-scale-y: 1;
  transform: translate(var(--uk-position-translate-x), var(--uk-position-translate-y))
             translate(var(--uk-translate-x), var(--uk-translate-y))
             scale(var(--uk-scale-x), var(--uk-scale-y));
  transition: 0.3s ease-out;
  transition-property: opacity, transform, filter;
  opacity: 0;
}

.uk-transition-toggle:hover .uk-transition-fade,
.uk-transition-toggle:focus .uk-transition-fade,
.uk-transition-toggle .uk-transition-fade:focus-within,
.uk-transition-active.uk-active .uk-transition-fade {
  opacity: 1;
}

[class*="uk-transition-scale"] {
  -webkit-backface-visibility: hidden;
}

.uk-transition-scale-up {
  --uk-scale-x: 1;
  --uk-scale-y: 1;
}

.uk-transition-scale-down {
  --uk-scale-x: 1.03;
  --uk-scale-y: 1.03;
}

.uk-transition-toggle:hover .uk-transition-scale-up,
.uk-transition-toggle:focus .uk-transition-scale-up,
.uk-transition-toggle .uk-transition-scale-up:focus-within,
.uk-transition-active.uk-active .uk-transition-scale-up {
  --uk-scale-x: 1.03;
  --uk-scale-y: 1.03;
  opacity: 1;
}

.uk-transition-toggle:hover .uk-transition-scale-down,
.uk-transition-toggle:focus .uk-transition-scale-down,
.uk-transition-toggle .uk-transition-scale-down:focus-within,
.uk-transition-active.uk-active .uk-transition-scale-down {
  --uk-scale-x: 1;
  --uk-scale-y: 1;
  opacity: 1;
}

.uk-transition-slide-top { --uk-translate-y: -100%; }
.uk-transition-slide-bottom { --uk-translate-y: 100%; }
.uk-transition-slide-left { --uk-translate-x: -100%; }
.uk-transition-slide-right { --uk-translate-x: 100%; }
.uk-transition-slide-top-small { --uk-translate-y: calc(-1 * 10px); }
.uk-transition-slide-bottom-small { --uk-translate-y: 10px; }
.uk-transition-slide-left-small { --uk-translate-x: calc(-1 * 10px); }
.uk-transition-slide-right-small { --uk-translate-x: 10px; }
.uk-transition-slide-top-medium { --uk-translate-y: calc(-1 * 50px); }
.uk-transition-slide-bottom-medium { --uk-translate-y: 50px; }
.uk-transition-slide-left-medium { --uk-translate-x: calc(-1 * 50px); }
.uk-transition-slide-right-medium { --uk-translate-x: 50px; }

.uk-transition-toggle:hover [class*="uk-transition-slide"],
.uk-transition-toggle:focus [class*="uk-transition-slide"],
.uk-transition-toggle [class*="uk-transition-slide"]:focus-within,
.uk-transition-active.uk-active [class*="uk-transition-slide"] {
  --uk-translate-x: 0;
  --uk-translate-y: 0;
  opacity: 1;
}

.uk-transition-opaque {
  opacity: 1;
}

.uk-transition-slow {
  transition-duration: 0.7s;
}

/* ========================================================================
  Simplebar (Enhanced)
========================================================================== */
[data-simplebar] {
  position: relative;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  align-items: flex-start;
  height: 100%;
}

.simplebar-wrapper {
  overflow: hidden;
  width: inherit;
  height: inherit;
  max-width: inherit;
  max-height: inherit;
}

.simplebar-mask {
  direction: inherit;
  position: absolute;
  overflow: hidden;
  padding: 0;
  margin: 0;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: auto !important;
  height: auto !important;
  z-index: 0;
}

.simplebar-offset {
  direction: inherit !important;
  box-sizing: inherit !important;
  resize: none !important;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 0;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

.simplebar-content {
  direction: inherit;
  box-sizing: border-box !important;
  position: relative;
  display: block;
  height: 100%;
  width: auto;
  visibility: visible;
  overflow: scroll;
  max-width: 100%;
  max-height: 100%;
}

.simplebar-placeholder {
  max-height: 100%;
  max-width: 100%;
  width: 100%;
  pointer-events: none;
}

.simplebar-height-auto-observer-wrapper {
  box-sizing: inherit !important;
  height: 100%;
  width: inherit;
  max-width: 1px;
  position: relative;
  float: left;
  max-height: 1px;
  overflow: hidden;
  z-index: -1;
  padding: 0;
  margin: 0;
  pointer-events: none;
  flex-grow: inherit;
  flex-shrink: 0;
  flex-basis: 0;
}

.simplebar-height-auto-observer {
  box-sizing: inherit;
  display: block;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 1000%;
  width: 1000%;
  min-height: 1px;
  min-width: 1px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.simplebar-track {
  z-index: 1;
  position: absolute;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.simplebar-scrollbar {
  position: absolute;
  right: 5px;
  width: 5px;
  min-height: 10px;
}

.simplebar-scrollbar:before {
  position: absolute;
  content: "";
  border-radius: 7px;
  left: 0;
  right: 0;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.3s ease;
  background-color: var(--gray-500);
}

.simplebar-track .simplebar-scrollbar.simplebar-visible:before {
  opacity: 0.5;
  transition: opacity 0s linear;
}

.simplebar-track.simplebar-vertical {
  top: 0;
  width: 10px;
}

.simplebar-track.simplebar-vertical .simplebar-scrollbar:before {
  top: 2px;
  bottom: 2px;
}

.simplebar-track.simplebar-horizontal {
  left: 0;
  height: 11px;
}

.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before {
  height: 100%;
  left: 2px;
  right: 2px;
}

.simplebar-track.simplebar-horizontal .simplebar-scrollbar {
  right: auto;
  left: 0;
  top: 2px;
  height: 7px;
  min-height: 0;
  min-width: 10px;
  width: auto;
}

[data-simplebar-direction="rtl"] .simplebar-track.simplebar-vertical {
  right: auto;
  left: 0;
}

.hs-dummy-scrollbar-size {
  direction: rtl;
  position: fixed;
  opacity: 0;
  visibility: hidden;
  height: 500px;
  width: 500px;
  overflow-y: hidden;
  overflow-x: scroll;
}

/* ========================================================================
  Slider and Slideshow (Enhanced)
========================================================================== */
.uk-slider, .uk-slideshow { 
  -webkit-tap-highlight-color: transparent;
} 

.uk-slider-items, .uk-slideshow-items{ 
  touch-action: pan-y;
  -webkit-touch-callout: none;
}

.uk-slideshow-items > * { 
  will-change: transform, opacity;
}

/* ========================================================================
  Transform Origins
========================================================================== */
.uk-transform-origin-top-left { transform-origin: 0 0; }
.uk-transform-origin-top-center { transform-origin: 50% 0; }
.uk-transform-origin-top-right { transform-origin: 100% 0; }
.uk-transform-origin-center-left { transform-origin: 0 50%; }
.uk-transform-origin-center-right { transform-origin: 100% 50%; }
.uk-transform-origin-bottom-left { transform-origin: 0 100%; }
.uk-transform-origin-bottom-center { transform-origin: 50% 100%; }
.uk-transform-origin-bottom-right { transform-origin: 100% 100%; }

/* ========================================================================
  Modern Social Media Specific Components
========================================================================== */

/* Post Cards */
.post-card {
  background: var(--primary-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  overflow: hidden;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-500);
}

/* Avatar Styles */
.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.avatar-md {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.avatar-xl {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

/* Action Buttons */
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--gray-500);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.action-btn:hover {
  background-color: var(--gray-50);
  color: var(--gray-900);
}

.action-btn.liked {
  color: var(--error);
}

.action-btn.liked:hover {
  background-color: rgba(224, 36, 94, 0.1);
}

/* Notification Badge */
.notification-badge {
  background: var(--error);
  color: var(--primary-white);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

/* Status Indicators */
.status-online {
  background: var(--success);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-white);
}

.status-away {
  background: var(--warning);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-white);
}

.status-offline {
  background: var(--gray-500);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-white);
}

/* Progress Bars */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-blue);
  transition: width 0.3s ease;
  border-radius: var(--radius-sm);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-50) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

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

.skeleton-text {
  height: 16px;
  border-radius: var(--radius-sm);
}

.skeleton-avatar {
  border-radius: var(--radius-full);
}

.skeleton-button {
  height: 36px;
  border-radius: var(--radius-lg);
}

/* Emoji Picker */
.emoji-picker {
  background: var(--primary-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  max-width: 280px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.emoji-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.emoji-btn:hover {
  background: var(--gray-50);
  transform: scale(1.1) translateY(-2px);
}

/* Mentions */
.mention {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: var(--font-medium);
}

.mention:hover {
  text-decoration: underline;
}

/* Hashtags */
.hashtag {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: var(--font-medium);
}

.hashtag:hover {
  text-decoration: underline;
}

/* Media Grid */
.media-grid {
  display: grid;
  gap: 8px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.media-grid.single {
  grid-template-columns: 1fr;
}

.media-grid.dual {
  grid-template-columns: 1fr 1fr;
}

.media-grid.triple .media-item:first-child {
  grid-column: 1 / -1;
}

.media-grid.quad {
  grid-template-columns: 1fr 1fr;
}

.media-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-item:hover img {
  transform: scale(1.05);
}

/* Comment Threading */
.comment-thread {
  border-left: 2px solid var(--gray-200);
  margin-left: 20px;
  padding-left: 16px;
}

.comment-reply {
  margin-left: 32px;
  padding-left: 16px;
  border-left: 1px solid var(--gray-200);
}

/* Search Highlights */
.search-highlight {
  background: rgba(29, 155, 240, 0.2);
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  font-weight: var(--font-medium);
}

/* Verified Badge */
.verified-badge {
  color: var(--accent-blue);
  width: 16px;
  height: 16px;
}

/* Loading Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top: 2px solid var(--accent-blue);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

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

/* ========================================================================
  Dark Mode Enhancements
========================================================================== */
[data-theme="dark"] .card-modern {
  background: var(--primary-white);
  border-color: var(--gray-200);
}

[data-theme="dark"] .post-card {
  background: var(--primary-white);
  border-color: var(--gray-200);
}

[data-theme="dark"] .input-modern {
  background: var(--primary-white);
  border-color: var(--gray-200);
  color: var(--gray-900);
}

[data-theme="dark"] .btn-secondary {
  background: var(--primary-white);
  color: var(--primary-black);
  border-color: var(--gray-200);
}

[data-theme="dark"] .emoji-picker {
  background: var(--primary-white);
  border-color: var(--gray-200);
}

[data-theme="dark"] .notification-badge {
  background: var(--error);
  color: var(--primary-white);
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-50) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
}

/* ========================================================================
  Accessibility Improvements
========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
  }
}

/* Focus indicators */
.nav-item:focus,
.button-icon:focus,
.action-btn:focus,
.emoji-btn:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card-modern,
  .post-card {
      border-width: 2px;
  }
  
  .nav-item:hover,
  .button-icon:hover,
  .action-btn:hover {
      border: 2px solid currentColor;
  }
}

/* ========================================================================
  Print Styles
========================================================================== */
@media print {
  .nav-item,
  .button-icon,
  .action-btn,
  .emoji-picker {
      display: none !important;
  }
  
  .card-modern,
  .post-card {
      border: 1px solid #000 !important;
      box-shadow: none !important;
  }
  
  * {
      background: white !important;
      color: black !important;
  }
}

/* ========================================================================
  Modern Lightbox Component Styles
========================================================================== */

/* Hide scrollbar utility */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Smooth zoom transitions */
.transform-gpu {
  transform: translateZ(0);
  will-change: transform;
}

/* Enhanced backdrop blur support */
@supports (backdrop-filter: blur(12px)) {
  .backdrop-blur-xl {
    backdrop-filter: blur(12px) saturate(150%);
  }
  
  .backdrop-blur-md {
    backdrop-filter: blur(8px) saturate(130%);
  }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
  .backdrop-blur-xl {
    background-color: rgba(0, 0, 0, 0.8) !important;
  }
  
  .backdrop-blur-md {
    background-color: rgba(0, 0, 0, 0.6) !important;
  }
}

/* Enhanced focus states for lightbox controls */
.lightbox-control:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
  .lightbox-control {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Adjust lightbox padding for mobile */
  .lightbox-container {
    padding: 1rem !important;
  }
  
  /* Make navigation dots larger on mobile */
  .lightbox-dots button {
    width: 12px !important;
    height: 12px !important;
    margin: 0 4px !important;
  }
}

/* Smooth image loading animation */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-image {
  animation: fadeInScale 0.5s ease-out;
}

/* Enhanced loading spinner for lightbox */
.lightbox-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: lightbox-spin 1s linear infinite;
}

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

/* Custom cursor styles for zoom */
.cursor-zoom-in {
  cursor: zoom-in;
}

.cursor-zoom-out {
  cursor: zoom-out;
}

/* Enhanced drop shadow for lightbox images */
.lightbox-shadow {
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.6))
          drop-shadow(0 12px 25px rgba(0, 0, 0, 0.4));
}

/* Smooth transitions for all lightbox elements */
.lightbox-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Better contrast for lightbox text */
.lightbox-text {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* High contrast mode support for lightbox */
@media (prefers-contrast: high) {
  .lightbox-control {
    background-color: rgba(0, 0, 0, 0.9) !important;
    border: 2px solid white !important;
  }
  
  .lightbox-text {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
  }
}

/* Reduced motion support for lightbox */
@media (prefers-reduced-motion: reduce) {
  .lightbox-image,
  .lightbox-control,
  .lightbox-transition {
    animation: none !important;
    transition: none !important;
  }
  
  .lightbox-spinner {
    animation: none !important;
    border: 3px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 50%;
  }
}