/* ===================================================
   Dev Shortcuts Hub — Shared Stylesheet
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  min-height: 100vh;
}

/* ── Navigation Bar ── */
.topnav {
  background: #1a1a1a;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  scrollbar-width: thin;
}

.topnav a {
  color: #ccc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 14px 12px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  letter-spacing: 0.03em;
}

.topnav a:hover { color: #fff; border-bottom-color: var(--accent); }
.topnav a.active { color: #fff; border-bottom-color: var(--accent); }

.topnav .home-link {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  padding: 14px 16px 14px 0;
  margin-right: 8px;
  border-right: 1px solid #333;
  border-bottom: none !important;
  letter-spacing: -0.02em;
}

/* ── Page Header ── */
.page-header {
  background: var(--header-bg, #2b579a);
  color: #fff;
  padding: 40px 48px 32px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 30%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.header-icon {
  font-size: 48px;
  line-height: 1;
}

.header-text h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.header-text p {
  font-size: 15px;
  opacity: 0.75;
  margin-top: 6px;
}

/* ── OS Toggle ── */
.os-toggle-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.2);
  padding: 6px 12px;
  border-radius: 40px;
}

.os-toggle-wrap label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
}

.toggle-switch {
  display: flex;
  background: rgba(0,0,0,0.3);
  border-radius: 20px;
  padding: 2px;
}

.toggle-switch button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.05em;
}

.toggle-switch button.active {
  background: #fff;
  color: var(--header-bg, #2b579a);
}

/* ── Content Area ── */
.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Section ── */
.section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

/* ── Table ── */
.shortcut-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.shortcut-table thead tr {
  background: var(--th-bg, #1a1a1a);
  color: #fff;
}

.shortcut-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shortcut-table td {
  padding: 11px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.shortcut-table tbody tr:last-child td { border-bottom: none; }

.shortcut-table tbody tr:nth-child(odd)  { background: var(--row-odd, #ffffff); }
.shortcut-table tbody tr:nth-child(even) { background: var(--row-even, #f0f4f8); }

.shortcut-table tbody tr:hover { background: var(--row-hover) !important; }

/* ── Key Badge ── */
kbd {
  display: inline-block;
  background: #fff;
  border: 1px solid #ccc;
  border-bottom: 3px solid #aaa;
  border-radius: 5px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.key-cell { white-space: nowrap; }
.key-cell kbd + kbd { margin-left: 3px; }
.key-cell .plus {
  font-size: 11px;
  color: #999;
  margin: 0 2px;
  font-weight: 700;
}

/* ── Code Block (PHP/snippets) ── */
.code-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 12px 16px;
  border-radius: 6px;
  overflow-x: auto;
  position: relative;
  white-space: pre;
  line-height: 1.6;
}

.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #cdd6f4;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  transition: var(--transition);
}

.copy-btn:hover { background: rgba(255,255,255,0.2); }
.copy-btn.copied { color: #a6e3a1; border-color: #a6e3a1; }

/* Syntax colors */
.token-keyword  { color: #cba6f7; }
.token-function { color: #89b4fa; }
.token-string   { color: #a6e3a1; }
.token-comment  { color: #6c7086; font-style: italic; }
.token-variable { color: #f38ba8; }
.token-number   { color: #fab387; }

/* ── Snippet Table ── */
.snippet-table { width: 100%; border-collapse: collapse; }
.snippet-table th {
  background: var(--th-bg);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.snippet-row td {
  padding: 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--border-color, #e8e8e8);
}
.snippet-row:nth-child(odd) td  { background: var(--row-odd); }
.snippet-row:nth-child(even) td { background: var(--row-even); }
.snippet-desc strong { display: block; margin-bottom: 4px; font-weight: 600; }
.snippet-desc small  { color: #666; font-size: 12px; line-height: 1.4; }

/* ── Search tip tag ── */
.tip-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-right: 6px;
}

/* ── Print ── */
@media print {
  .topnav, .os-toggle-wrap { display: none; }
  body { background: white; }
  .shortcut-table { box-shadow: none; }
  .page-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .shortcut-table tbody tr:nth-child(odd)  { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .shortcut-table tbody tr:nth-child(even) { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .page-header { padding: 24px 20px; }
  .header-inner { flex-wrap: wrap; }
  .os-toggle-wrap { margin-left: 0; }
  .content { padding: 20px 12px 48px; }
  .header-text h1 { font-size: 24px; }
}

  /* Footer */
  .site-footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid #1a1a1a;
    color: #444;
    font-size: 13px;
  }

  .site-footer a { color: #f59e0b; text-decoration: none; }
