/* Premium Glassmorphism Dark Theme for Moonshard MU */

:root {
  /* Colors */
  --bg-dark: #07070a;
  --bg-panel: rgba(18, 18, 22, 0.6);
  --bg-panel-hover: rgba(25, 25, 30, 0.7);
  --color-accent: #00d2ff;
  --color-accent-glow: rgba(0, 210, 255, 0.6);
  --color-accent-secondary: #3a7bd5;
  --color-gold: #f3d45e;
  --color-gold-glow: rgba(243, 212, 94, 0.4);
  --color-danger: #ff4b4b;
  --color-success: #00e676;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a0a5b5;
  --text-muted: #6b7280;

  /* Typography */
  --font-logo: 'Cinzel', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;

  /* UI Elements */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

  /* MU Specific */
  --color-mu-gold: #ffcc33;
  --color-mu-red: #ff3333;

  /* Animation */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  /* Modern clean abstract background */
  background-image:
    radial-gradient(circle at 15% 50%, rgba(58, 123, 213, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(0, 210, 255, 0.1), transparent 25%),
    linear-gradient(to bottom, var(--bg-dark) 0%, #0d0e15 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Animated Orbs */
.embers-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
  animation: floatOrb 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: var(--color-accent-secondary);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(138, 43, 226, 0.3);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(50px, 30px) scale(1.1);
  }

  100% {
    transform: translate(-20px, 50px) scale(0.9);
  }
}

/* Page Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 10;
}

/* Responsive Grid applied inside main tag */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  padding: 3rem 0;
  align-items: start;
}

.main-layout-full {
  display: block;
  padding: 3rem 0;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  position: relative;
  z-index: 20;
}

.nav-brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.nav-logo {
  font-family: var(--font-logo);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff 0%, var(--color-mu-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.nav-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-normal);
  padding: 0.5rem 0;
  position: relative;
}

.nav-menu a:hover {
  color: #fff;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition-normal);
  border-radius: 2px;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-btn.btn-primary {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}


/* Glass Panels */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.panel-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.panel-title i {
  color: var(--color-accent);
}

/* Hero Section */
.hero-banner {
  height: 400px;
  position: relative;
  border-radius: var(--border-radius);
  margin-bottom: 2.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/hero_banner.png');
  background-size: cover;
  background-position: center 20%;
  transition: transform 10s ease-out;
  z-index: -1;
}

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

.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(7, 7, 10, 0.9) 0%, rgba(7, 7, 10, 0.2) 60%, transparent 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8), 0 0 20px var(--color-accent-glow);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Class Showcase */
.section-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin: 4rem 0 2.5rem;
  color: white;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.class-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  text-decoration: none;
  min-height: 280px;
}

.class-card.locked {
  filter: grayscale(1) opacity(0.6);
  cursor: not-allowed;
  pointer-events: none;
}

.class-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--color-mu-gold);
  box-shadow: 0 15px 40px rgba(243, 212, 94, 0.2);
}

.class-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.class-card:hover img {
  transform: scale(1.1);
}

.class-card-content {
  padding: 1.5rem;
  text-align: center;
  position: relative;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.class-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-mu-gold);
  margin-bottom: 0.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.class-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.class-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

.locked-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--color-mu-gold);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--color-mu-gold);
  z-index: 2;
  text-transform: uppercase;
}

.dashboard-create-widget .class-option {
  display: flex;
  align-items: center;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #fff;
}

.dashboard-create-widget .class-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-mu-gold);
  transform: translateX(5px);
}

.dashboard-create-widget .class-option.locked {
  opacity: 0.5;
  filter: grayscale(1);
  pointer-events: none;
}

.dashboard-create-widget .class-icon-xs {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 0.8rem;
  border: 1px solid var(--color-mu-gold);
}

/* Sidebar Widgets */
.sidebar-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.widget {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-title .status-indicator {
  font-size: 0.8rem;
  color: var(--color-success);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 230, 118, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.widget-title .status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

.widget-list {
  list-style: none;
}

.widget-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.widget-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget-list li span {
  color: #fff;
  font-weight: 500;
  font-family: var(--font-heading);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-secondary) 0%, var(--color-accent) 100%);
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.5);
  background: linear-gradient(135deg, #458cf5 0%, #15d8ff 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(255, 75, 75, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(255, 75, 75, 0.3);
}

.btn-danger:hover {
  background: var(--color-danger);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 75, 75, 0.4);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* Forms */
.form-container {
  max-width: 450px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-normal);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 1rem;
}

.data-table th {
  text-align: left;
  padding: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  vertical-align: middle;
}

.class-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-mu-gold);
  margin-right: 0.8rem;
  vertical-align: middle;
}

.char-icon-dashboard {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-mu-gold);
  box-shadow: 0 0 10px rgba(243, 212, 94, 0.3);
  margin-right: 1rem;
}

.dashboard-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.highlight-text {
  color: var(--color-mu-gold);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 184, 0, 0.4);
}

/* Card Grids (for Info/Downloads) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1.5rem;
  transition: var(--transition-normal);
}

.card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.card h4 {
  color: #fff;
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Flash Messages */
.flash-container {
  margin-bottom: 2rem;
}

.flash {
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
  animation: slideInDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flash.success {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: #00e676;
}

.flash.error {
  background: rgba(255, 75, 75, 0.1);
  border: 1px solid rgba(255, 75, 75, 0.3);
  color: #ff4b4b;
}

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

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

/* Action Groups */
.action-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Footer */
.main-footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 992px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .navbar {
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .glass-panel {
    padding: 1.5rem;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}
/* --- New Features --- */

#event-timers li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

#event-timers li:last-child {
  border-bottom: none;
}

.timer {
  font-family: 'Inter', monospace;
  font-size: 1rem;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  color: var(--color-mu-gold);
}

.widget-list li span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Security Logs Table Specifics */
.security-event-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(52, 152, 219, 0.1);
  color: #3498db;
}

/* Marketplace Card Enhancement */
[style*="borderColor='rgba(255,184,0,0.3)'"] {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 184, 0, 0.1) !important;
}
