/* Dark mode config pro Tailwind */
@import url('https://cdn.tailwindcss.com');

/* Custom animations */
@keyframes zoomIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.zoom-in {
  animation: zoomIn 0.5s ease-out;
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* Admin Panel Specific Styles */
.sidebar-item {
  position: relative;
  overflow: hidden;
}

.sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.sidebar-item.active::before {
  transform: scaleY(1);
}

/* Stats Cards Hover Effects */
.stats-card {
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark .stats-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 300px;
}

/* Loading Spinner for Admin */
.admin-spinner {
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Notification Badge */
.notification-badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Table */
.admin-table {
  min-width: 100%;
}

.admin-table td, .admin-table th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile Navigation */
@media (max-width: 1024px) {
  .mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
  }
  
  .dark .mobile-nav {
    background: rgba(31, 41, 55, 0.95);
  }
}

/* Custom styles pro dark mode toggle */
.dark-toggle {
  transition: all 0.3s ease;
}


/* Dark mode toggle ikony */
.dark-toggle svg {
  transition: all 0.3s ease;
}

/* Sluníčko v dark mode */
.dark .dark-toggle svg {
  color: #fbbf24 !important; /* žlutá barva pro sluníčko */
}

.dark .dark-toggle:hover svg {
  color: #f59e0b !important; /* tmavší žlutá při hover */
}

/* Měsíček v light mode */
.dark-toggle svg {
  color: #6b7280; /* šedá barva pro měsíček */
}

.dark-toggle:hover svg {
  color: #374151; /* tmavší šedá při hover */
}

/* Language dropdown styles */
.language-dropdown {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Form input focus styles */
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Custom scrollbar for dropdown */
.language-dropdown::-webkit-scrollbar {
  width: 4px;
}

.language-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.language-dropdown::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 2px;
}

.language-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.7);
}

/* Button hover effects */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

/* Card shadow animation */
.login-card {
  transition: all 0.3s ease;
}
/*
.login-card:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}
  */

/* Flag image styles */
.flag-image {
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.flag-image:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

/* Logo responsive styles */
.logo {
  transition: all 0.3s ease;
}

@media (max-width: 640px) {
  .logo {
    height: 4rem;
  }
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

/* Large loading spinner for overlay */
.loading-spinner-large {
  display: inline-block;
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: #3b82f6;
  border-right-color: #06b6d4;
  animation: spin 1.2s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form validation styles */
.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Tooltip styles */
.tooltip {
  position: relative;
}

.tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 5px;
}

.tooltip:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(0, 0, 0, 0.9);
  z-index: 9999;
  pointer-events: none;
}

/* Dark mode specific styles */
.dark .login-card {
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(75, 85, 99, 0.3);
}

.dark .form-input {
  background: rgba(55, 65, 81, 0.8);
  border-color: rgba(75, 85, 99, 0.5);
}

.dark .form-input:focus {
  border-color: #3b82f6;
  background: rgba(55, 65, 81, 1);
}

.dark .language-dropdown {
  background: rgba(55, 65, 81, 0.95);
  border-color: rgba(75, 85, 99, 0.5);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .login-card {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .language-dropdown {
    min-width: 120px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.focus-visible:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ========================================
   ANIMATED BACKGROUND STYLES
======================================== */

/* Base container for animated background */
.animated-bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  background-color: #021027;
}

/* Background image with radial mask */
.background {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  mask-image: radial-gradient(
    white 0%,
    white 30%,
    transparent 80%,
    transparent
  );
  -webkit-mask-image: radial-gradient(
    white 0%,
    white 30%,
    transparent 80%,
    transparent
  );
}

/* Floating circles animations - optimized for immediate visibility */
.circle-container {
  position: absolute;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  opacity: 1; /* Okamžitě viditelné */
}

.circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  mix-blend-mode: screen;
  background-image: radial-gradient(
    hsl(180, 100%, 80%),
    hsl(180, 100%, 80%) 10%,
    hsla(180, 100%, 80%, 0) 56%
  );
  animation: fade-frames 3000ms infinite, scale-frames 4000ms infinite;
  opacity: 1; /* Okamžitě viditelné */
}

@keyframes fade-frames {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

@keyframes scale-frames {
  0% { transform: scale3d(0.6, 0.6, 1); }
  50% { transform: scale3d(1.4, 1.4, 1); }
  100% { transform: scale3d(0.6, 0.6, 1); }
}

/* Login form z-index override to stay above background */
#app {
  position: relative;
  z-index: 10;
}

/* Dark mode adjustments for background */
.dark .animated-bg-container {
  background-color: #0f172a;
}

/* Responsive adjustments for animated background */
@media (max-width: 768px) {
  .background {
    mask-image: radial-gradient(
      white 0%,
      white 40%,
      transparent 85%,
      transparent
    );
    -webkit-mask-image: radial-gradient(
      white 0%,
      white 40%,
      transparent 85%,
      transparent
    );
  }
  
  .circle {
    animation-duration: 2000ms, 3000ms; /* Rychlejší animace na mobilu */
  }
}

/* Performance optimization for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .circle-container {
    animation: none !important;
  }
  
  .circle {
    animation: fade-frames 5000ms infinite !important;
  }
}

.input {
  border: 2px solid transparent;
  width: 15em;
  height: 2.5em;
  padding-left: 0.8em;
  outline: none;
  overflow: hidden;
  background-color: #F3F3F3;
  border-radius: 10px;
  transition: all 0.5s;
}

.input:hover,
.input:focus {
  border: 2px solid #4A9DEC;
  box-shadow: 0px 0px 0px 7px rgb(74, 157, 236, 20%);
  background-color: white;
}

