/* Custom animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-in-out both;
}

/* General page styles */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f4f4;
  color: #333;
  margin: 0;
  padding: 0;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #1a1a1a;
  color: #ccc;
}

body.dark-mode nav {
  background-color: #333;
}

body.dark-mode form {
  background-color: #2c2c2c;
  color: #ddd;
}

body.dark-mode .user-card {
  background-color: #333;
  color: #ccc;
}

body.dark-mode .user-card img {
  border-color: #444;
}

body.dark-mode form input[type="text"],
body.dark-mode form input[type="email"],
body.dark-mode form input[type="password"],
body.dark-mode form textarea,
body.dark-mode form select {
  background-color: #444;
  border: 1px solid #555;
  color: #ddd;
}

body.dark-mode form input[type="text"]:focus,
body.dark-mode form input[type="email"]:focus,
body.dark-mode form input[type="password"]:focus,
body.dark-mode form textarea:focus,
body.dark-mode form select:focus {
  border-color: #00bcd4;
}

/* Navbar styles */
nav {
  background-color: #111;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a {
  color: #fff;
  margin-left: 1rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #00bcd4;
}

nav .menu {
  display: flex;
  align-items: center;
}

nav .toggle-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  nav .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  nav .menu.show {
    display: flex;
  }

  nav .toggle-btn {
    display: block;
  }

  nav a {
    margin: 0.5rem 0;
  }
}

/* Form container */
form {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 1rem auto;
}

form h2, form h3 {
  margin-bottom: 1rem;
  color: #444;
}

form input[type="text"],
form input[type="email"],
form input[type="file"],
form textarea,
form select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

form button {
  background-color: #0077cc;
  color: white;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background-color: #005fa3;
}

/* Gallery styles */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 2rem 0;
}

.gallery-item {
  text-align: center;
}

.gallery-item img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

/* Reusable containers */
.profile-container,
.profile-edit-container,
.form-wrapper {
  max-width: 960px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.8s ease-in-out both;
}

.profile-container h1,
.profile-edit-container h2 {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1rem;
}

/* Form elements */
form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea,
form select {
  width: 100%;
  padding: 0.8rem;
  margin: 1rem 0;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 1rem;
  background-color: #fff;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: #0077cc;
}

/* Buttons */
button {
  width: 100%;
  background-color: #0077cc;
  color: white;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #005fa3;
}

/* Profile card style for user lists */
.user-card {
  background-color: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 1rem;
}

.user-card:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.user-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 4px solid #f57c00;
}

.user-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #444;
}

.user-card p {
  font-size: 0.875rem;
  color: #666;
}

/* Grid layout for user cards */
.user-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 2rem;
}


.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.user-card {
  background-color: var(--bg-card, #f9f9f9);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.dark .user-card {
  background-color: #1f2937;
  color: white;
}
