/**
 * QRENA MODERN UI - 2026 DESIGN UPDATE
 * Glassmorphism, Premium Buttons, Modern Aesthetics
 *
 * USAGE: Add to lehrkraft.html in <head>:
 * <link rel="stylesheet" href="css/qrena-modern-ui.css">
 */

/* ==================== ROOT VARIABLES ==================== */

:root {
  /* Enhanced Colors */
  --qr-primary: #3b82f6;
  --qr-primary-dark: #1d4ed8;
  --qr-primary-light: #60a5fa;
  --qr-secondary: #8b5cf6;
  --qr-success: #10b981;
  --qr-danger: #ef4444;
  --qr-warning: #f59e0b;

  /* Glassmorphism */
  --glass-bg: rgba(31, 41, 55, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover-bg: rgba(31, 41, 55, 0.8);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ==================== GLASSMORPHISM CARDS ==================== */

.card-glass {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--shadow-lg) !important;
  transition: all var(--transition-base);
}

.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Apply to existing cards */
.card {
  border-radius: 16px;
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
}

/* ==================== PREMIUM BUTTONS ==================== */

/* Primary Button */
.btn-primary,
button[type="submit"]:not(.btn-ghost):not(.btn-danger) {
  background: linear-gradient(135deg, var(--qr-primary) 0%, var(--qr-primary-dark) 100%) !important;
  border: 1px solid rgba(96, 165, 250, 0.3) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
  color: white !important;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.btn-primary:hover,
button[type="submit"]:not(.btn-ghost):not(.btn-danger):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5) !important;
  border-color: rgba(96, 165, 250, 0.5) !important;
}

/* Shine Effect */
.btn-primary::before,
button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left var(--transition-slow);
}

.btn-primary:hover::before,
button[type="submit"]:hover::before {
  left: 100%;
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, var(--qr-success) 0%, #059669 100%) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.btn-success:hover {
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5) !important;
}

/* Ghost Button */
.btn-ghost {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--glass-border) !important;
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, var(--qr-danger) 0%, #dc2626 100%) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.btn-danger:hover {
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5) !important;
}

/* ==================== TYPOGRAPHY ==================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--qr-primary-light) 0%, var(--qr-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== INPUTS ==================== */

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
  background: rgba(0, 0, 0, 0.2) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--qr-primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
  background: rgba(0, 0, 0, 0.3) !important;
}

/* ==================== BADGES ==================== */

.badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--qr-primary-light);
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* ==================== ANIMATIONS ==================== */

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

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
  animation: slideInDown 0.5s ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* ==================== LOADING STATES ==================== */

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--qr-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

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

/* ==================== TOOLTIPS ==================== */

[data-tooltip] {
  position: relative;
  cursor: help;
}

.sidebar-nav-item[data-tooltip] {
  cursor: pointer;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 0.85rem;
  white-space: nowrap;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .card-glass:hover {
    transform: none;
  }
}

/* ==================== ACCESSIBILITY ==================== */

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

/* ==================== PRINT ==================== */

@media print {
  .card-glass {
    background: white !important;
    border: 1px solid #ccc !important;
  }

  .btn-primary,
  .btn-success,
  .btn-danger {
    background: #333 !important;
    color: white !important;
  }
}
