/* ===========================
   General Reset & Body
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9ff;
  color: #1a1a1a;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ===========================
   Buttons
=========================== */
.btn {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: #4c5fd5;
  color: #fff;
}

.btn-primary:hover {
  background: #3d4ebd;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(76, 95, 213, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #4c5fd5;
  border: 1px solid #4c5fd5;
}

.btn-secondary:hover {
  background: #f0f2ff;
}

/* ===========================
   Auth Container (Login/Signup)
=========================== */
.auth-container {
  max-width: 400px;
  margin: 5rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: fadeIn 0.8s ease forwards;
}

.auth-container h2 {
  margin-bottom: 1rem;
  color: #333;
}

.auth-container input,
.auth-container select {
  width: 100%;
  padding: 0.8rem;
  margin: 0.8rem 0;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.auth-container input:focus,
.auth-container select:focus {
  border-color: #4c5fd5;
  box-shadow: 0 0 8px rgba(76, 95, 213, 0.2);
  outline: none;
}

/* ===========================
   Navigation Bar
=========================== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav .logo {
  font-weight: 700;
  color: #4c5fd5;
  font-size: 1.3rem;
}

/* ===========================
   Hero Section
=========================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 3rem 5%;
  align-items: center;
  animation: slideUp 1s ease forwards;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero input {
  padding: 0.8rem;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.hero-image img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-image img:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* ===========================
   Features Grid
=========================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 0 5%;
}

.feature-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: fadeIn 0.8s ease forwards;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(76, 95, 213, 0.15);
}

/* ===========================
   Admin Analytics Section
=========================== */
.analytics-section {
  display: none; /* Only visible for Admin */
  padding: 3rem 5%;
  animation: fadeIn 1s ease forwards;
}

.analytics-section canvas {
  margin-top: 2rem;
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Animations
=========================== */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   Responsive Design
=========================== */
@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    height: 300px;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .auth-container {
    margin: 3rem 1rem;
    padding: 1.5rem;
  }
}
