:root {
  --bg: #ebe8f0;
  --card: #ffffff;
  --text: #2a2438;
  --muted: #6b6280;
  --accent: #c44dff;
  --accent-dark: #7b2cbf;
  --header-bg: linear-gradient(135deg, #5b2d8e 0%, #c44dff 45%, #00d4ff 100%);
  --shadow: 0 1px 3px rgba(60, 20, 80, 0.12);
  --radius: 3px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100%;
  padding-bottom: 40px;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Top bar */
.topbar {
  background: #1a1228;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-logo {
  color: #f0e8ff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.topbar-logo:hover {
  color: #fff;
  text-decoration: none;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.topbar-links a {
  color: #ccc;
}

.topbar-links a:hover {
  color: #fff;
}

/* Header */
.site-header {
  background: var(--header-bg);
  padding: 28px 16px 24px;
  text-align: center;
}

.site-header h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
  line-height: 1.15;
}

.site-header h1 a {
  color: inherit;
  text-decoration: none;
}

.site-header .tagline {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  margin-top: 8px;
  font-weight: 400;
}

/* Translator - LingoJam two-panel layout */
.translator-wrap {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 12px;
}

.translator {
  display: flex;
  gap: 0;
  min-height: 420px;
}

.panel {
  flex: 1;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-label {
  background: #f5f0fa;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e4dceb;
}

.panel textarea {
  display: block;
  width: 100%;
  height: 380px;
  min-height: 380px;
  border: none;
  outline: none;
  resize: vertical;
  padding: 18px;
  font-size: 22px;
  font-family: inherit;
  line-height: 1.5;
  background: var(--card);
  color: var(--text);
}

.panel-output textarea {
  cursor: text;
  user-select: all;
}

.panel + .panel {
  margin-left: 8px;
}

/* Keyword nav pills */
.keyword-nav {
  max-width: 1100px;
  margin: 16px auto 0;
  padding: 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.keyword-nav a {
  background: var(--card);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow);
  border: 1px solid #ddd0e8;
}

.keyword-nav a:hover,
.keyword-nav a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}

/* SEO content block */
.content-block {
  max-width: 800px;
  margin: 24px auto 0;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-block h2 {
  font-size: 1.35rem;
  margin: 1.2em 0 0.6em;
  color: var(--accent-dark);
}

.content-block h2:first-child {
  margin-top: 0;
}

.content-block h3 {
  font-size: 1.1rem;
  margin: 1em 0 0.5em;
  color: var(--accent-dark);
}

.brand-link {
  margin-top: 1.2em;
  padding-top: 1em;
  border-top: 1px solid #eee;
  font-size: 14px;
}

.noscript-notice {
  max-width: 800px;
  margin: 12px auto 0;
  padding: 12px 16px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius);
  font-size: 14px;
  color: #664d03;
}

.content-block ol {
  margin: 0 0 14px 20px;
  font-size: 15px;
  color: #444;
}

.content-block li {
  margin-bottom: 6px;
}

.breadcrumbs {
  max-width: 800px;
  margin: 8px auto 0;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  font-weight: 600;
}

.breadcrumbs span {
  color: var(--text);
}

.content-block p {
  margin-bottom: 14px;
  font-size: 15px;
  color: #444;
}

.content-block ul {
  margin: 0 0 14px 20px;
  font-size: 15px;
  color: #444;
}

/* More generators grid */
.more-generators {
  max-width: 800px;
  margin: 20px auto 0;
  padding: 0 12px;
}

.more-generators h2,
.more-generators h3 {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.footer-keywords {
  margin-bottom: 12px;
  line-height: 1.8;
  font-size: 12px;
}

.gen-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.gen-grid a {
  background: var(--card);
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: var(--shadow);
  border: 1px solid #e8e0f0;
}

.gen-grid a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* Info pages */
.page-main {
  max-width: 800px;
  margin: 24px auto;
  padding: 0 12px;
}

.page-main .content-block {
  margin-top: 0;
}

.back-home {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 40px 16px 20px;
  font-size: 13px;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
}

.site-footer p {
  margin-bottom: 6px;
}

/* Mobile: stack panels; keep input short so output stays on-screen */
@media (max-width: 768px) {
  .site-header {
    padding: 18px 14px 16px;
  }

  .site-header h1 {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }

  .translator-wrap {
    margin-top: 12px;
  }

  .translator {
    flex-direction: column;
    min-height: auto;
  }

  .panel + .panel {
    margin-left: 0;
    margin-top: 8px;
  }

  .panel textarea {
    height: auto;
    min-height: 0;
    font-size: 17px;
    padding: 12px 14px;
  }

  .panel-input textarea {
    height: 96px;
    min-height: 88px;
    max-height: 160px;
    resize: vertical;
  }

  .panel-output textarea {
    height: 240px;
    min-height: 200px;
    resize: vertical;
  }
}

@media (max-width: 380px) {
  .panel-input textarea {
    height: 80px;
    min-height: 72px;
  }

  .panel-output textarea {
    height: 200px;
    min-height: 160px;
  }
}
