/* Modern Creative UI Variables */
:root {
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
  --surface-color: rgba(255, 255, 255, 0.9);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base & Typography */
body {
  font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--text-primary);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: block;
  /* Overriding flex to allow proper layout flow */
}

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

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Layout Container */
.container {
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  padding: 40px;
  width: 95%;
  max-width: 1200px;
  margin: 20px auto;
  transition: transform 0.3s ease;
}

/* Typography Enhancements */
h1 {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  text-align: center;
  border-bottom: none;
  font-size: 2.5rem;
  margin-bottom: 30px;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

h2 {
  color: #334155;
  border-bottom: none;
  font-weight: 700;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-5px) rotate(1deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  /* Star hidden */
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.delay-0 {
  animation-delay: 0s;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

/* Enhanced Table */
#courses-table {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: white;
  margin-top: 0;
  /* Reset */
}

#courses-table thead {
  background: var(--secondary-gradient);
  color: white;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

#courses-table th {
  padding: 18px;
  font-weight: 600;
  border: none;
}

#courses-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

#courses-table tbody tr:hover {
  background-color: #f8fafc;
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
  position: relative;
}

#courses-table td {
  padding: 16px;
  color: var(--text-secondary);
}

/* Action Buttons */
.edit-btn,
.delete-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
}

.edit-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.edit-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.delete-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.delete-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

/* Sticky Notes */
.note-card {
  perspective: 1000px;
}

.note-content {
  font-family: 'Comic Neue', cursive, sans-serif;
  /* Fallback to creative font */
  background: #fef3c7;
  color: #4b5563;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 2px 2px 15px 2px;
  transform: rotate(var(--rotation));
  transition: all 0.3s ease;
}

.note-content:hover {
  transform: scale(1.05) rotate(0deg);
  box-shadow: 4px 8px 16px rgba(0, 0, 0, 0.15);
  z-index: 20;
}

/* Stats Cards */
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #f1f5f9;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Tabs */
.nav-tab {
  position: relative;
  overflow: hidden;
}

.nav-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-tab:hover::after,
.nav-tab.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-tab.active {
  color: #6366f1;
  /* Indigo-500 */
}

/* Inputs & Forms */
input[type="text"],
input[type="file"],
select,
textarea {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  background: white;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Ad Container */
.ad-container {
  border-radius: 12px;
  border: 2px dashed rgba(99, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.5);
}