:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #273449;
  --border: #334155;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --accent: #0d9488;
  --accent2: #5eead4;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Courier New', 'Consolas', 'Source Code Pro', 'Fira Code', 'Cascadia Code', monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 0.92rem;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.c-container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Header */
.c-header {
  display: flex; align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: sticky; top: 0; z-index: 100;
}
.c-header .c-container {
  width: 100%;
  display: flex; align-items: center; justify-content: flex-start;
}
.c-logo {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.c-logo-icon { font-size: 1.2rem; }
.c-nav { display: flex; gap: 16px; margin-left: 24px; align-items: center; }
.c-nav a { line-height: 1.4;  color: var(--text2); font-size: 0.85rem; transition: color .2s; }
.c-nav a:hover { color: var(--text); text-decoration: none; }

/* Main */
.c-main { padding: 24px 0 40px; }

/* Breadcrumb (d-trail) */
.d-trail {
  font-size: 0.8rem;
  color: var(--text2);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.d-trail a { color: var(--accent2); }
.d-trail span { color: var(--text); }

/* Hero */
.c-hero { margin-bottom: 20px; }
.c-hero h1 { font-size: 1.5rem; margin-bottom: 4px; }
.c-subtitle { color: var(--text2); font-size: 0.9rem; margin-bottom: 16px; }

/* Tool zone (d-toolzone) */
.d-toolzone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  min-height: 120px;
  transition: border-color .2s;
}

/* d-links section */
.d-links { margin-bottom: 20px; }
.d-links h2 {
  font-size: 0.9rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* d-cards */
.d-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.d-card {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.d-card:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  text-decoration: none;
}
.d-card.active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

/* Knowledge section (d-know) */
.d-know {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  line-height: 1.6;
}
.d-know h2, .d-know h3 { font-size: 1rem; margin: 16px 0 8px; }
.d-know h2:first-child, .d-know h3:first-child { margin-top: 0; }
.d-know p { color: var(--text2); margin-bottom: 8px; }
.d-know ul, .d-know ol { padding-left: 20px; margin-bottom: 8px; }
.d-know li { color: var(--text2); margin-bottom: 4px; }

/* Buttons */
.c-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius); border: none;
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.c-btn-primary { background: var(--accent); color: #fff; }
.c-btn-primary:hover { background: var(--accent2); }
.c-btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.c-btn-secondary:hover { border-color: var(--accent); }

/* Inputs */
input[type="text"], input[type="number"], input[type="password"], select, textarea {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: var(--radius);
  font-family: inherit; font-size: 0.88rem;
  width: 100%; max-width: 360px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
}

/* Result area */
.c-result {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  font-size: 1rem;
  word-break: break-all;
}

/* Footer */
.c-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  color: var(--text2);
  font-size: 0.8rem;
}
.c-footer a { color: var(--text2); }

/* Responsive */
@media (max-width: 768px) {
  .c-hero h1 { font-size: 1.2rem; }
  .c-header .c-container {
  width: 100%; flex-direction: column; gap: 6px; }
  .d-cards { gap: 6px; }
  .d-card { padding: 5px 10px; font-size: 0.8rem; }
}

/* NameForge Tool Styles */
.nf-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.nf-optgroup { display: none; }
.nf-optgroup-active { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nf-optgroup label { color: var(--text2); font-size: 0.85rem; }
.nf-cat { padding: 10px 18px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); color: var(--text); cursor: pointer; font-size: 0.9rem; transition: all 0.2s; font-family: inherit; }
.nf-cat:hover { border-color: var(--accent); background: var(--surface2); }
.nf-cat.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: bold; }

.nf-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.nf-controls label { color: var(--text2); font-size: 0.85rem; }
.nf-controls select { padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: inherit; font-size: 0.85rem; }
.nf-controls select:focus { outline: none; border-color: var(--accent); }

.nf-btn { padding: 10px 28px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; font-size: 0.95rem; font-weight: 600; font-family: inherit; transition: background 0.2s; }
.nf-btn:hover { background: #0f766e; }

.nf-item { display: flex; align-items: center; justify-content: flex-start; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; }
.nf-item span { font-size: 1.1rem; font-weight: 500; }
.nf-copy { padding: 6px 16px; background: var(--accent); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-family: inherit; }
.nf-copy:hover { background: #0f766e; }

.nf-name-tag { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; font-weight: 500; min-width: 140px; }
.nf-copy-sm { background: none; border: none; cursor: pointer; font-size: 1.1rem; padding: 2px 6px; border-radius: 4px; }
.nf-copy-sm:hover { background: var(--surface2); }

#nfResults h3 { margin-bottom: 12px; color: var(--accent2); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* ========== AllCalc Two-Column Layout ========== */
.ac-tool { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.ac-input-panel { background: #1f2937; border: 1px solid #374151; border-radius: 12px; padding: 24px; }
.ac-input-panel h3 { color: #5eead4; margin: 0 0 16px; font-size: 18px; }
.ac-result-panel { }
.ac-result-panel h3 { color: #5eead4; margin: 0 0 16px; font-size: 18px; }
.ac-ui { display: flex; flex-direction: column; gap: 14px; }
.ac-ui label { font-size: 14px; color: #d1d5db; display: flex; flex-direction: column; gap: 4px; }
.ac-input, .ac-ui select { padding: 10px 14px; border: 1px solid #374151; border-radius: 8px; background: #111827; color: #f3f4f6; font-size: 15px; width: 100%; }
.ac-btn { padding: 12px 28px; background: #0d9488; color: #fff; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; font-weight: 600; width: 100%; margin-top: 8px; }
.ac-btn:hover { background: #0f766e; }
.ac-result { padding: 20px; background: #1f2937; border-radius: 12px; border: 1px solid #374151; min-height: 100px; }
.ac-result h4 { color: #5eead4; margin: 0 0 10px; font-size: 16px; }
.ac-result p { color: #d1d5db; margin: 6px 0; font-size: 15px; }
.ac-result ul { list-style: none; padding: 0; margin: 8px 0; }
.ac-result ul li { padding: 6px 0; color: #9ca3af; font-size: 14px; border-bottom: 1px solid #1a2435; }
.ac-result ul li:last-child { border-bottom: none; }
.ac-big-result { font-size: 36px; color: #f3f4f6; font-weight: 700; text-align: center; padding: 32px; background: #111827; border-radius: 10px; }
.ac-big-result strong { color: #5eead4; }
.ac-countdown-live { text-align: center; padding: 20px; }
.ac-countdown-digits { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.ac-cd-num { display: block; font-size: 56px; font-weight: 800; color: #5eead4; line-height: 1; }
.ac-cd-label { display: block; font-size: 14px; color: #6b7280; text-transform: uppercase; margin-top: 8px; letter-spacing: 1px; }
.ac-countdown-done { font-size: 30px; color: #5eead4; font-weight: 700; padding: 40px; }
.ac-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 420px; margin: 0 auto; }
.ac-display { grid-column: span 4; padding: 20px; font-size: 30px; text-align: right; background: #111827; border: 1px solid #374151; border-radius: 8px; color: #f3f4f6; font-family: 'Courier New', monospace; }
.ac-calc-btn { padding: 18px; font-size: 22px; background: #1f2937; border: 1px solid #374151; border-radius: 8px; color: #f3f4f6; cursor: pointer; font-weight: 700; }
.ac-calc-btn:hover { background: #374151; }
.ac-calc-btn[data-key="="] { background: #0d9488; }
.ac-calc-btn[data-key="C"] { background: #dc2626; }
.ac-tab-bar { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 20px; padding: 3px; background: #111827; border-radius: 10px; border: 1px solid #1f2937; }
.ac-tab { display: flex; align-items: center; gap: 4px; padding: 8px 14px; background: transparent; border: none; border-radius: 8px; color: #9ca3af; cursor: pointer; font-size: 13px; text-decoration: none; transition: all 0.15s; white-space: nowrap; }
.ac-tab:hover { background: #1f2937; color: #d1d5db; }
.ac-tab-active { background: #0d9488; color: #fff; }
.ac-tab span:first-child { font-size: 16px; }
.ac-hero-calc { max-width: 900px; margin: 0 auto 30px; }
.ac-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 24px 0; }
.ac-cat-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: #1f2937; border: 1px solid #374151; border-radius: 12px; text-decoration: none; transition: all 0.2s; text-align: center; min-height: 110px; }
.ac-cat-card:hover { border-color: #0d9488; background: #111827; transform: translateY(-2px); }
.ac-cat-icon { font-size: 38px; margin-bottom: 10px; }
.ac-cat-label { color: #d1d5db; font-size: 15px; font-weight: 600; }
@media (max-width: 768px) { .ac-tool { grid-template-columns: 1fr; gap: 20px; } .ac-countdown-digits { gap: 16px; } .ac-cd-num { font-size: 40px; } .ac-cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Category sections */
.ac-cat-section { margin-bottom: 32px; }
.ac-cat-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); display: flex; align-items: center; gap: 6px; }
.ac-cat-title span { font-size: 1.1rem; }


/* ===== Improved Tool Page Layout ===== */
  .ac-input-panel, .ac-result-panel { min-width: 100%; }
}
/* Clean tool detail page — appended */
.d-toolzone { max-width: 960px; margin: 0 auto; padding: 0 16px; }
/* Clean single column layout — no result panel */
.d-toolzone { max-width: 960px; margin: 0 auto; padding: 0 16px; }
/* ========== Holiday Calendar ========== */
.ac-calendar { max-width: 900px; margin: 0 auto; }
.ac-cal-month { margin-bottom: 24px; }
.ac-cal-month h3 { color: #5eead4; font-size: 20px; border-bottom: 1px solid #374151; padding-bottom: 8px; margin-bottom: 12px; }
.ac-cal-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ac-cal-list li { }
.ac-cal-list a { display: flex; gap: 12px; align-items: center; padding: 10px 14px; background: #1f2937; border-radius: 8px; color: #d1d5db; text-decoration: none; transition: background .2s; }
.ac-cal-list a:hover { background: #374151; }
.ac-cal-date { font-weight: bold; color: #5eead4; min-width: 45px; font-size: 14px; }
.ac-cal-cat { margin-left: auto; font-size: 12px; color: #9ca3af; background: #111827; padding: 2px 8px; border-radius: 4px; }
