/* =========================================================
   Cook Anything Kitchen Unified Stylesheet
   Cleaned, optimized, and dark-mode ready
   ========================================================= */

/* ---------- 1. Variables & Dark Mode ---------- */
:root {
  --accent: #0369a1;
  --accent-hover: #0284c7;
  --text: #111827;
  --muted: #6b7280;
  --bg: #f1f5f9;
  --white: #ffffff;
}
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

*{box-sizing:border-box}

/* ---------- 2. Shared Layout ---------- */
header.header, header.builder-header {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:16px 40px;background:var(--white);
  box-shadow:0 1px 4px rgba(0,0,0,0.08);
  gap:12px;z-index:1000;
}
.header .logo, .builder-header .logo {
  display:flex;flex-direction:column;align-items:center;gap:8px;
  font-weight:700;font-size:1.25rem;color:#0f172a;
}
.header .logo img,.builder-header img{width:120px;height:auto;object-fit:contain}
.header-nav,.nav-links,.header .nav{
  display:flex;gap:16px;flex-wrap:wrap;justify-content:center;align-items:center
}
.header-nav a,.nav-links a,.header .nav a{
  text-decoration:none;color:var(--accent);font-weight:500;transition:color .2s
}
.header-nav a:hover,.nav-links a:hover,.header .nav a:hover{
  color:var(--accent-hover);text-decoration:underline
}

/* ---------- 3. Demo Banner ---------- */
.demo-banner{
  background:var(--accent);color:#fff;text-align:center;
  padding:10px 12px;font-weight:600;font-size:.95rem;letter-spacing:.01em;
  box-shadow:0 1px 4px rgba(0,0,0,0.1);position:sticky;top:0;z-index:1200
}
.demo-banner a{color:#fff;text-decoration:underline;font-weight:700}
.demo-banner a:hover{opacity:.9}

/* ---------- 4. Hero, Filter, Sort ---------- */
section.hero{
  background:var(--white);margin:24px auto;max-width:1100px;border-radius:16px;
  padding:40px;text-align:center;box-shadow:0 4px 10px rgba(0,0,0,0.05)
}
.hero h1{font-size:2rem;font-weight:900;margin-bottom:12px;color:#0f172a}
.hero p{font-size:1rem;color:#374151}
.filter-bar{
  display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:24px auto;
  max-width:1100px;position:sticky;top:15px;z-index:10
}
.filter-bar select,.filter-bar input,.sort-bar select{
  padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;
  background:whitesmoke;font-size:1rem;transition:border-color .2s,background .2s
}
.filter-bar input{width:315px}
.filter-bar select{width:175px}
.filter-bar select:focus,.filter-bar input:focus{
  outline:none;border-color:var(--accent);background:#fff
}
.sort-bar{display:flex;align-items:center;justify-content:flex-end;gap:8px;
  max-width:1100px;margin:0 auto 20px;font-size:.95rem;color:#374151}

/* ---------- 5. Recipe Cards & Grid ---------- */
.info-cards{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:20px;width:90%;margin:0 auto 40px;justify-items:center
}
.recipe-card{
  display:flex;flex-direction:column;background:var(--card-bg,var(--white));
  border:1px solid #d1d5db;border-radius:16px;overflow:hidden;text-align:center;
  width:180px;height:240px;box-shadow:0 4px 10px rgba(0,0,0,0.05);
  transition:transform .2s,box-shadow .2s;opacity:0;transform:translateY(10px);
  animation:fadeIn .4s ease forwards
}
.recipe-card:hover{transform:translateY(-4px);box-shadow:0 6px 16px rgba(0,0,0,0.1)}
.recipe-card img{width:100%;height:120px;object-fit:cover}
.recipe-card h3{font-size:14px;font-weight:600;margin:8px 4px 4px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.recipe-card p{font-size:12px;color:#4b5563;margin:0 8px 8px;flex-grow:1;overflow:hidden}
@keyframes fadeIn{to{opacity:1;transform:translateY(0)}}

/* ---------- 6. Pagination ---------- */
.pagination{
  display:flex;justify-content:center;align-items:center;gap:8px;margin:24px 0;
  flex-wrap:wrap
}
.pagination button{
  background:#e2e8f0;border:none;padding:6px 12px;border-radius:6px;
  font-size:14px;cursor:pointer;transition:background .2s ease
}
.pagination button:hover{background:#cbd5e1}
.pagination button.active{background:var(--accent);color:#fff;font-weight:600}

/* ---------- 7. Utility Elements ---------- */
.loading-spinner{
  margin:60px auto;border:4px solid #e2e8f0;border-top:4px solid var(--accent);
  border-radius:50%;width:40px;height:40px;animation:spin .8s linear infinite
}
@keyframes spin{100%{transform:rotate(360deg)}}
#backToTopBtn{
  display:none;position:fixed;bottom:40px;right:40px;z-index:100;
  background-color:var(--accent);color:#fff;border:none;border-radius:50%;
  width:48px;height:48px;font-size:24px;cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,0.2);transition:background .3s,transform .1s
}
#backToTopBtn:hover{background-color:var(--accent-hover);transform:scale(1.1)}

/* ---------- 8. About / License / CTA Sections ---------- */
.about-box{
  width:100%;background:linear-gradient(180deg,#fff,#fff);border-radius:16px;
  box-shadow:0 4px 10px rgba(0,0,0,0.05);padding:40px;text-align:center;
  margin:24px auto;max-width:1100px
}
.about-title{margin:0 0 10px;font-size:1.5rem;line-height:1.3;
  color:#0f172a;font-weight:600}
.about-text{margin:0 0 14px;color:#0f172a;font-size:1rem;line-height:1.6;
  max-width:68ch;margin-inline:auto}
.support-row{display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:8px;margin-top:16px}
.support-btn{
  display:inline-block;padding:10px 16px;text-decoration:none;border-radius:10px;
  font-weight:600;border:1px solid rgba(14,21,32,0.06);
  background:var(--accent);color:var(--white);
  transition:transform .12s ease,box-shadow .12s ease;
  box-shadow:0 2px 8px rgba(14,21,32,0.04)
}
.support-btn:hover,.support-btn:focus{
  transform:translateY(-2px);box-shadow:0 8px 24px rgba(14,21,32,0.08);
  outline:none
}
.pricing-grid{display:grid;gap:20px;margin-top:30px}
@media(min-width:700px){.pricing-grid{grid-template-columns:repeat(3,1fr)}}
.pricing-card{
  background:#fff;border-radius:12px;box-shadow:0 4px 10px rgba(0,0,0,0.05);
  padding:24px;text-align:center;border:1px solid #e5e7eb;
  transition:transform .2s ease,box-shadow .2s ease
}
.pricing-card:hover{transform:translateY(-4px);box-shadow:0 8px 20px rgba(0,0,0,0.08)}
.pricing-card h3{margin-bottom:10px;color:var(--accent);font-size:1.3rem}
.pricing-card p{color:#444;margin-bottom:14px;font-size:.95rem}
.pricing-card strong{display:block;font-size:1.4rem;margin:10px 0;color:#0f172a}
.cta-box{
  text-align:center;margin-top:40px;background:var(--bg);
  padding:30px;border-radius:16px;max-width:900px;margin-inline:auto
}
.cta-box h2{color:var(--accent);font-weight:700}
.cta-box p{color:#374151}

/* ---------- 9. Recipe Builder ---------- */
section.cta{
  display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;
  max-width:1100px;margin:40px auto;background:#fff;border-radius:16px;
  box-shadow:0 4px 10px rgba(0,0,0,0.05);padding:40px;gap:40px
}
.cta-left{flex:1 1 280px;min-width:260px}
.cta-left h3{font-weight:900;font-size:1.6rem;margin-bottom:10px;color:#0f172a}
.cta-left nav a{display:inline-block;color:var(--accent);text-decoration:none;
  font-weight:500;margin-bottom:16px}
.cta-left nav a:hover{text-decoration:underline}
.cta-left p{font-size:.95rem;color:#374151}
.cta-right{flex:2 1 520px;display:flex;flex-direction:column;gap:14px}
.cta-right label{font-weight:500;color:#1e293b}
.cta-right input,.cta-right select,.cta-right textarea{
  padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;
  font-size:1rem;background:#f8fafc;transition:border-color .2s,background .2s
}
.cta-right input:focus,.cta-right select:focus,.cta-right textarea:focus{
  outline:none;border-color:var(--accent);background:#fff
}
.cta-right textarea{min-height:100px;resize:vertical}
#generate-btn{
  margin-top:20px;background:var(--accent);color:#fff;border:none;border-radius:8px;
  padding:12px 20px;font-size:1rem;font-weight:600;cursor:pointer;
  transition:background .25s,transform .1s
}
#generate-btn:hover{background:var(--accent-hover)}
#generate-btn:active{transform:scale(0.98)}

.legal-footer {
  background-color: #f8f8f8;
  padding: 20px;
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid #ddd;
}

.legal-footer .legal-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
}

/* ---------- 10. Footer ---------- */
footer.footer{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:24px 40px;background:#fff;box-shadow:0 -1px 3px rgba(0,0,0,0.05);
  border-top:1px solid #e5e7eb;gap:16px
}
.footer-content{display:flex;flex-direction:column;align-items:center;
  text-align:center;gap:12px;max-width:1000px}
.footer-logo{display:flex;flex-direction:column;align-items:center;gap:8px;
  font-weight:700;font-size:1.1rem;color:#0f172a}
.footer-logo img{width:100px;height:auto;object-fit:contain}
.footer-nav{display:flex;gap:16px;flex-wrap:wrap;justify-content:center}
.footer-nav a{text-decoration:none;color:var(--accent);font-weight:500;transition:color .2s}
.footer-nav a:hover{color:var(--accent-hover);text-decoration:underline}
.footer-copy{font-size:.9rem;color:#64748b;margin-top:8px}

/* ---------- 11. Responsive ---------- */
@media(max-width:768px){
  header.header,header.builder-header{flex-direction:column;text-align:center;gap:8px}
  .filter-bar{flex-direction:column;align-items:center;gap:10px}
  .info-cards{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
  section.cta{flex-direction:column;padding:24px}
  .cta-left,.cta-right{width:100%}
  .about-box{padding:var(--padding,24px)}
  .about-title{font-size:1.125rem}
  .about-text{font-size:.985rem}
  .support-row{width:100%;gap:8px}
  .support-btn{padding:10px 14px;width:auto}
}
