/* =========================================
   KitchenMaster - SleepScore Style UI
   ========================================= */

:root {
  --primary: #6366f1; /* Indigo */
  --primary-dark: #4f46e5;
  --secondary: #a855f7; /* Purple */
  --bg-main: #fcfcfd;
  --bg-section: #f3f4f6;
  --text-dark: #111827;
  --text-gray: #4b5563;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius: 12px;
}

/* 1. Global Reset */
* { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Pretendard', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
}

/* 2. Navigation */
.site-nav {
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
}
.nav-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
  text-decoration: none;
  color: var(--text-gray);
  font-weight: 600;
  font-size: 0.95rem;
}
.share-trigger {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

/* 3. Hero Section */
.hero-section {
  padding: 4rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
}
.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
.hero-content .highlight { color: var(--primary); }
.hero-content p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-gray);
  font-size: 1.1rem;
}

/* 4. Tool Grid & Cards */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.section-heading {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-align: center;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.tool-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  border-top: 5px solid var(--primary);
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-card.purple { border-color: var(--secondary); }
.tool-card.indigo { border-color: var(--primary); }
.tool-card.pink { border-color: #ec4899; }
.tool-card.blue { border-color: #3b82f6; }

.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.tool-card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.75rem; }
.tool-card p { font-size: 0.95rem; color: var(--text-gray); margin-bottom: 1.5rem; flex: 1; }
.use-now-btn {
  background: var(--text-dark);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.use-now-btn:hover { background: #000; }

/* 5. Guide Section */
.guide-section {
  background-color: var(--bg-section);
  padding: 5rem 1.5rem;
}
.guide-container { max-width: 800px; margin: 0 auto; }
.guide-article {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.guide-article h3 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--primary); }

/* 6. Ads Containers */
.ad-container { padding: 1rem 1.5rem; text-align: center; }
.ad-placeholder {
  background: #eee;
  border: 1px dashed #ccc;
  padding: 2.5rem;
  border-radius: var(--radius);
  color: #999;
  font-size: 0.85rem;
}

/* 7. Footer */
.site-footer {
  background: var(--text-dark);
  color: white;
  padding: 4rem 1.5rem;
}
.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #9ca3af; text-decoration: none; font-size: 0.85rem; }
.copyright { width: 100%; margin-top: 3rem; color: #6b7280; font-size: 0.8rem; border-top: 1px solid #374151; padding-top: 1.5rem; }

/* 8. Modal Customization */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  flex-direction: column;
}
.modal-overlay.active { display: flex; }
.modal-header {
  padding: 1rem 1.5rem;
  background: #111827;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}
.modal-body { flex: 1; overflow-y: auto; padding-bottom: 100px; position: relative; }
.tabs { display: flex; gap: 1rem; }
.tab-btn {
  background: none; border: none; color: #9ca3af;
  font-weight: 700; cursor: pointer; padding: 0.5rem 0;
  position: relative;
}
.tab-btn.active { color: var(--primary); }
.tab-btn.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 3px; background: var(--primary);
}
.add-btn-round {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 60px; height: 60px; border-radius: 50%; background: var(--primary);
  color: white; border: none; font-size: 2rem; font-weight: bold; cursor: pointer;
  box-shadow: var(--shadow-lg); z-index: 2100;
}
