/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  color: #334155;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #9333ea);
  z-index: 1000;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* Navbar */
nav {
  background: #1e293b; /* dark slate */
  color: #fff;
  padding: 16px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDown 0.6s ease-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #60a5fa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

nav a:hover {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #60a5fa;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::after {
  width: 80%;
}

/* Authentication Links */
nav {
  justify-content: space-between;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.auth-links {
  display: flex;
  align-items: center;
}

.auth-btn {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
}

.login-btn {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

.login-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

.register-btn {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: white;
}

.register-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.profile-btn {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.profile-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.logout-btn {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Container */
.container {
  max-width: 900px;
  margin: 60px auto;
  padding: 50px 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  animation: fadeIn 1s ease-in;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.feature-card {
  background: #f8fafc;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #e2e8f0;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
  margin-top: 0;
  color: #1e293b;
  font-size: 22px;
  margin-bottom: 15px;
}

.feature-card p {
  color: #64748b;
  margin-bottom: 0;
  font-size: 16px;
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #9333ea);
}

h2 {
  font-size: 32px;
  margin-bottom: 20px;
  font-weight: 700;
  color: #1e293b;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #9333ea);
  border-radius: 3px;
}

p {
  margin-bottom: 20px;
  font-size: 18px;
  color: #64748b;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
button {
  padding: 14px 28px;
  margin: 12px;
  border: none;
  background: linear-gradient(90deg, #2563eb, #6366f1);
  color: white;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

button:hover::before {
  left: 100%;
}

/* Special buttons */
button.secondary {
  background: linear-gradient(90deg, #64748b, #94a3b8);
  box-shadow: 0 4px 15px rgba(100, 116, 139, 0.2);
}

button.secondary:hover {
  box-shadow: 0 6px 20px rgba(100, 116, 139, 0.3);
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
  animation: fadeIn 1.2s ease-in;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

th,
td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: linear-gradient(90deg, #f1f5f9, #e2e8f0);
  font-weight: 600;
  color: #1e293b;
  position: sticky;
  top: 0;
}

tr:hover {
  background-color: #f8fafc;
}

tr:last-child td {
  border-bottom: none;
}

/* Carousel */
.background-carousel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px;
  color: #64748b;
  font-size: 14px;
  margin-top: 40px;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 15px;
    padding: 16px 20px;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .container {
    margin: 30px 20px;
    padding: 30px 20px;
  }
  
  h2 {
    font-size: 26px;
  }
  
  p {
    font-size: 16px;
  }
  
  button {
    padding: 12px 20px;
    font-size: 15px;
    margin: 8px;
  }
}