/* =====================================================
   TOOLS LAB PAGE — STYLESHEET
   College of Engineering Technology | Cybersecurity Dept.
   ===================================================== */

/* ── Nav Toggle (mobile) ─────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--muted); border-radius: 2px; transition: all .25s;
}
.nav-active {
  color: var(--accent) !important;
  background: rgba(0,212,170,.1) !important;
  border-radius: 8px;
}

/* ── Tools Hero ──────────────────────────────────────── */
.tools-hero {
  position: relative; overflow: hidden;
  padding: 80px 0 60px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,170,.14) 0%, transparent 70%);
  text-align: center;
}
.tools-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.th-shape {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .2;
}
.th-shape.s1 { width: 380px; height: 380px; background: var(--accent);  top: -120px; left: -80px; }
.th-shape.s2 { width: 300px; height: 300px; background: var(--accent2); bottom: -60px; right: -60px; }

.tools-hero-content { position: relative; }
.tools-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,212,170,.1); border: 1px solid rgba(0,212,170,.3);
  color: var(--accent); padding: 6px 16px; border-radius: 100px;
  font-size: .82rem; font-weight: 600; margin-bottom: 24px;
}
.tools-hero-badge .badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); animation: pulse 2s infinite;
}
.tools-hero-title {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 900; color: #fff; margin-bottom: 16px; line-height: 1.25;
}
.tools-hero-desc {
  max-width: 540px; margin: 0 auto;
  color: var(--muted); font-size: 1rem; line-height: 1.7;
}

/* ── Main Tools Section ──────────────────────────────── */
.tools-section { padding: 60px 0 80px; }

/* ── Tools Grid ──────────────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ── Tool Card ───────────────────────────────────────── */
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
  display: flex; flex-direction: column;
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0,212,170,.12);
  transform: translateY(-2px);
}
.tool-card.link-card {
  border-color: rgba(124,58,237,.35);
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(0,212,170,.05));
  text-decoration: none; color: var(--text);
  cursor: pointer; align-items: center; justify-content: center;
  text-align: center; min-height: 180px;
}
.tool-card.link-card:hover {
  border-color: var(--accent2);
  box-shadow: 0 8px 32px rgba(124,58,237,.2);
}

/* ── Tool Card Header ────────────────────────────────── */
.tool-card-header {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 0;
}
.tool-icon {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.tool-icon svg { width: 22px; height: 22px; }
.tool-icon-1  { background: linear-gradient(135deg, rgba(0,212,170,.25),  rgba(0,212,170,.1));  color: var(--accent);  }
.tool-icon-2  { background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(124,58,237,.1)); color: var(--accent2); }
.tool-icon-3  { background: linear-gradient(135deg, rgba(245,158,11,.25), rgba(245,158,11,.1)); color: var(--accent3); }
.tool-icon-4  { background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(59,130,246,.1)); color: #60a5fa; }
.tool-icon-5  { background: linear-gradient(135deg, rgba(239,68,68,.25),  rgba(239,68,68,.1));  color: var(--danger); }
.tool-icon-6  { background: linear-gradient(135deg, rgba(34,197,94,.25),  rgba(34,197,94,.1));  color: #4ade80; }
.tool-icon-7  { background: linear-gradient(135deg, rgba(249,115,22,.25), rgba(249,115,22,.1)); color: #fb923c; }
.tool-icon-8  { background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(0,212,170,.15)); color: var(--accent); }

.tool-card-header-text { flex: 1; }
.tool-card-header-text h3 {
  font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 4px;
}
.tool-card-header-text p {
  font-size: .82rem; color: var(--muted); line-height: 1.5;
}

/* ── Tool Body ───────────────────────────────────────── */
.tool-body {
  padding-top: 20px;
  flex: 1;
  display: flex; flex-direction: column; gap: 12px;
}

/* ── Inputs ──────────────────────────────────────────── */
.tool-input {
  width: 100%; background: var(--bg3);
  border: 1.5px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: var(--font); font-size: .92rem;
  padding: 11px 14px; outline: none; transition: border-color .2s;
  direction: ltr;
}
.tool-input:focus { border-color: var(--accent); }
.tool-input::placeholder { color: var(--muted); direction: rtl; font-family: var(--font); }

.tool-textarea {
  width: 100%; background: var(--bg3);
  border: 1.5px solid var(--border); border-radius: 10px;
  color: var(--text); font-family: 'Courier New', monospace; font-size: .82rem;
  padding: 11px 14px; outline: none; transition: border-color .2s;
  resize: vertical; direction: ltr; min-height: 80px;
}
.tool-textarea:focus { border-color: var(--accent); }
.tool-textarea::placeholder { font-family: var(--font); color: var(--muted); direction: rtl; }

/* ── Tool Output ─────────────────────────────────────── */
.tool-output {
  background: rgba(10,15,30,.8);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
  font-size: .85rem; font-family: 'Courier New', monospace;
  color: var(--accent); word-break: break-all;
  min-height: 40px; direction: ltr; text-align: left;
  line-height: 1.6;
}
.tool-output.placeholder { color: var(--muted); font-family: var(--font); direction: rtl; text-align: right; font-size: .85rem; }

/* ── Tool Row ────────────────────────────────────────── */
.tool-row {
  display: flex; gap: 8px; align-items: center;
}
.tool-row .tool-output { flex: 1; }

/* ── Copy Button ─────────────────────────────────────── */
.copy-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); padding: 7px 12px; border-radius: 8px;
  cursor: pointer; font-family: var(--font); font-size: .78rem;
  display: flex; align-items: center; gap: 5px;
  transition: all .2s; white-space: nowrap; flex-shrink: 0;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn svg { width: 14px; height: 14px; }

/* ── Btn Group ───────────────────────────────────────── */
.tool-btn-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent), #00a884);
  color: #0a0f1e; font-family: var(--font); font-weight: 700;
  padding: 10px 20px; border-radius: 9px; border: none;
  cursor: pointer; font-size: .88rem; transition: all .22s;
  box-shadow: 0 3px 14px rgba(0,212,170,.25);
}
.tool-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(0,212,170,.4); }
.tool-btn.secondary {
  background: var(--bg3); color: var(--muted);
  border: 1px solid var(--border); box-shadow: none;
  font-weight: 500;
}
.tool-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── Hash Table ──────────────────────────────────────── */
.hash-table {
  width: 100%; border-collapse: collapse; font-size: .82rem;
}
.hash-table tr { border-bottom: 1px solid var(--border); }
.hash-table tr:last-child { border-bottom: none; }
.hash-table td {
  padding: 9px 8px; vertical-align: middle;
}
.hash-table .hash-label {
  color: var(--muted); font-family: var(--font); white-space: nowrap;
  font-size: .8rem; width: 56px; text-align: right; padding-left: 0;
}
.hash-table .hash-value {
  font-family: 'Courier New', monospace; color: var(--accent);
  word-break: break-all; direction: ltr; text-align: left;
}
.hash-table .hash-copy { width: 36px; text-align: center; }
.hash-table-wrap {
  background: rgba(10,15,30,.7); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.hash-loading {
  text-align: center; color: var(--muted); font-size: .85rem;
  padding: 12px; font-family: var(--font);
}

/* ── JWT Section ─────────────────────────────────────── */
.jwt-section { display: flex; flex-direction: column; gap: 10px; }
.jwt-part {
  background: rgba(10,15,30,.7); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.jwt-part-label {
  padding: 6px 12px;
  font-size: .72rem; font-weight: 700; font-family: var(--font);
  letter-spacing: .04em; border-bottom: 1px solid var(--border);
}
.jwt-part-label.header-lbl { color: var(--accent2); background: rgba(124,58,237,.1); }
.jwt-part-label.payload-lbl { color: var(--accent3); background: rgba(245,158,11,.1); }
.jwt-part-label.status-lbl { color: var(--accent); background: rgba(0,212,170,.1); }
.jwt-part pre {
  margin: 0; padding: 10px 14px;
  font-family: 'Courier New', monospace; font-size: .78rem;
  color: var(--text); white-space: pre-wrap; word-break: break-all;
  line-height: 1.6; direction: ltr; text-align: left;
}
.jwt-status { padding: 10px 14px; font-size: .85rem; font-family: var(--font); }
.jwt-valid   { color: #4ade80; }
.jwt-expired { color: var(--danger); }
.jwt-no-exp  { color: var(--muted); }

/* ── B64 Two Column ──────────────────────────────────── */
.b64-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.b64-col { display: flex; flex-direction: column; gap: 8px; }
.b64-col label { font-size: .8rem; color: var(--muted); font-family: var(--font); }

/* ── URL Encoder ─────────────────────────────────────── */
.url-results { display: flex; flex-direction: column; gap: 8px; }
.url-result-item { display: flex; flex-direction: column; gap: 4px; }
.url-result-label { font-size: .75rem; color: var(--muted); font-family: var(--font); }

/* ── IP Card ─────────────────────────────────────────── */
.ip-card {
  background: rgba(10,15,30,.7); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
}
.ip-item { display: flex; flex-direction: column; gap: 2px; }
.ip-label { font-size: .72rem; color: var(--muted); font-family: var(--font); }
.ip-value { font-size: .9rem; color: var(--accent); font-family: 'Courier New', monospace; direction: ltr; }
.ip-loading { text-align: center; color: var(--muted); font-size: .85rem; padding: 12px; font-family: var(--font); grid-column: 1/-1; }
.ip-error   { color: var(--danger); font-size: .85rem; padding: 8px; font-family: var(--font); grid-column: 1/-1; }

/* ── UUID History ────────────────────────────────────── */
.uuid-display {
  background: rgba(10,15,30,.8); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  font-family: 'Courier New', monospace; font-size: .95rem;
  color: var(--accent); direction: ltr; text-align: center;
  letter-spacing: .04em; min-height: 46px;
  display: flex; align-items: center; justify-content: center;
  word-break: break-all;
}
.uuid-history {
  display: flex; flex-direction: column; gap: 5px;
  margin-top: 4px;
}
.uuid-history-title {
  font-size: .75rem; color: var(--muted); font-family: var(--font);
  margin-bottom: 2px;
}
.uuid-history-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 7px; padding: 7px 10px;
}
.uuid-history-item span {
  flex: 1; font-family: 'Courier New', monospace; font-size: .78rem;
  color: var(--muted); direction: ltr; text-align: left;
}

/* ── Entropy ─────────────────────────────────────────── */
.entropy-value {
  font-size: 2.4rem; font-weight: 900; color: var(--accent);
  text-align: center; line-height: 1; font-family: var(--font);
}
.entropy-unit { font-size: .85rem; color: var(--muted); margin-top: 2px; text-align: center; }
.entropy-bar-wrap {
  height: 10px; background: var(--bg3); border-radius: 100px;
  overflow: hidden; margin: 10px 0 6px; border: 1px solid var(--border);
}
.entropy-bar {
  height: 100%; width: 0%; border-radius: 100px;
  transition: width .55s cubic-bezier(.4,0,.2,1), background .3s;
}
.entropy-interpretation {
  font-size: .82rem; text-align: center; font-family: var(--font);
  font-weight: 600; margin-top: 4px;
}

/* ── Link Card (password checker) ───────────────────── */
.link-card-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(124,58,237,.3), rgba(0,212,170,.2));
  display: flex; align-items: center; justify-content: center;
}
.link-card-icon svg { width: 28px; height: 28px; color: var(--accent); }
.link-card-title {
  font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 8px;
}
.link-card-desc { font-size: .85rem; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.link-card-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-size: .88rem; font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 860px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .b64-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .header-nav {
    display: none; flex-direction: column;
    position: absolute; top: 68px; right: 0; left: 0;
    background: rgba(10,15,30,.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    z-index: 99;
  }
  .header-nav.open { display: flex; }
  .header-nav a { padding: 11px 14px; font-size: .92rem; }
  .ip-card { grid-template-columns: 1fr; }
  .tools-hero { padding: 60px 0 40px; }
  .tool-card { padding: 20px; }
}
