/* Public Profile Page Styles */
body {
  background: white;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  max-width: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #667eea;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
  margin-bottom: 20px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.back-link:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.profile-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-info {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: start;
  width: 100%;
}

.profile-picture-container {
  display: flex;
  justify-content: center;
}

.profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.profile-picture:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.profile-picture-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5em;
  font-weight: bold;
  border: 3px solid rgba(102, 126, 234, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.profile-picture-placeholder:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.profile-details {
  flex: 1;
  min-width: 300px;
}

.profile-username {
  color: #667eea;
  font-size: 2.5em;
  font-weight: 700;
  margin: 0 0 15px 0;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.stat-number {
  display: block;
  font-size: 1.8em;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.profile-bio {
  background: rgba(102, 126, 234, 0.05);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  line-height: 1.6;
  color: #555;
  font-size: 1em;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  min-width: 200px;
  max-width: 250px;
}

.btn {
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.btn-secondary:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-danger {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
  background: rgba(220, 53, 69, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

.recipes-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.comments-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.favorites-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.favorites-section .recipe-card {
    position: relative;
}

.favorites-section .recipe-card::before {
    content: "⭐";
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 215, 0, 0.9);
    backdrop-filter: blur(10px);
    color: #333;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
    z-index: 10;
}



.section-title {
  color: #667eea;
  font-size: 2.2em;
  font-weight: 800;
  margin: 0 0 30px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top:20px
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.recipe-card {
  background: #fff;
  border-radius: 1.2em;
  box-shadow: 0 2px 8px #e0e7ef;
  padding: 1.5em 1.2em 1.2em 1.2em;
  margin-bottom: 2em;
  transition: all 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.recipe-title {
  color: #2c3e50;
  font-size: 1.4em;
  font-weight: 600;
  margin: 0 0 0.5em 0;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.5em 0;
}

.meta-badge, .tag {
  display: inline-block;
  background: #e0f0ff;
  color: #2176bd;
  border-radius: 1em;
  padding: 0.2em 0.8em;
  font-size: 0.95em;
  text-decoration: none;
  transition: background 0.2s;
}

.meta-badge:hover, .tag:hover {
  background: #b3e0ff;
}

.recipe-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 1em;
  margin-bottom: 15px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-state .icon {
  font-size: 4em;
  margin-bottom: 20px;
}

.message {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .main-container {
    padding: 15px;
  }
}

@media (max-width: 1024px) {
  .main-container {
    padding: 10px;
  }
  
  .profile-info {
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
  }

  .profile-picture,
  .profile-picture-placeholder {
    width: 140px;
    height: 140px;
    justify-self: center;
    margin: 0 auto;
  }

  .profile-actions {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-width: auto;
    width: 100%;
  }

  .profile-stats {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: 5px;
  }
  
  .profile-header {
    padding: 25px;
  }

  .profile-picture,
  .profile-picture-placeholder {
    width: 120px;
    height: 120px;
    font-size: 2.8em;
  }

  .profile-username {
    font-size: 2em;
  }

  .profile-stats {
    gap: 15px;
    justify-content: center;
  }

  .stat-item {
    padding: 15px 20px;
    min-width: 80px;
  }

  .profile-actions {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
    min-width: 200px;
    justify-content: center;
  }

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

@media (max-width: 480px) {
  .main-container {
    padding: 2px;
  }
  
  .profile-header {
    padding: 20px;
  }

  .profile-picture,
  .profile-picture-placeholder {
    width: 100px;
    height: 100px;
    font-size: 2.2em;
  }

  .profile-username {
    font-size: 1.8em;
  }

  .profile-stats {
    gap: 10px;
    flex-direction: column;
    align-items: center;
  }

  .stat-item {
    padding: 12px 15px;
    min-width: 120px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
    min-width: 100%;
  }
}

@media (max-width: 360px) {
  .main-container {
    padding: 2px;
  }
  
  .profile-username {
    font-size: 1.5em;
  }

  .stat-item {
    padding: 10px 12px;
    min-width: 100px;
  }

  .btn {
    padding: 10px 15px;
    font-size: 13px;
  }
}

/* Achievements Section Styles */
.achievements-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.achievement-badge {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  padding: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.achievement-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: white;
}

.achievement-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  color: white;
  flex-shrink: 0;
}

.achievement-info {
  flex: 1;
}

.achievement-title {
  font-weight: 600;
  font-size: 1em;
  color: #2c3e50;
  margin-bottom: 4px;
}

.achievement-date {
  font-size: 0.85em;
  color: #7f8c8d;
}

@media (max-width: 768px) {
  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .achievement-badge {
    padding: 12px;
  }
  
  .achievement-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
  }
  
  .achievement-title {
    font-size: 0.9em;
  }
  
  .achievement-date {
    font-size: 0.8em;
  }
}
