/* FunnyGamez — shared styles */
:root {
  --bg-start: #fffbeb;
  --bg-end: #ffefb0;
  --card: #ffffff;
  --text: #3d3116;
  --muted: #8a7550;
  --accent: #f5a623;
  --accent2: #ff6b35;
  --accent3: #ffd93d;
  --shadow: 0 10px 30px rgba(61, 49, 22, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: linear-gradient(160deg, var(--bg-start), var(--bg-end));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

a { color: var(--accent2); }

/* Header / nav */
.site-header {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow);
}

.site-header .brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.site-header .brand:hover { text-decoration: none; }
.site-header .brand svg { display: block; flex-shrink: 0; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(245, 166, 35, 0.14);
  color: var(--text);
  text-decoration: none;
}

.site-nav a.active {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
}

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; }
}

/* Main content card */
.site-main {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .site-main { padding: 18px; }
}

.site-main h1 { margin-top: 0; }
.site-main h2 { color: var(--text); }
.site-main p, .site-main li { color: var(--muted); line-height: 1.6; }

/* FAQ */
.faq-item {
  border-top: 1px solid rgba(61, 49, 22, 0.1);
  padding: 14px 0;
}

.faq-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.faq-item summary::marker {
  color: var(--accent2);
}

.faq-item p {
  margin: 10px 0 0;
}

/* Footer */
#site-footer {
  margin-top: 28px;
  padding-top: 20px;
  text-align: center;
}

.site-footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.site-footer-links a:hover { color: var(--accent2); }

.site-footer-copy {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* Installed app (standalone) — simplified shell: no top nav, bottom tab bar */
.app-tab-nav {
  display: flex;
  justify-content: space-around;
  gap: 4px;
}

.app-tab-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
}

.app-tab-nav a .tab-icon {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.app-tab-nav a.active {
  color: var(--accent2);
}

.app-footer-legal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.app-footer-legal a {
  color: var(--muted);
  text-decoration: none;
}

.app-footer-legal a:hover { color: var(--accent2); }

@media (display-mode: standalone) {
  .site-header .site-nav {
    display: none;
  }

  .container {
    padding-bottom: 110px;
  }

  #site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 251, 235, 0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(61, 49, 22, 0.08);
    box-shadow: 0 -6px 20px rgba(61, 49, 22, 0.1);
    z-index: 100;
  }
}

/* Generator */
.generator { text-align: center; }

.generator .lead {
  max-width: 480px;
  margin: 0 auto 24px;
}

.category-toggle-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.category-toggle {
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid rgba(61, 49, 22, 0.08);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.category-toggle:hover { box-shadow: var(--shadow); }

.category-toggle.active {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
}

.generate-btn {
  font-size: 20px;
  padding: 18px 44px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(245, 166, 35, 0.4);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.generate-btn:hover { transform: translateY(-2px); }
.generate-btn:active { transform: scale(0.97); }

.result-card {
  margin: 28px auto 0;
  max-width: 560px;
  background: linear-gradient(135deg, #fff, #fffaf0);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 20px;
  padding: 32px 26px;
  box-shadow: var(--shadow);
  min-height: 90px;
  text-align: left;
}

.result-card.empty {
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card .game-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.result-card .game-instructions {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.result-card.pop { animation: pop 0.25s ease; }

@keyframes pop {
  0% { transform: scale(0.94); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.reject-btn {
  background: #fff;
  border: 2px solid var(--accent2);
  color: var(--accent2);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.reject-btn:hover { background: rgba(255, 107, 53, 0.1); }

.copy-btn {
  background: #fff;
  border: 2px solid var(--muted);
  color: var(--muted);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn:hover { background: rgba(138, 117, 80, 0.1); }

.counter {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* Contact / suggest forms */
.site-main form label {
  display: block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 14px;
}

.site-main form input,
.site-main form textarea,
.site-main form select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid rgba(61, 49, 22, 0.15);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.site-main form button[type="submit"] {
  margin-top: 16px;
  padding: 12px 24px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Donate section */
.donate-box {
  margin-top: 24px;
  padding: 18px 20px;
  background: rgba(245, 166, 35, 0.1);
  border: 1px dashed rgba(245, 166, 35, 0.5);
  border-radius: 16px;
}

.donate-box p { color: var(--text); }

.donate-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 22px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 999px;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.donate-btn:hover { opacity: 0.92; }

/* Blog cards */
.card { background: linear-gradient(135deg, #fff, #fffaf0); border: 1px solid rgba(245, 166, 35, 0.2); border-radius: 16px; padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card h2 { margin-top: 0; margin-bottom: 6px; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { color: var(--accent2); }
.card .post-date { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
