/* ====== HEADER ====== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  padding: 0 20px;
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  cursor: pointer;
}

.logo-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 56px;
  height: 46px;
}

.logo-chef {
  font-size: 2.5rem;
  line-height: 1;
}

.logo-phone {
  position: absolute;
  right: -6px;
  bottom: 2px;
  width: 18px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.5px;
}

.logo-highlight {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  white-space: nowrap;
}

.nav-btn:hover {
  background: var(--gray-lighter);
  color: var(--dark);
}

.nav-btn.active {
  background: var(--primary);
  color: var(--white);
}

.nav-btn .badge {
  background: var(--danger);
  color: var(--white);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--gray);
  padding: 8px 16px;
}

.btn-ghost:hover {
  background: var(--gray-lighter);
  color: var(--dark);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ====== CARDS ====== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-body {
  padding: 20px;
}

/* Action Cards */
.action-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.action-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.action-card.highlight {
  border-color: var(--secondary);
  background: linear-gradient(135deg, #f0fffe 0%, #e0f7f5 100%);
}

.action-card .card-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.action-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.action-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* Recipe Cards */
.recipe-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

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

.recipe-card-body {
  padding: 16px;
}

.recipe-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.recipe-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--gray);
}

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

.recipe-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--gray-lighter);
  color: var(--gray);
}

.tag-primary {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary);
}

.tag-secondary {
  background: rgba(46, 196, 182, 0.1);
  color: var(--secondary);
}

.recipe-card .favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.recipe-card .favorite-btn:hover {
  transform: scale(1.15);
}

.recipe-card .match-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--secondary);
  color: var(--white);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.recipe-card .online-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(46, 196, 182, 0.9);
  color: var(--white);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Top Pick Card */
.top-pick-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 3px solid var(--secondary);
  position: relative;
}

.top-pick-card .top-pick-label {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--secondary);
  color: var(--white);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 2;
}

.top-pick-card .top-pick-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.top-pick-card .top-pick-body {
  padding: 24px;
}

.top-pick-card .top-pick-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.top-pick-card .top-pick-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 196, 182, 0.1);
  color: var(--secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
}

/* ====== FORMS ====== */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-family);
  transition: var(--transition);
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.search-box {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
}

.search-box .form-input {
  flex: 1;
  border-radius: var(--radius-full);
  padding-left: 20px;
}

.search-box .btn {
  border-radius: var(--radius-full);
  padding: 12px 24px;
}

/* Search mode tabs */
.search-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.search-tab {
  padding: 8px 20px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--gray);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
  font-size: 0.9rem;
}

.search-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Toggle switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 12px 0;
}

.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--gray-light);
  border-radius: 13px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.toggle.active {
  background: var(--secondary);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  transition: var(--transition);
}

.toggle.active::after {
  left: 25px;
}

/* ====== MODAL ====== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

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

.modal-body {
  padding: 24px;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-light);
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray);
  font-size: 0.95rem;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark);
}

.ingredient-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.ingredient-list li {
  padding: 8px 12px;
  background: var(--gray-lighter);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  position: relative;
  padding-left: 24px;
}

.ingredient-list li::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.instruction-list {
  list-style: none;
  counter-reset: step;
}

.instruction-list li {
  counter-increment: step;
  padding: 12px 0 12px 48px;
  position: relative;
  border-bottom: 1px solid var(--gray-lighter);
  font-size: 0.95rem;
  line-height: 1.6;
}

.instruction-list li:last-child {
  border-bottom: none;
}

.instruction-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.nutrition-item {
  text-align: center;
  padding: 12px;
  background: var(--gray-lighter);
  border-radius: var(--radius-sm);
}

.nutrition-item .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.nutrition-item .label {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 4px;
}

/* ====== PROGRESS BAR ====== */
.progress-container {
  max-width: 400px;
  margin: 0 auto 2rem;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0;
}

.progress-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-light);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}

.progress-dot.active {
  background: var(--primary);
  color: var(--white);
}

.progress-dot.completed {
  background: var(--secondary);
  color: var(--white);
}

.progress-line {
  width: 60px;
  height: 3px;
  background: var(--gray-light);
  transition: var(--transition);
}

.progress-line.active {
  background: var(--secondary);
}

.progress-label {
  text-align: center;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 500;
}

/* ====== PILLS / CHIPS ====== */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pill {
  padding: 10px 20px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--gray);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-family);
}

.pill:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.pill.selected {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ====== LOADING ====== */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--gray);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====== EMPTY STATE ====== */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--gray);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.empty-state p {
  font-size: 0.95rem;
}

/* ====== NOTIFICATION ====== */
.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dark);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  font-size: 0.95rem;
  animation: slideUp 0.3s ease;
  max-width: 350px;
}

.notification.success {
  background: var(--success);
}

.notification.error {
  background: var(--danger);
}

/* ====== YOUTUBE VIDEO CARDS ====== */
.youtube-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.youtube-video-card {
  display: block;
  background: var(--gray-lighter);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: var(--dark);
  transition: var(--transition);
  border: 2px solid transparent;
}

.youtube-video-card:hover {
  border-color: #ff0000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.youtube-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.youtube-video-info {
  padding: 8px 10px;
}

.youtube-video-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.youtube-video-channel {
  font-size: 0.75rem;
  color: var(--gray);
}

/* ====== SITE FOOTER ====== */
.site-footer {
  background: var(--dark);
  color: var(--gray-light);
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 600;
  color: var(--white);
}

.footer-contact a {
  color: var(--primary-light);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
  color: var(--primary);
}
