* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fafafa;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  background: #fff;
  padding: 16px 0 24px;
  margin-bottom: 16px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 70px;
  width: auto;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

.avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  transition: all 0.3s;
  cursor: pointer;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-item svg {
  flex-shrink: 0;
}

.dropdown-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 4px 0;
}

/* Guest Notice */
.guest-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.notice-content {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.notice-content p {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.notice-link {
  color: #ff6b6b;
  font-weight: 600;
  text-decoration: none;
}

.notice-link:hover {
  text-decoration: underline;
}

.notice-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.notice-close:hover {
  color: #333;
}

/* Auth Page Styles */
.auth-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-container {
  width: 100%;
  max-width: 450px;
}

.auth-card {
  background: white;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  height: 80px;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 15px;
  color: #666;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.auth-tab.active {
  background: white;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Auth Forms */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}

.btn-auth {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-text {
  display: inline-block;
}

.btn-loader {
  display: none;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

.spinner-circle {
  fill: none;
  stroke: white;
  stroke-width: 3;
  stroke-dasharray: 50;
  stroke-dashoffset: 25;
  stroke-linecap: round;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-divider {
  text-align: center;
  position: relative;
  margin: 24px 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.auth-divider span {
  position: relative;
  background: white;
  padding: 0 16px;
  color: #999;
  font-size: 14px;
}

.btn-google {
  width: 100%;
  padding: 14px;
  background: white;
  color: #333;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-google:hover {
  background: #f9f9f9;
  border-color: #ccc;
}

.auth-error {
  background: #ffebee;
  color: #c62828;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-top: 16px;
  border-left: 4px solid #c62828;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #666;
}

.guest-link {
  color: #ff6b6b;
  font-weight: 600;
  text-decoration: none;
}

.guest-link:hover {
  text-decoration: underline;
}

/* Main App Styles (existing) */
.header-main {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.main-heading {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.sub-heading {
  font-size: 32px;
  font-weight: 400;
  color: #666;
  margin-bottom: 40px;
}

/* Search Wrapper - More Spacing */
.search-wrapper {
  margin-bottom: 24px;
}

/* Search Container */
.search-container {
  display: flex;
  gap: 12px;
  max-width: 650px;
  margin: 0 auto;
  align-items: center;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 20px;
  color: #999;
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 16px 52px 16px 52px;
  border: 2px solid #e8e8e8;
  border-radius: 50px;
  font-family: inherit;
  font-size: 15px;
  transition: all 0.3s;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: #ff6b6b;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.08);
}

.search-input::placeholder {
  color: #aaa;
}

.search-clear {
  position: absolute;
  right: 16px;
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 1;
}

.search-clear:hover {
  background: #e0e0e0;
}

.btn-search-circle {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  flex-shrink: 0;
}

.btn-search-circle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.btn-search-circle:active {
  transform: translateY(0);
}

.btn-random {
  padding: 16px 24px;
  background: white;
  border: 2px solid #ff6b6b;
  border-radius: 50px;
  color: #ff6b6b;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-random:hover {
  background: #ff6b6b;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Filter Container */
.filter-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 22px;
  background: white;
  border: 2px solid #e8e8e8;
  border-radius: 50px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover {
  border-color: #ff6b6b;
  color: #ff6b6b;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border-color: #ff6b6b;
  color: white;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* Voice Bar - Separate Clean Section */
.voice-bar {
  background: linear-gradient(135deg, #fff5f5, #fff9f9);
  border-bottom: 1px solid #ffe0e0;
  padding: 12px 0;
  margin-top: 24px;
}

.voice-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
}

.voice-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.voice-info svg {
  color: #ff6b6b;
}

.voice-label {
  font-weight: 600;
}

.voice-actions {
  display: flex;
  gap: 8px;
}

.btn-voice-compact {
  padding: 8px 18px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-voice-compact:hover {
  background: #ff5252;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.btn-voice-compact.secondary {
  background: white;
  color: #666;
  border: 2px solid #e0e0e0;
}

.btn-voice-compact.secondary:hover {
  background: #f5f5f5;
  border-color: #ccc;
  box-shadow: none;
}

/* Remove old voice section styles */
.voice-section,
.voice-toggle,
.toggle-icon {
  display: none;
}

.btn-voice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.btn-voice:hover {
  background: #ff5252;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-voice:active {
  transform: translateY(0);
}

.btn-stop {
  padding: 14px 28px;
  background: #fff;
  color: #666;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-stop:hover {
  border-color: #ccc;
  background: #f9f9f9;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Header */
.recipes-section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.result-count {
  font-size: 14px;
  color: #999;
}

/* Recipe Grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Add empty cards to fill incomplete rows */
.recipe-grid::after {
  content: '';
  grid-column: span 1;
}

.recipe-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  min-height: 320px;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Favorite Button */
.favorite-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
}

.favorite-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  background: white;
}

.favorite-btn:active {
  transform: scale(0.95);
}

.favorite-btn svg {
  width: 18px;
  height: 18px;
  transition: all 0.2s;
}

.favorite-btn.favorited svg {
  fill: #ff6b6b;
  stroke: #ff6b6b;
}

.favorite-btn:not(.favorited) svg {
  fill: none;
  stroke: #666;
  stroke-width: 2;
}

.favorite-btn.favorited {
  animation: heartbeat 0.3s ease-in-out;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

.recipe-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.recipe-info {
  padding: 16px;
}

.recipe-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.4;
}

.recipe-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #999;
}

.meta-item svg {
  flex-shrink: 0;
}

.difficulty-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.difficulty-badge.easy {
  background: #e8f5e9;
  color: #2e7d32;
}

.difficulty-badge.medium {
  background: #fff3e0;
  color: #e65100;
}

.difficulty-badge.hard {
  background: #ffebee;
  color: #c62828;
}

.recipe-card p {
  font-size: 14px;
  color: #999;
  padding: 0 16px 16px;
}

/* Recipe Detail */
.recipe-detail {
  max-width: 800px;
  margin: 0 auto 48px;
}

.back-link {
  background: none;
  border: none;
  color: #666;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 12px 0;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.back-link:hover {
  color: #333;
}

.detail-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.detail-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 32px;
  line-height: 1.3;
}

.step-box {
  background: #fff9f5;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  border-left: 4px solid #ff6b6b;
}

.step-header {
  margin-bottom: 12px;
}

.step-badge {
  display: inline-block;
  background: #ff6b6b;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-text {
  font-size: 18px;
  color: #333;
  line-height: 1.6;
  font-weight: 500;
}

/* Voice Activity */
.voice-activity {
  border-top: 2px solid #f0f0f0;
  padding-top: 32px;
}

.activity-heading {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #fafafa;
  border-radius: 12px;
}

.activity-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.activity-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.activity-text {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .recipe-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .header {
    padding: 16px 0 24px;
  }

  .main-heading,
  .sub-heading {
    font-size: 24px;
    margin-bottom: 24px;
  }
  
  .search-wrapper {
    margin-bottom: 20px;
  }
  
  .search-container {
    flex-direction: row;
    gap: 10px;
  }
  
  .search-input {
    padding: 14px 48px 14px 48px;
  }
  
  .btn-search-circle {
    width: 48px;
    height: 48px;
  }
  
  .btn-random {
    padding: 14px 20px;
  }
  
  .btn-random span {
    display: none;
  }
  
  .filter-container {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .voice-bar {
    margin-top: 20px;
    padding: 10px 0;
  }
  
  .voice-bar-content {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .voice-actions {
    width: 100%;
  }
  
  .btn-voice-compact {
    flex: 1;
    justify-content: center;
  }

  .voice-controls {
    flex-direction: column;
    max-width: 300px;
    margin: 0 auto;
  }

  .btn-voice,
  .btn-stop {
    width: 100%;
    justify-content: center;
  }

  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .detail-card {
    padding: 28px 24px;
  }

  .detail-title {
    font-size: 26px;
  }

  .step-box {
    padding: 20px;
  }

  .step-text {
    font-size: 16px;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .guest-notice {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .header-top {
    margin-bottom: 28px;
  }

  .main-heading,
  .sub-heading {
    font-size: 20px;
  }

  .detail-card {
    padding: 24px 20px;
  }

  .detail-title {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .user-name {
    display: none;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: white;
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease-out;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  color: #666;
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Loading Spinner */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid #ff6b6b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

/* Favorites Section */
.favorites-section {
  margin-bottom: 48px;
}

/* API Loading State */
.api-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border-radius: 16px;
  margin: 20px 0;
}

.api-loading p {
  color: #666;
  font-size: 15px;
  margin-top: 16px;
  font-weight: 500;
}

/* Recipe Source Link */
.recipe-source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f5f5f5;
  color: #666;
  text-decoration: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 24px;
  transition: all 0.2s;
}

.recipe-source-link:hover {
  background: #ff6b6b;
  color: white;
  transform: translateY(-1px);
}

.recipe-source-link svg {
  flex-shrink: 0;
}
/* Profile Page Styles */
.profile-section {
  max-width: 800px;
  margin: 0 auto 48px;
}

.profile-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 2px solid #f0f0f0;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.profile-email {
  font-size: 16px;
  color: #666;
  margin-bottom: 8px;
}

.profile-joined {
  font-size: 14px;
  color: #999;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fafafa;
  border-radius: 16px;
  transition: all 0.3s;
}

.stat-card:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: #999;
  font-weight: 500;
}

.profile-section-divider {
  margin: 32px 0 20px;
}

.section-heading {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fafafa;
  border-radius: 16px;
  transition: all 0.2s;
}

.setting-item:hover {
  background: #f5f5f5;
}

.setting-icon {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.setting-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.setting-value {
  font-size: 14px;
  color: #666;
}

.setting-action {
  width: 36px;
  height: 36px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  color: #666;
}

.setting-action:hover {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: white;
  transform: scale(1.05);
}

.setting-badge {
  padding: 6px 12px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.btn-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

.btn-action.secondary {
  background: white;
  color: #333;
  border: 2px solid #e0e0e0;
}

.btn-action.secondary:hover {
  background: #fafafa;
  border-color: #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-footer {
  padding-top: 32px;
  border-top: 2px solid #f0f0f0;
  display: flex;
  justify-content: center;
}

.btn-signout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  color: #c62828;
  border: 2px solid #ffebee;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-signout:hover {
  background: #ffebee;
  border-color: #c62828;
  transform: translateY(-1px);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;

  /* IMPORTANT */
  display: none;

  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Show modal ONLY when hidden is removed */
.modal:not([hidden]) {
  display: flex;
}


.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #333;
}

.modal-close {
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
}

.modal-close:hover {
  background: #e0e0e0;
  color: #333;
}

.modal-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  border-radius: 12px;
}

.modal-notice svg {
  flex-shrink: 0;
  color: #2196f3;
  margin-top: 2px;
}

.modal-notice p {
  margin: 0;
  font-size: 14px;
  color: #1565c0;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-modal-cancel {
  flex: 1;
  padding: 14px;
  background: white;
  color: #666;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-cancel:hover {
  background: #fafafa;
  border-color: #ccc;
}

.btn-modal-submit {
  flex: 1;
  padding: 14px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-modal-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.3);
}

.btn-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .profile-card {
    padding: 28px 24px;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-name {
    font-size: 24px;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .modal-content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .profile-avatar-large {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }

  .profile-name {
    font-size: 20px;
  }

  .stat-card {
    padding: 16px;
  }

  .setting-item {
    padding: 16px;
  }
}
/*  MIC TEST MODAL STYLES */
.mic-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.mic-modal:not([hidden]) {
  display: flex;
}

.mic-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.mic-modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mic-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mic-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.mic-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.mic-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.mic-modal-body {
  padding: 24px;
}

.mic-status {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #fff5f5, #fff);
  border-radius: 16px;
  margin-bottom: 20px;
}

.mic-icon-container {
  margin-bottom: 16px;
}

.mic-icon {
  stroke: #ff6b6b;
  filter: drop-shadow(0 2px 8px rgba(255, 107, 107, 0.3));
}

.mic-status.listening .mic-icon {
  animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.mic-status-text {
  font-size: 15px;
  color: #666;
  font-weight: 500;
  margin: 0;
}

.mic-status.listening .mic-status-text {
  color: #ff6b6b;
  font-weight: 600;
}

.mic-transcript {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border-left: 4px solid #ff6b6b;
}

.mic-transcript-label {
  font-size: 12px;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
}

.mic-transcript-text {
  font-size: 16px;
  color: #333;
  margin: 0;
  min-height: 24px;
  font-weight: 500;
}

.mic-instructions {
  background: linear-gradient(135deg, #fff9f0, #fff);
  border-radius: 12px;
  padding: 16px;
  border: 2px solid #fff0e0;
}

.mic-instructions p {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 14px;
}

.mic-instructions ul {
  margin: 0;
  padding-left: 20px;
  color: #666;
  font-size: 14px;
}

.mic-instructions li {
  margin-bottom: 6px;
}

.mic-modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-mic-test {
  padding: 12px 24px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
}

.btn-mic-test:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.btn-mic-test:active {
  transform: translateY(0);
}

.btn-mic-test.secondary {
  background: white;
  color: #666;
  border: 2px solid #e0e0e0;
}

.btn-mic-test.secondary:hover {
  background: #f5f5f5;
  border-color: #ccc;
  box-shadow: none;
  transform: translateY(-1px);
}

.btn-mic-test:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/*  AVAILABLE VOICE COMMANDS SECTION */

.voice-commands-section {
  margin: 32px 0 48px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.voice-commands-toggle {
  width: 100%;
  background: white;
  border: 2px solid #e8ecf1;
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.voice-commands-toggle:hover {
  border-color: #ff6b6b;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.1);
  transform: translateY(-1px);
}

.toggle-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.info-icon {
  color: #ff6b6b;
  flex-shrink: 0;
}

.chevron-icon {
  color: #999;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.voice-commands-toggle.active .chevron-icon {
  transform: rotate(180deg);
}

.voice-commands-content {
  background: white;
  border: 2px solid #e8ecf1;
  border-top: none;
  border-radius: 0 0 16px 16px;
  margin-top: -2px;
  padding: 24px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.command-category {
  background: linear-gradient(135deg, #fafafa, #fff);
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #ff6b6b;
}

.category-title {
  font-size: 12px;
  font-weight: 700;
  color: #ff6b6b;
  letter-spacing: 1px;
  margin: 0 0 16px 0;
  text-transform: uppercase;
}

.command-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

.command-item:hover {
  border-color: #ff6b6b;
  background: linear-gradient(135deg, #fff5f5, #fff);
  transform: translateX(4px);
}

.command-icon {
  color: #ff6b6b;
  flex-shrink: 0;
}

.command-item span {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .voice-commands-section {
    margin: 24px 0 32px;
  }

  .voice-commands-toggle {
    padding: 16px 20px;
  }

  .toggle-content {
    font-size: 15px;
  }

  .voice-commands-content {
    padding: 20px;
  }

  .commands-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .command-category {
    padding: 16px;
  }

  .command-item {
    padding: 8px 10px;
  }
}