* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a0a2e 0%, #16213e 50%, #0f0f23 100%);
  min-height: 100vh;
  color: white;
  position: relative;
  overflow-x: hidden;
}

/* Neon Background */
.neon-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.neon-line {
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

.neon-line-1 {
  width: 1200px;
  height: 1200px;
  bottom: -600px;
  left: -400px;
  border-color: #00d4ff;
  box-shadow: 0 0 30px #00d4ff, 0 0 60px #00d4ff, inset 0 0 30px rgba(0, 212, 255, 0.1);
}

.neon-line-2 {
  width: 900px;
  height: 900px;
  bottom: -300px;
  right: -200px;
  border-color: #bf00ff;
  box-shadow: 0 0 30px #bf00ff, 0 0 60px #bf00ff, inset 0 0 30px rgba(191, 0, 255, 0.1);
}

.neon-line-3 {
  width: 1400px;
  height: 1400px;
  top: 30%;
  left: -500px;
  border-color: #00d4ff;
  box-shadow: 0 0 25px #00d4ff, 0 0 50px #00d4ff;
}

.neon-line-4 {
  width: 800px;
  height: 800px;
  top: 60%;
  right: -300px;
  border-color: #00d4ff;
  box-shadow: 0 0 25px #00d4ff, 0 0 50px #00d4ff;
}

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

/* Header */
.header {
  background: linear-gradient(90deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}

.logo {
  font-size: 2.5rem;
  font-weight: bold;
  color: #000;
  text-decoration: none;
  font-family: "Times New Roman", serif;
}

.search-bar {
  flex: 0 1 350px;
  margin: 0 40px;
}

.search-bar input {
  width: 100%;
  padding: 8px 16px;
  border: 2px solid #333;
  border-radius: 0;
  font-size: 14px;
  background: white;
  color: #333;
}

.search-bar input::placeholder {
  color: #666;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a,
.nav-links button {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transition: text-shadow 0.3s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-links a:hover,
.nav-links button:hover {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 10;
  padding: 40px;
}

/* Hero Section */
.hero-section {
  max-width: 900px;
  margin: 0 auto 60px;
}

.hero-image-container {
  position: relative;
  border: 4px solid #a855f7;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
}

.hero-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
}

.hero-caption {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 40px;
  text-align: center;
}

.hero-caption h2 {
  color: #000;
  font-size: 1.5rem;
  font-weight: normal;
  margin-bottom: 5px;
}

.hero-caption span {
  color: #666;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Categories Section */
.categories-section {
  margin-top: 80px;
}

.categories-title {
  text-align: center;
  margin-bottom: 40px;
}

.categories-title h2 {
  display: inline-block;
  background: rgba(0, 0, 0, 0.85);
  padding: 20px 120px;
  font-size: 2.5rem;
  font-weight: normal;
  color: #00d4ff;
  text-shadow: 0 0 10px #00d4ff;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
  text-decoration: none;
}

.category-card:hover {
  transform: scale(1.02);
}

.category-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.category-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
}

.badge-icon {
  width: 100%;
  height: 100%;
}

.category-name {
  text-align: center;
  margin-top: 10px;
  font-size: 2rem;
  color: white;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* Footer - Updated footer styles for recipe website */
.footer {
  background: linear-gradient(135deg, #1a1a3e 0%, #0d1b2a 100%);
  padding: 60px 60px 20px;
  position: relative;
  z-index: 10;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  font-size: 2rem;
  font-family: "Times New Roman", serif;
  color: #a855f7;
  margin-bottom: 15px;
}

.footer-brand p {
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.footer-social a:hover {
  background: #a855f7;
}

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.footer-column h4 {
  color: #00d4ff;
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-column ul li a:hover {
  color: #a855f7;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  color: #6b7280;
  font-size: 0.85rem;
}

/* Added recipes section styles */
.recipes-section {
  margin-top: 80px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.recipes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.recipes-header h2 {
  font-size: 2rem;
  color: #00d4ff;
  text-shadow: 0 0 10px #00d4ff;
}

.clear-filter-btn {
  padding: 10px 20px;
  background: rgba(168, 85, 247, 0.3);
  border: 2px solid #a855f7;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
}

.clear-filter-btn:hover {
  background: #a855f7;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.recipe-grid-card {
  background: rgba(109, 40, 217, 0.3);
  border: 2px solid #a855f7;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}

.recipe-grid-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.recipe-grid-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.recipe-grid-content {
  padding: 20px;
}

.recipe-grid-name {
  font-size: 1.3rem;
  color: white;
  margin-bottom: 10px;
}

.recipe-grid-meta {
  display: flex;
  gap: 15px;
  color: #9ca3af;
  font-size: 0.85rem;
}

.recipe-grid-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.recipe-category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid #00d4ff;
  border-radius: 20px;
  color: #00d4ff;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-top: 10px;
}

/* Recipe detail modal styles */
.recipe-detail-container {
  max-width: 800px;
  width: 100%;
  background: rgba(109, 40, 217, 0.5);
  border: 2px solid #a855f7;
  border-radius: 12px;
  overflow: hidden;
}

.recipe-detail-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.recipe-detail-body {
  padding: 30px;
}

.recipe-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.recipe-detail-info {
  display: flex;
  gap: 20px;
}

.recipe-detail-stat {
  text-align: center;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.recipe-detail-stat strong {
  display: block;
  font-size: 1.3rem;
  color: #00d4ff;
}

.recipe-detail-stat span {
  font-size: 0.8rem;
  color: #9ca3af;
}

.recipe-detail-section {
  margin-bottom: 25px;
}

.recipe-detail-section h3 {
  color: #00d4ff;
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.recipe-detail-section ul {
  list-style: none;
  padding: 0;
}

.recipe-detail-section ul li {
  color: white;
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

.recipe-detail-section ul li::before {
  content: "•";
  color: #a855f7;
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

.recipe-detail-section ol {
  padding-left: 20px;
}

.recipe-detail-section ol li {
  color: white;
  padding: 10px 0;
  line-height: 1.6;
}

.recipe-detail-allergens {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.allergen-tag {
  padding: 6px 14px;
  background: rgba(236, 72, 153, 0.2);
  border: 1px solid #ec4899;
  border-radius: 20px;
  color: #ec4899;
  font-size: 0.85rem;
}

.file-name {
  color: white;
  margin-left: 10px;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 50%, #6d28d9 100%);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 40px;
  position: relative;
}

.modal-title {
  color: white;
  font-size: 2rem;
  font-weight: normal;
}

.close-btn {
  position: absolute;
  right: 40px;
  top: 30px;
  background: none;
  border: none;
  color: black;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  font-weight: bold;
}

.modal-content {
  flex: 1;
  padding: 20px 40px 40px;
  display: flex;
  justify-content: center;
}

.modal-content.recipes-list {
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.form-container {
  border: 2px solid white;
  border-radius: 8px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
}

.form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  gap: 30px;
}

.form-label {
  color: white;
  font-size: 1.2rem;
  min-width: 120px;
  padding-top: 10px;
}

.form-input {
  flex: 1;
  padding: 15px;
  border: 2px solid #c4b5fd;
  border-radius: 4px;
  font-size: 1rem;
  background: #c4b5fd;
  color: #1f2937;
}

.form-input::placeholder {
  color: #6b7280;
}

.form-textarea {
  flex: 1;
  padding: 15px;
  border: 2px solid #c4b5fd;
  border-radius: 4px;
  font-size: 1rem;
  background: #c4b5fd;
  color: #1f2937;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.form-textarea.large {
  min-height: 150px;
}

.calories-input {
  width: 120px;
  padding: 10px 15px;
  border: 2px solid #c4b5fd;
  border-radius: 4px;
  font-size: 1rem;
  background: #c4b5fd;
  color: #1f2937;
}

.allergens-container {
  flex: 1;
  border: 2px solid #c4b5fd;
  border-radius: 4px;
  padding: 15px;
  background: white;
}

.allergens-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.allergen-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  font-size: 0.95rem;
  cursor: pointer;
}

.allergen-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.allergen-checkbox.checked {
  background: #9ca3af;
  border-color: #9ca3af;
}

.upload-btn,
.submit-btn {
  padding: 10px 20px;
  border: 2px solid #1f2937;
  background: #c4b5fd;
  color: #1f2937;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
}

.upload-btn:hover,
.submit-btn:hover {
  background: #a78bfa;
}

.hidden-input {
  display: none;
}

/* Recipe Card in Modal */
.recipe-card {
  border: 3px solid #a855f7;
  border-radius: 8px;
  background: #6d28d9;
  display: flex;
  max-width: 700px;
  width: 100%;
  overflow: hidden;
}

.recipe-card-image {
  width: 250px;
  height: 220px;
  object-fit: cover;
  flex-shrink: 0;
}

.recipe-details {
  flex: 1;
  padding: 20px 25px;
  display: flex;
  flex-direction: column;
}

.recipe-card-name {
  color: white;
  font-size: 1.8rem;
  font-weight: normal;
  margin-bottom: 15px;
  text-align: center;
}

.recipe-description {
  border: 2px solid white;
  padding: 15px;
  color: white;
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 15px;
}

.recipe-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.action-btn {
  padding: 8px 25px;
  border: 2px solid white;
  background: transparent;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.empty-state {
  color: white;
  font-size: 1.2rem;
  text-align: center;
  padding: 60px;
}

/* Neon Modal Background */
.neon-bg-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.neon-line-modal {
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
}

.neon-line-modal-1 {
  width: 1000px;
  height: 1000px;
  bottom: -400px;
  left: -300px;
  border-color: #00d4ff;
  box-shadow: 0 0 30px #00d4ff, 0 0 60px #00d4ff;
}

.neon-line-modal-2 {
  width: 800px;
  height: 800px;
  bottom: -200px;
  right: -200px;
  border-color: #ec4899;
  box-shadow: 0 0 30px #ec4899, 0 0 60px #ec4899;
}

/* Responsive - Added recipes grid responsive */
@media (max-width: 900px) {
  .header {
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 20px;
  }

  .search-bar {
    order: 3;
    flex: 1 1 100%;
    margin: 10px 0 0;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .recipes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .recipe-card {
    flex-direction: column;
  }

  .recipe-card-image {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 600px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .recipes-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 10px;
  }

  .form-label {
    min-width: auto;
    padding-top: 0;
  }

  .recipe-detail-info {
    width: 100%;
    justify-content: center;
  }
}
