/* Glassmorphism Multi-Color Dark Theme */
:root {
  /* Light Theme Variables */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(13, 71, 161, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(13, 71, 161, 0.1);

  /* Transition for smooth theme switching */
  --transition-speed: 0.3s;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --glass-bg: rgba(15, 41, 66, 0.7);
  --glass-border: rgba(144, 202, 249, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* Global Styles */
html {
  transition: background-color var(--transition-speed) ease;
}

body {
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

[data-theme="dark"] body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-opacity='0.05'%3E%3Cpolygon fill='%2390CAF9' points='50 0 60 40 100 50 60 60 50 100 40 60 0 50 40 40'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

/* Glassmorphism Effect */
.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Header Styles */
[data-theme="dark"] header {
  background: linear-gradient(135deg, #1976d2, #0d47a1);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] header .container {
  background: rgba(15, 41, 66, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] header h1 {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(144, 202, 249, 0.5);
}

[data-theme="dark"] nav ul li a {
  color: #ffffff;
  transition: all 0.3s ease;
}

[data-theme="dark"] nav ul li a:hover {
  color: #90caf9;
  text-shadow: 0 0 10px rgba(144, 202, 249, 0.7);
  text-decoration: none;
  transform: translateY(-2px);
}

/* Cards and Containers - Multi-color variants */
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .stats-card,
[data-theme="dark"] .search-card,
[data-theme="dark"] .search-results,
[data-theme="dark"] .employee-info-card,
[data-theme="dark"] .login-form,
[data-theme="dark"] .violation-form,
[data-theme="dark"] .employee-form,
[data-theme="dark"] .department-form,
[data-theme="dark"] .stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Multi-color card borders */
[data-theme="dark"] .dashboard-card {
  border-top: 3px solid var(--accent-primary);
}

[data-theme="dark"] .stats-card:nth-child(1) {
  border-top: 3px solid var(--accent-primary);
}

[data-theme="dark"] .stats-card:nth-child(2) {
  border-top: 3px solid var(--accent-purple);
}

[data-theme="dark"] .stats-card:nth-child(3) {
  border-top: 3px solid var(--accent-teal);
}

[data-theme="dark"] .stats-card:nth-child(4) {
  border-top: 3px solid var(--accent-amber);
}

[data-theme="dark"] .search-card {
  border-top: 3px solid var(--accent-purple);
}

[data-theme="dark"] .search-results {
  border-top: 3px solid var(--accent-teal);
}

[data-theme="dark"] .employee-info-card {
  border-top: 3px solid var(--accent-amber);
}

[data-theme="dark"] .login-form {
  border-top: 3px solid var(--accent-primary);
}

[data-theme="dark"] .violation-form {
  border-top: 3px solid var(--accent-red);
}

[data-theme="dark"] .employee-form {
  border-top: 3px solid var(--accent-green);
}

[data-theme="dark"] .department-form {
  border-top: 3px solid var(--accent-purple);
}

[data-theme="dark"] .dashboard-card:hover,
[data-theme="dark"] .stats-card:hover,
[data-theme="dark"] .search-card:hover,
[data-theme="dark"] .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.7);
}

/* Multi-color stat cards */
[data-theme="dark"] .stat-card:nth-child(1) {
  border-top: 3px solid var(--accent-primary);
}

[data-theme="dark"] .stat-card:nth-child(1) i {
  color: var(--accent-primary);
}

[data-theme="dark"] .stat-card:nth-child(2) {
  border-top: 3px solid var(--accent-purple);
}

[data-theme="dark"] .stat-card:nth-child(2) i {
  color: var(--accent-purple);
}

[data-theme="dark"] .stat-card:nth-child(3) {
  border-top: 3px solid var(--accent-teal);
}

[data-theme="dark"] .stat-card:nth-child(3) i {
  color: var(--accent-teal);
}

[data-theme="dark"] .stat-card:nth-child(4) {
  border-top: 3px solid var(--accent-amber);
}

[data-theme="dark"] .stat-card:nth-child(4) i {
  color: var(--accent-amber);
}

/* Tables */
[data-theme="dark"] .stats-table th {
  background-color: rgba(144, 202, 249, 0.1);
  color: var(--text-primary);
  border-bottom: 1px solid rgba(144, 202, 249, 0.1);
}

[data-theme="dark"] .stats-table td {
  border-bottom: 1px solid rgba(144, 202, 249, 0.05);
}

[data-theme="dark"] .stats-table tr:hover {
  background-color: rgba(144, 202, 249, 0.05);
}

/* Form Elements */
[data-theme="dark"] .form-control {
  background: rgba(15, 41, 66, 0.6);
  border: 1px solid rgba(144, 202, 249, 0.1);
  color: var(--text-primary);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

[data-theme="dark"] .form-control:focus {
  background: rgba(26, 58, 95, 0.8);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(144, 202, 249, 0.25);
}

[data-theme="dark"] .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Multi-color Buttons */
[data-theme="dark"] .btn {
  background: linear-gradient(135deg, #1976d2, #0d47a1);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

[data-theme="dark"] .btn:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(144, 202, 249, 0.1), rgba(144, 202, 249, 0));
  transition: all 0.4s ease;
  z-index: -1;
}

[data-theme="dark"] .btn:hover:before {
  left: 0;
}

[data-theme="dark"] .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-secondary {
  background: linear-gradient(135deg, #7e57c2, #673ab7);
}

[data-theme="dark"] .btn-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-edit {
  background: linear-gradient(135deg, #00acc1, #0097a7);
}

[data-theme="dark"] .btn-delete {
  background: linear-gradient(135deg, #f4511e, #e64a19);
}

/* Dashboard Navigation */
[data-theme="dark"] .dashboard-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 15px;
  overflow: hidden;
}

[data-theme="dark"] .dashboard-nav a {
  color: var(--text-primary);
  border-right: 1px solid rgba(144, 202, 249, 0.05);
  transition: all 0.3s ease;
}

[data-theme="dark"] .dashboard-nav a.active {
  background: linear-gradient(135deg, #1976d2, #0d47a1);
  color: white;
}

[data-theme="dark"] .dashboard-nav a:hover:not(.active) {
  background: rgba(144, 202, 249, 0.05);
}

/* Multi-color Alerts */
[data-theme="dark"] .alert {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 10px;
}

[data-theme="dark"] .alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

[data-theme="dark"] .alert-danger {
  background-color: rgba(244, 67, 54, 0.1);
  color: #e57373;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Headings */
[data-theme="dark"] h2 {
  color: var(--accent-primary);
  border-bottom: 2px solid rgba(144, 202, 249, 0.3);
  text-shadow: 0 0 10px rgba(144, 202, 249, 0.2);
}

[data-theme="dark"] h3 {
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(144, 202, 249, 0.2);
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgba(15, 41, 66, 0.7);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #1976d2;
  border-radius: 5px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #1565c0;
}

/* Multi-color Animations */
@keyframes glow-blue {
  0% {
    box-shadow: 0 0 5px rgba(144, 202, 249, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(144, 202, 249, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(144, 202, 249, 0.5);
  }
}

@keyframes glow-purple {
  0% {
    box-shadow: 0 0 5px rgba(206, 147, 216, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(206, 147, 216, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(206, 147, 216, 0.5);
  }
}

@keyframes glow-teal {
  0% {
    box-shadow: 0 0 5px rgba(128, 203, 196, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(128, 203, 196, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(128, 203, 196, 0.5);
  }
}

@keyframes glow-amber {
  0% {
    box-shadow: 0 0 5px rgba(255, 183, 77, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 183, 77, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 183, 77, 0.5);
  }
}

/* Apply different glow animations to different elements */
[data-theme="dark"] .stat-card:nth-child(1) {
  animation: glow-blue 3s infinite;
}

[data-theme="dark"] .stat-card:nth-child(2) {
  animation: glow-purple 3s infinite;
}

[data-theme="dark"] .stat-card:nth-child(3) {
  animation: glow-teal 3s infinite;
}

[data-theme="dark"] .stat-card:nth-child(4) {
  animation: glow-amber 3s infinite;
}

/* Multi-color neon text effect */
[data-theme="dark"] .neon-text {
  color: #fff;
  text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #90caf9, 0 0 20px #90caf9, 0 0 25px #90caf9;
}

/* Stats Card Icons - Multi-color */
[data-theme="dark"] .stat-card:nth-child(1) i {
  text-shadow: 0 0 15px rgba(144, 202, 249, 0.5);
}

[data-theme="dark"] .stat-card:nth-child(2) i {
  text-shadow: 0 0 15px rgba(206, 147, 216, 0.5);
}

[data-theme="dark"] .stat-card:nth-child(3) i {
  text-shadow: 0 0 15px rgba(128, 203, 196, 0.5);
}

[data-theme="dark"] .stat-card:nth-child(4) i {
  text-shadow: 0 0 15px rgba(255, 183, 77, 0.5);
}

/* Multi-color stat values */
[data-theme="dark"] .stat-card:nth-child(1) .stat-value {
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(144, 202, 249, 0.3);
}

[data-theme="dark"] .stat-card:nth-child(2) .stat-value {
  color: var(--accent-purple);
  text-shadow: 0 0 10px rgba(206, 147, 216, 0.3);
}

[data-theme="dark"] .stat-card:nth-child(3) .stat-value {
  color: var(--accent-teal);
  text-shadow: 0 0 10px rgba(128, 203, 196, 0.3);
}

[data-theme="dark"] .stat-card:nth-child(4) .stat-value {
  color: var(--accent-amber);
  text-shadow: 0 0 10px rgba(255, 183, 77, 0.3);
}

/* Employee Info Styling */
[data-theme="dark"] .employee-info p {
  background: rgba(144, 202, 249, 0.05);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(144, 202, 249, 0.1);
}

/* Login Container Glow - Multi-color */
[data-theme="dark"] .login-container {
  position: relative;
}

[data-theme="dark"] .login-container::after {
  content: "";
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background: linear-gradient(45deg, #1976d2, #7e57c2, #00acc1, #f4511e, #1976d2);
  background-size: 400% 400%;
  z-index: -1;
  border-radius: 25px;
  filter: blur(20px);
  opacity: 0.3;
  animation: multiColorGradient 15s ease infinite;
}

@keyframes multiColorGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
