/* ========== BASE ========== */
:root {
  --teal: #198b8b;
  --teal-light: #20a3a3;
  --bg: #f5f9f9;
  --text: #111;
  --border-color: #dfe5e6;
  --card-bg: #fff;
  --hacker-bg: #000;
  --hacker-green: #00ff66;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== HEADER ========== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.2rem;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hambtn {
  font-size: 1.3rem;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(25,139,139,0.4);
}

.hambtn:hover {
  background: var(--teal-light);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand .logo-text {
  font-weight: 700;
  font-size: 1.2rem;
}

.brand small {
  color: #666;
  font-size: 0.8rem;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a.active {
  color: var(--teal);
}

.nav a:hover {
  color: var(--teal-light);
  text-shadow: 0 0 8px rgba(25,139,139,0.4);
}

/* Mobile nav */
@media (max-width: 750px) {
  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #fff;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
  }
  .nav.show {
    display: flex;
  }
}

/* ========== MAIN GRID ========== */
.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== CARDS ========== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.6rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: transform 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(25,139,139,0.15);
}

.card h3 {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sectionbar {
  height: 4px;
  background: var(--teal);
  border-radius: 3px;
  margin-bottom: 0.6rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
}

.t-web { background: #198b8b; }
.t-wifi { background: #1e91b1; }
.t-phrase { background: #845ec2; }
.t-pin { background: #cc5a71; }
.t-api { background: #198b8b; }

/* ========== INPUTS & OUTPUTS ========== */
label {
  display: block;
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
  font-weight: 500;
}

input, select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fafcfc;
}

input:focus, select:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 8px rgba(25,139,139,0.2);
}

/* Hacker-style output area */
.output {
  background: var(--hacker-bg);
  color: var(--hacker-green);
  border: 1px solid #111;
  border-radius: 6px;
  padding: 0.6rem;
  min-height: 32px;
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  white-space: pre-wrap;
  flex: 1;
  box-shadow: inset 0 0 10px rgba(0,255,0,0.15);
  text-shadow: 0 0 6px rgba(0,255,0,0.3);
}

/* For hash previews */
#bulk_preview, .info.hash {
  background: #000;
  color: var(--hacker-green);
  font-family: "Fira Code", monospace;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 0.5rem;
  box-shadow: inset 0 0 8px rgba(0,255,0,0.2);
}

/* ========== BUTTONS ========== */
.btn {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 3px 10px rgba(25,139,139,0.2);
}

.btn:hover {
  background: var(--teal-light);
  box-shadow: 0 6px 14px rgba(25,139,139,0.25);
}

.btn.secondary {
  background: #e8f1f1;
  color: var(--teal);
}

.btn.secondary:hover {
  background: #d7ebeb;
}

.btn.small {
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
}

/* Copy button */
.btn.copy {
  flex-shrink: 0;
  background: #e8f1f1;
  color: var(--teal);
}
.btn.copy:hover {
  background: #d7ebeb;
}

/* ========== SIDEBAR ========== */
.sidecard {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem;
  height: fit-content;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

.sidecard h3 {
  margin-top: 0.4rem;
  margin-bottom: 0.5rem;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sidebar-links li {
  margin: 5px 0;
}

.sidebar-links a {
  text-decoration: none;
  color: var(--teal);
  font-weight: 600;
}

.sidebar-links a:hover {
  color: var(--teal-light);
  text-shadow: 0 0 8px rgba(25,139,139,0.4);
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  padding: 1.2rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  background: #f8fbfb;
}

/* ========== BLOG BODY ========== */
.blog-body {
  margin-top: 1rem;
  line-height: 1.7;
  font-size: 1.05rem;
}

.blog-body h2, .blog-body h3 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  color: var(--teal);
}

.blog-body p {
  margin-bottom: 1rem;
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 20px auto;
    padding: 0 10px;
  }

  .card {
    padding: 0.9rem;
    margin-bottom: 1rem;
  }

  .output-row {
    flex-direction: column;
    align-items: stretch;
  }

  .output {
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .btn.copy {
    width: 100%;
    margin-top: 0.3rem;
  }

  input,
  select {
    width: 100%;
    font-size: 1rem;
  }

  .header {
    flex-wrap: wrap;
  }

  .brand small {
    display: none;
  }

  .hambtn {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }

  .sidecard {
    margin-top: 0.5rem;
  }
}
