
/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fa;
  color: #2d3748;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  min-height: 60px;
  flex-wrap: wrap;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  padding: 12px 0;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
/* ===== HEADER SEARCH ===== */
.search-icon-btn {
  background: rgba(255,255,255,.15);
  border: none; border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; color: white; flex-shrink: 0;
}
.search-icon-btn:hover { background: rgba(255,255,255,.28); }
/* Search modal */
.search-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 9999;
  align-items: flex-start; justify-content: center; padding-top: 80px;
}
.search-modal-overlay.open { display: flex; }
.search-modal {
  background: #fff; border-radius: 16px; padding: 24px;
  width: min(600px, 90vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); position: relative;
}
.search-modal h2 { margin: 0 0 16px; font-size: 1.2rem; color: #2d3748; }
.search-modal-form { display: flex; gap: 8px; }
.search-modal-input {
  flex: 1; padding: 12px 16px; border: 2px solid #e2e8f0;
  border-radius: 10px; font-size: 1rem; outline: none; transition: border-color .2s;
}
.search-modal-input:focus { border-color: #764ba2; }
.search-modal-submit {
  padding: 12px 20px; background: linear-gradient(135deg,#667eea,#764ba2);
  color: white; border: none; border-radius: 10px; font-size: 1rem; cursor: pointer;
}
.search-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 1.6rem; cursor: pointer; color: #718096;
}
.search-modal-close:hover { color: #2d3748; }
/* ===== COOKIE POPUP ===== */
.subpage-links {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 24px;
}
.subpage-link {
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  background:#f1f5f9;
  color:#1e293b;
  text-decoration:none;
  font-weight:700;
  border:1px solid #dbeafe;
  transition:all .2s ease;
}
.subpage-link:hover {
  background:#dbeafe;
  color:#1d4ed8;
  transform:translateY(-1px);
}
.subpage-link.active {
  background:linear-gradient(135deg,#2563eb,#7c3aed);
  color:#fff;
  border-color:transparent;
}
.subpage-note {
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:18px;
  padding:24px;
  color:#475569;
  box-shadow:0 10px 30px rgba(15,23,42,.06);
}

.cookie-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1a202c;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  max-width: 320px;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .88rem;
  line-height: 1.5;
  animation: slideUp .4s ease;
}
.cookie-popup a { color: #a78bfa; }
.btn-cookie-ok {
  background: linear-gradient(135deg,#667eea,#764ba2);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  cursor: pointer;
  font-weight: 600;
  align-self: flex-start;
  transition: opacity .2s;
}
.btn-cookie-ok:hover { opacity: .85; }
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}
.main-nav a {
  color: rgba(255,255,255,.88);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: .85rem;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(255,255,255,.15); color: white; }
.main-nav .fav-link { background: rgba(255,255,255,.12); }
.fav-count { background: #f6ad55; color: #744210; border-radius: 10px; padding: 1px 6px; font-size: .75rem; font-weight: 700; display: none; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 0;
}
.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  font-size: .85rem;
  color: #718096;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.breadcrumb-inner a { color: #667eea; text-decoration: none; }
.breadcrumb-inner a:hover { text-decoration: underline; }
.bc-sep { color: #cbd5e0; }

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: 24px; }
.page-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
  line-height: 1.2;
}
.page-subtitle {
  color: #718096;
  font-size: 1rem;
}

/* ===== HERO (INDEX) ===== */
.hero {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 16px;
  padding: 40px 32px;
  margin-bottom: 40px;
  text-align: center;
}
.hero-title { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.hero-sub { font-size: 1.05rem; opacity: .9; }

/* ===== SECTION TITLES ===== */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid #667eea;
}

/* ===== CATEGORIES GRID ===== */
.categories-section { margin-bottom: 40px; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.cat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: #2d3748;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102,126,234,.25);
  border-color: #667eea;
  color: #667eea;
}
.cat-icon { font-size: 2rem; }
.cat-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.cat-info p { font-size: .82rem; color: #718096; }

/* ===== QUICK LINKS ===== */
.quick-section { margin-bottom: 40px; }
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.quick-link {
  background: white;
  border: 2px solid #667eea;
  color: #667eea;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
}
.quick-link:hover { background: #667eea; color: white; }

/* ===== SORT BAR ===== */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.sort-label { color: #718096; font-size: .9rem; }
.sort-btn {
  padding: 7px 18px;
  border: 2px solid #667eea;
  border-radius: 20px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  background: white;
  color: #667eea;
  transition: all .2s;
}
.sort-btn.active, .sort-btn:hover { background: #667eea; color: white; }

/* ===== GREETINGS LIST ===== */
.greetings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.greeting-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
}
.greeting-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.greeting-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #4a5568;
  margin-bottom: 16px;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}
.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-like {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 2px solid #fc8181;
  border-radius: 20px;
  cursor: pointer;
  background: white;
  color: #c53030;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
  min-width: 70px;
}
.btn-like:hover, .btn-like.liked { background: #fc8181; color: white; border-color: #fc8181; }
.btn-like.liked { background: #e53e3e; border-color: #e53e3e; }
.like-count { font-weight: 700; }
.btn-fav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 2px solid #f6ad55;
  border-radius: 20px;
  cursor: pointer;
  background: white;
  color: #744210;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
}
.btn-fav:hover, .btn-fav.faved { background: #f6ad55; color: #744210; }
.btn-copy {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 2px solid #68d391;
  border-radius: 20px;
  cursor: pointer;
  background: white;
  color: #276749;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
}
.btn-copy:hover { background: #68d391; color: #276749; }

/* ===== CATEGORY PAGE ===== */
.category-nav { margin-bottom: 32px; }
.alpha-title { font-size: 1.1rem; font-weight: 600; color: #4a5568; margin-bottom: 12px; }
.alpha-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px;
  background: white;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.alpha-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #4a5568;
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s;
}
.alpha-link:hover { background: #667eea; color: white; border-color: #667eea; }
.alpha-section { margin-bottom: 32px; }
.alpha-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
}
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.page-link-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all .2s;
}
.page-link-card:hover {
  border-color: #667eea;
  background: #f7f9ff;
  transform: translateX(3px);
}
.page-link-title { color: #2d3748; font-size: .92rem; font-weight: 500; }
.page-link-count { color: #a0aec0; font-size: .78rem; }

/* ===== FAVORITES PAGE ===== */
.favorites-empty {
  text-align: center;
  padding: 60px 20px;
  color: #718096;
}
.favorites-empty h2 { font-size: 1.4rem; margin-bottom: 12px; color: #4a5568; }
.favorites-empty p { font-size: 1rem; }
.loading-msg { text-align: center; padding: 40px; color: #718096; }

/* ===== ADS ===== */
.ad-block {
  background: #f7fafc;
  border: 1px dashed #cbd5e0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  margin: 20px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a0aec0;
  font-size: .85rem;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a202c;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: .9rem;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  animation: toastIn .3s ease;
  max-width: 320px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== FOOTER ===== */
.site-footer {
  background: #1a202c;
  color: #a0aec0;
  padding: 40px 16px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.footer-links a {
  color: #667eea;
  text-decoration: none;
  font-size: .88rem;
  transition: color .2s;
}
.footer-links a:hover { color: #9f7aea; text-decoration: underline; }
.footer-copy { font-size: .85rem; color: #718096; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .main-nav a { font-size: .8rem; padding: 6px 8px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,.2);
    gap: 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    width: 100%;
    padding: 10px 0;
    border-radius: 0;
    font-size: .95rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .hero { padding: 28px 20px; }
  .hero-title { font-size: 1.5rem; }
  .page-title { font-size: 1.5rem; }
  .categories-grid { grid-template-columns: 1fr; }
  .cat-card { padding: 16px; }
  .greeting-card { padding: 16px; }
  .greeting-text { font-size: .97rem; }
  .card-actions { gap: 6px; }
  .btn-like, .btn-fav, .btn-copy { padding: 6px 10px; font-size: .8rem; }
  .pages-grid { grid-template-columns: 1fr; }
}

/* ===== CONTACT / PRIVACY PAGES ===== */
.static-page { max-width: 760px; margin: 0 auto; padding: 32px 16px 60px; }
.static-page h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 24px; color: #1a202c; }
.static-page h2 { font-size: 1.25rem; font-weight: 600; margin: 28px 0 10px; color: #2d3748; }
.static-page p, .static-page li { color: #4a5568; line-height: 1.75; margin-bottom: 10px; }
.contact-form { background: white; border-radius: 16px; padding: 32px; box-shadow: 0 2px 16px rgba(0,0,0,.08); margin-top: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; color: #2d3748; margin-bottom: 6px; font-size: .95rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 2px solid #e2e8f0; border-radius: 8px;
  font-size: 1rem; font-family: inherit; transition: border-color .2s;
  background: #f7fafc; box-sizing: border-box;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: #667eea; background: white;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group-honey { display: none !important; }
.form-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; }
.form-check input[type=checkbox] { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; accent-color: #667eea; }
.form-check label { font-size: .9rem; color: #4a5568; line-height: 1.5; }
.form-check a { color: #667eea; }
.btn-submit {
  background: linear-gradient(135deg,#667eea,#764ba2);
  color: white; border: none; border-radius: 10px;
  padding: 12px 32px; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: opacity .2s, transform .1s;
}
.btn-submit:hover { opacity: .9; transform: translateY(-1px); }
.form-success { background: #c6f6d5; color: #276749; padding: 14px 20px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.form-error { background: #fed7d7; color: #9b2c2c; padding: 14px 20px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }

/* ===== SEARCH PAGE ===== */
.search-results-list { list-style: none; padding: 0; margin-top: 20px; }
.search-results-list li { border-bottom: 1px solid #e2e8f0; }
.search-results-list a {
  display: block; padding: 12px 4px;
  color: #667eea; text-decoration: none; font-size: 1rem;
  transition: color .15s;
}
.search-results-list a:hover { color: #764ba2; text-decoration: underline; }
.search-no-results { color: #718096; font-size: 1rem; padding: 24px 0; }

@media (max-width: 480px) {
  .main-content { padding: 16px 12px 32px; }
  .hero { padding: 24px 16px; border-radius: 10px; }
  .greeting-card { padding: 14px; border-radius: 8px; }
  .card-actions { gap: 5px; }
  .btn-like, .btn-fav, .btn-copy {
    padding: 5px 8px;
    font-size: .78rem;
    border-width: 1px;
  }
  .sort-bar { gap: 6px; }
  .sort-btn { padding: 5px 12px; font-size: .8rem; }
}
