/* ═══════════════════════════════════════
   MORSE CODE TRANSLATION — SHARED STYLES
   Used by: index, alphabet, dictionary,
   abbreviations, blog, about, contact,
   privacy, terms
═══════════════════════════════════════ */

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

/* BASE */
body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #111;
  color: #f0f0f0;
  min-height: 100vh;
}

/* ── HEADER ── */
header {
  background: #1a1a1a;
  border-bottom: 2px solid #2a2a2a;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { font-size: 0; font-weight: 700; color: #fff; letter-spacing: 0; word-spacing: 0; text-decoration: none; display: flex; align-items: center; gap: 4px; }
.logo span, .logo svg { display: inline-block; }
.logo-text { font-size: 15px; color: #fff; }
.logo-text span { color: #f5a623; font-size: 15px; }
nav { display: flex; gap: 2px; }
nav a {
  color: #888; text-decoration: none; font-size: 13px;
  padding: 6px 13px; border-radius: 4px; transition: all .15s;
}
nav a:hover, nav a.active { color: #fff; background: #2a2a2a; }

/* ── PAGE WRAPPER ── */
.page { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }

/* ── TYPOGRAPHY ── */
h1 { font-size: 26px; font-weight: 700; color: #fff; margin-bottom: 22px; }
h2 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 14px; }
h3 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 10px; }

/* ── CARDS ── */
.card {
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}
.card-pad { padding: 20px; }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 11px; font-weight: 700; color: #666;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid #272727;
}

/* ── SMALL BUTTONS ── */
.sm-btn {
  background: #252525; border: 1px solid #333; color: #888;
  font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 4px;
  cursor: pointer; transition: all .15s; font-family: 'Roboto', sans-serif;
}
.sm-btn:hover { background: #2e2e2e; color: #ccc; border-color: #444; }

/* ── CONTROL BUTTONS (big icon buttons) ── */
.ctrl-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; width: 68px; height: 64px; border-radius: 6px; border: none;
  cursor: pointer; font-family: 'Roboto', sans-serif;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: #fff; transition: filter .15s;
}
.ctrl-btn svg { display: block; flex-shrink: 0; }
.ctrl-btn:hover { filter: brightness(1.18); }
.ctrl-btn:active { filter: brightness(.9); transform: scale(.97); }
.btn-play    { background: #c0392b; }
.btn-play.playing { background: #27ae60; }
.btn-pause   { background: #e67e22; }
.btn-stop    { background: #555; }
.btn-toggle  { background: #222; border: 1px solid #333; color: #777; }
.btn-toggle.on { border-color: #f5a623; color: #f5a623; }

/* ── ALPHABET GRID (shared by index + alphabet page) ── */
.alpha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 5px; }
.alpha-item {
  background: #181818; border: 1px solid #2a2a2a; border-radius: 5px;
  padding: 8px 4px; text-align: center; cursor: pointer; transition: all .15s;
}
.alpha-item:hover { border-color: #f5a623; background: #1f1a10; }
.alpha-char { font-family: 'Roboto Mono', 'Courier New', monospace; font-size: 14px; font-weight: 700; color: #e8e8e8; }
.alpha-code { font-family: 'Roboto Mono', 'Courier New', monospace; font-size: 10px; color: #f5a623; margin-top: 3px; letter-spacing: 1px; }

/* ── CONTENT SECTIONS ── */
.content-section {
  background: #1e1e1e; border: 1px solid #2e2e2e;
  border-radius: 8px; padding: 20px; margin-bottom: 16px;
}
.content-section h2 { font-size: 16px; color: #fff; margin-bottom: 10px; font-weight: 700; }
.content-section h3 {
  font-size: 11px; color: #888; margin: 18px 0 8px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
}
.content-section p { color: #fff; line-height: 1.75; font-size: 13px; margin-bottom: 8px; }
.content-section strong { color: #f5a623; }
.content-section ul, .content-section ol {
  padding-left: 20px; color: #fff; line-height: 1.9; font-size: 13px;
}

/* ── FAQ ACCORDION ── */
.faq-item { border: 1px solid #272727; border-radius: 5px; margin-bottom: 5px; overflow: hidden; }
.faq-q {
  padding: 11px 14px; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; font-size: 13px; color: #fff; background: #181818;
  font-weight: 500; transition: background .15s;
}
.faq-q:hover { background: #1f1f1f; }
.faq-q .arr { color: #f5a623; font-size: 11px; transition: transform .2s; }
.faq-q.open .arr { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 10px 14px 12px; color: #fff; line-height: 1.75;
  font-size: 13px; background: #181818; border-top: 1px solid #272727;
}
.faq-a.open { display: block; }

/* ── BREADCRUMB ── */
.breadcrumb {
  font-size: 12px; color: #555; margin-bottom: 18px;
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: #666; text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: #f5a623; }
.breadcrumb span { color: #444; }

/* ── PAGE INTRO ── */
.page-intro {
  color: #888; font-size: 14px; line-height: 1.7;
  margin-bottom: 24px; max-width: 680px;
}

/* ── BADGE / TAG ── */
.badge {
  display: inline-block;
  background: #252525; border: 1px solid #333;
  color: #888; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-orange { background: #2a1f0a; border-color: #5a3a0a; color: #f5a623; }

/* ── TABLE ── */
table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
th {
  text-align: left; padding: 9px 12px;
  background: #191919; color: #666;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; border-bottom: 1px solid #272727;
}
td {
  padding: 10px 12px; border-bottom: 1px solid #1e1e1e;
  color: #fff; vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #1a1a1a; }
td.morse { font-family: 'Roboto Mono', monospace; color: #f5a623; letter-spacing: 1px; }

/* ── PLAY ICON BUTTON (small, inline) ── */
.play-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: #c0392b; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; transition: filter .15s; flex-shrink: 0;
}
.play-icon:hover { filter: brightness(1.2); }
.play-icon svg { display: block; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #222; border: 1px solid #f5a623; color: #f5a623;
  padding: 8px 20px; border-radius: 5px; font-size: 12px;
  opacity: 0; transition: all .25s; pointer-events: none; z-index: 999;
  white-space: nowrap; font-family: 'Roboto Mono', monospace;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid #222; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  max-width: 960px; margin: 30px auto 0;
}
.f-links { display: flex; gap: 18px; }
footer a { color: #555; font-size: 12px; text-decoration: none; transition: color .15s; }
footer a:hover { color: #aaa; }
.f-copy { font-size: 11px; color: #333; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  header { padding: 0 14px; }
  nav { display: none; }
  .page { padding: 20px 14px 50px; }
  h1 { font-size: 22px; }
  table { font-size: 12px; }
  th, td { padding: 8px 8px; }
}
