/* General Styles */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  overflow-x: hidden;
}

/* Custom Colors */
.bg-purple { background-color: #4B0082; }
.text-purple { color: #4B0082; }
.bg-lavender { background-color: #E6E6FA; }
.text-lavender { color: #E6E6FA; }
.bg-coral { background-color: #FF6F61; }
.text-coral { color: #FF6F61; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fadeIn 1s ease-out;
}
.animate-fade-in-delayed {
  animation: fadeIn 1s ease-out 0.5s;
}
.animate-fade-in-delayed-2 {
  animation: fadeIn 1s ease-out 1s;
}
.animate-pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Particle Animation */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://www.transparenttextures.com/patterns/stardust.png');
  opacity: 0.3;
  animation: moveParticles 20s linear infinite;
}
@keyframes moveParticles {
  0% { background-position: 0 0; }
  100% { background-position: 100% 100%; }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(75, 0, 130, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  transition: background 0.3s;
}

.header.scrolled {
  background: #4B0082;
}

.logo a {
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #E6E6FA;
}

.nav-links.active {
  display: flex;
}

/* User Icon and Name */
#user-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

#user-profile-pic {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

#user-name {
  color: white;
  font-size: 0.875rem;
}

/* Dropdown Menu */
.profile-container {
  position: relative;
  z-index: 50;
}

.dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 12rem;
  background-color: white;
  color: #1f2937;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown ul {
  padding: 0.5rem 0;
}

.dropdown li a {
  display: block;
  padding: 0.5rem 1rem;
  color: #1f2937;
  text-decoration: none;
}

.dropdown li a:hover {
  background-color: #f1f5f9;
}

/* Signup Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-content {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 28rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  outline: none;
  transition: border-color 0.3s;
}

.modal-content input:focus {
  border-color: #FF6F61;
}

/* Hero Section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  padding: 2rem 1rem;
}

.hero video, .hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(75, 0, 130, 0.6);
  z-index: 10;
}

.hero h2, .hero p, .hero .search-container, .hero button, .hero .quick-categories {
  position: relative;
  z-index: 30;
}

.search-box {
  padding: 0.75rem;
  border: none;
  outline: none;
  color: #1f2937;
}

/* Categories Section */
.categories {
  position: relative;
  padding: 3rem 0;
  background-color: #f4f4f4;
  z-index: 40;
}

.category {
  position: relative;
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.3s;
  cursor: pointer;
}

.category:hover {
  transform: scale(1.05);
}

.category img {
  width: 100%;
  object-fit: cover;
}

/* Freelancer Carousel */
.freelancer-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding: 1rem;
}

.freelancer {
  scroll-snap-align: center;
  flex: 0 0 16rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
}

.freelancer img {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
}

/* Service Profile Section */
#profile-pic-display {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
}

/* Footer */
footer {
  background: #4B0082;
  color: white;
  padding: 2rem 1rem;
}

footer a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: #FF6F61;
}

/* Multi-Step Form */
#multi-step-form {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.form-step label {
  display: block;
  color: #374151;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-step input,
.form-step textarea,
.form-step select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-step input:focus,
.form-step textarea:focus,
.form-step select:focus {
  border-color: #FF6F61;
  box-shadow: 0 0 0 3px rgba(255, 111, 97, 0.2);
}

.form-step input[readonly] {
  background-color: #f3f4f6;
  color: #6b7280;
}

.form-step button:disabled {
   opacity: 0.5;
   cursor: not-allowed;
}

#image-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
}

/* Style the range slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #d1d5db;
  border-radius: 5px;
  outline: none;
  transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #FF6F61;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #FF6F61;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:hover::-moz-range-thumb {
  background: #e65b50;
}

input[type="range"]:focus {
  background: #b3b7c1;
}

/* Hidden Class for Tailwind */
.hidden {
  display: none;
}

/* Notification Panel */
#notification-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
}

#notification-panel.open {
  right: 0;
}

.notification-item {
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 0.75rem;
}

.notification-item button {
  margin-right: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.notification-item .accept-btn {
  background-color: #4CAF50;
  color: white;
}

.notification-item .decline-btn {
  background-color: #f44336;
  color: white;
}

#notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header {
    padding: 0.75rem;
  }

  .hamburger {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .nav-links-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(75, 0, 130, 0.95);
    padding: 1rem;
  }

  .nav-links-container.active {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a, .nav-links button {
    display: block;
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .signup-btn {
    width: 100%;
    text-align: center;
  }

  #user-icon, #messages-icon, #add-bank-details-btn {
    display: flex !important;
  }

  .hero {
    min-height: 70vh;
    padding: 1rem 0.5rem;
  }

  .hero h2 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    padding: 0 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .hero p {
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0 1rem;
  }

  .search-container {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .search-box {
    width: 100%;
    border-radius: 9999px;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .search-btn {
    border-radius: 9999px;
    width: 100%;
    max-width: 180px;
    padding: 0.75rem;
    font-size: 0.9rem;
    margin: 0 auto;
  }

  .hero .flex {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .explore-btn, .register-btn, .edit-profile-btn, .add-bank-details-btn {
    width: 100%;
    max-width: 220px;
    font-size: 0.9rem;
    padding: 0.75rem;
    margin: 0 auto;
  }

  .quick-categories {
    display: none;
  }

  .category-cards {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 0 0.75rem;
  }

  .category img {
    height: 8rem;
    object-fit: cover;
  }

  .category .p-4 {
    padding: 0.75rem;
  }

  .category p {
    font-size: 0.9rem;
  }

  .freelancer-carousel {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .freelancer {
    flex: 0 0 14rem;
    padding: 0.75rem;
  }

  .freelancer img {
    width: 4rem;
    height: 4rem;
  }

  #notification-panel {
    width: 85%;
    max-width: 280px;
    padding: 0.75rem;
  }

  #notification-panel h3 {
    font-size: 1.1rem;
  }

  .notification-item {
    font-size: 0.85rem;
  }

  .notification-item button {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  footer .grid {
    gap: 1.5rem;
  }

  #feedback-form input, #feedback-form textarea {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  #feedback-form button {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }
}
