/* Import Inria Serif font */
@import url('https://fonts.googleapis.com/css2?family=Inria+Serif:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inria Serif', Georgia, serif;
  background: #000000;
  color: #FFFFFF;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Enhanced background with animated blob shapes */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse 500px 400px at 40% 40%, rgba(131, 115, 228, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 450px 500px at 60% 40%, rgba(150, 100, 250, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 480px 380px at 50% 60%, rgba(100, 100, 250, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 400px 450px at 30% 70%, rgba(131, 115, 228, 0.18) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
  animation: blobMove 20s ease-in-out infinite;
  mix-blend-mode: screen;
}

/* Floating animated blobs */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse 400px 350px at 50% 30%, rgba(150, 100, 250, 0.18) 0%, transparent 62%),
    radial-gradient(ellipse 350px 450px at 40% 60%, rgba(100, 100, 250, 0.14) 0%, transparent 62%),
    radial-gradient(ellipse 450px 320px at 70% 70%, rgba(131, 115, 228, 0.12) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 25s ease-in-out infinite reverse;
  mix-blend-mode: screen;
}

/* Additional floating elements */
.floating-blob-1 {
  position: fixed;
  width: 350px;
  height: 250px;
  background: radial-gradient(ellipse, rgba(150, 100, 250, 0.22) 0%, transparent 72%);
  border-radius: 50%;
  top: 25%;
  left: 30%;
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 30s ease-in-out infinite;
  filter: blur(50px);
  mix-blend-mode: screen;
}

.floating-blob-2 {
  position: fixed;
  width: 300px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(100, 100, 250, 0.18) 0%, transparent 72%);
  border-radius: 50%;
  top: 45%;
  right: 35%;
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 35s ease-in-out infinite reverse;
  filter: blur(45px);
  mix-blend-mode: screen;
}

.floating-blob-3 {
  position: fixed;
  width: 280px;
  height: 350px;
  background: radial-gradient(ellipse, rgba(131, 115, 228, 0.16) 0%, transparent 72%);
  border-radius: 50%;
  bottom: 30%;
  left: 50%;
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 40s ease-in-out infinite;
  filter: blur(42px);
  mix-blend-mode: screen;
}

/* Keyframe animations for blob movement */
@keyframes blobMove {
  0%, 100% { 
    transform: translate(0, 0) scale(1);
    opacity: 0.8;
  }
  25% { 
    transform: translate(20px, -30px) scale(1.1);
    opacity: 0.6;
  }
  50% { 
    transform: translate(-15px, 20px) scale(0.9);
    opacity: 0.9;
  }
  75% { 
    transform: translate(30px, 10px) scale(1.05);
    opacity: 0.7;
  }
}

@keyframes blobFloat {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.6;
  }
  33% { 
    transform: translate(-25px, -20px) rotate(120deg);
    opacity: 0.8;
  }
  66% { 
    transform: translate(20px, -35px) rotate(240deg);
    opacity: 0.4;
  }
}

@keyframes blobDrift {
  0%, 100% { 
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  20% { 
    transform: translate(40px, -20px) scale(1.2);
    opacity: 0.7;
  }
  40% { 
    transform: translate(-30px, 30px) scale(0.8);
    opacity: 0.3;
  }
  60% { 
    transform: translate(20px, -40px) scale(1.1);
    opacity: 0.6;
  }
  80% { 
    transform: translate(-20px, 20px) scale(0.9);
    opacity: 0.4;
  }
}

/* Additional particle effects */
.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  background: rgba(131, 115, 228, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.particle-1 {
  top: 20%;
  left: 10%;
  animation: particleFloat 15s ease-in-out infinite;
}

.particle-2 {
  top: 40%;
  right: 15%;
  animation: particleFloat 20s ease-in-out infinite reverse;
}

.particle-3 {
  bottom: 30%;
  left: 25%;
  animation: particleFloat 18s ease-in-out infinite;
}

.particle-4 {
  top: 70%;
  right: 30%;
  animation: particleFloat 22s ease-in-out infinite reverse;
}

.particle-5 {
  top: 15%;
  right: 40%;
  animation: particleFloat 16s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { 
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% { 
    transform: translate(30px, -20px) scale(1.5);
    opacity: 0.6;
  }
  50% { 
    transform: translate(-20px, -40px) scale(0.8);
    opacity: 0.2;
  }
  75% { 
    transform: translate(40px, 20px) scale(1.2);
    opacity: 0.5;
  }
}

/* Enhanced glassmorphism with better blur effects */
.metric-card {
  background: rgba(131, 115, 228, 0.12);
  backdrop-filter: blur(35px) saturate(1.3);
  border: 1px solid rgba(131, 115, 228, 0.35);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(131, 115, 228, 0.5), transparent);
}

.metric-card:hover {
  background: rgba(131, 115, 228, 0.16);
  border-color: rgba(131, 115, 228, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(131, 115, 228, 0.2);
  backdrop-filter: blur(40px) saturate(1.4);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(131, 115, 228, 0.2);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.logo {
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: #FFFFFF;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-line {
  width: 24px;
  height: 2px;
  background: #ffffff;
  transition: all 0.3s ease;
}

/* Hamburger Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.menu-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.menu-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

.menu-content {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 320px;
  background: rgba(131, 115, 228, 0.12);
  backdrop-filter: blur(35px) saturate(1.3);
  border-left: 1px solid rgba(131, 115, 228, 0.35);
  padding: 24px;
  box-shadow: -15px 0 35px rgba(131, 115, 228, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.menu-overlay:not(.hidden) .menu-content {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-title {
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
}

.menu-close {
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.3s ease;
}

.menu-close:hover {
  transform: rotate(90deg);
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  text-decoration: none;
  color: #FFFFFF;
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(131, 115, 228, 0.35);
  transform: translateX(-4px);
}

.menu-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.menu-text {
  flex: 1;
}

/* Main content */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 40px;
  min-height: calc(100vh - 80px);
  position: relative;
  z-index: 1;
}

/* Enhanced glassmorphism button */
.dashboard-button {
  background: rgba(131, 115, 228, 0.18);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(131, 115, 228, 0.35);
  border-radius: 16px;
  padding: 16px 28px;
  color: #FFFFFF;
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 2;
  overflow: hidden;
}

.dashboard-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.dashboard-button:hover {
  background: rgba(131, 115, 228, 0.26);
  border-color: rgba(131, 115, 228, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(131, 115, 228, 0.25);
}

.dashboard-button:hover::before {
  left: 100%;
}

/* Enhanced user metrics label */
.metrics-label {
  background: rgba(131, 115, 228, 0.12);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(131, 115, 228, 0.25);
  border-radius: 12px;
  padding: 10px 20px;
  color: #FFFFFF;
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 30px;
  align-self: flex-start;
  margin-left: 20px;
  letter-spacing: 0.5px;
}

/* Metrics grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  width: 100%;
}

.metric-card.width-full {
  grid-column: span 2;
}

.users-table-container.width-full {
  grid-column: span 2;
  margin-top: 20px;
  width: 100%;
}


.metric-title {
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.metric-value {
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
  line-height: 1;
  letter-spacing: -1px;
}

.metric-description {
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  letter-spacing: 0.2px;
}

/* Enhanced live indicator */
.live-indicator {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff4444, #ff6666);
  color: #FFFFFF;
  font-family: 'Inria Serif', Georgia, serif;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
  animation: pulse 2s infinite;
}

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

/* Responsive design */
@media (max-width: 768px) {
  .header {
    padding: 20px;
  }
  
  .main-content {
    padding: 40px 20px;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .metric-card {
    padding: 24px;
  }
  
  .metric-value {
    font-size: 32px;
  }
  
  .metrics-label {
    margin-left: 0;
    align-self: center;
  }
  
  .dashboard-button {
    padding: 16px 32px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 16px;
  }
  
  .main-content {
    padding: 30px 16px;
  }
  
  .dashboard-button {
    padding: 14px 28px;
    font-size: 14px;
  }
  
  .metric-card {
    padding: 20px;
  }
  
  .metric-value {
    font-size: 28px;
  }
  
  .logo {
    font-size: 24px;
  }
}
