/* ===================================================
   BrightForge Tools Page – tools.css
   =================================================== */

/* Hero Banner */
.tools-hero {
  position: relative;
  padding: 140px 0 80px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1b2e 50%, #0a0e1a 100%);
}

.tools-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(0, 174, 239, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(100, 60, 220, 0.08) 0%, transparent 70%);
  z-index: 0;
}

.tools-hero .content {
  position: relative;
  z-index: 1;
}

.tools-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 174, 239, 0.12);
  border: 1px solid rgba(0, 174, 239, 0.3);
  color: #00aeef;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.tools-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  color: #f0f4ff;
}

.tools-hero h1 span {
  background: linear-gradient(135deg, #00aeef, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tools-hero p {
  font-size: 1.05rem;
  color: #a0aec0;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Tools Grid ─────────────────────────────────── */
.tools-section {
  padding: 80px 0 100px;
  background: #0a0e1a;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 3rem;
}

/* ─── Tool Card ──────────────────────────────────── */
.tool-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px 28px 24px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00aeef, #a855f7);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 174, 239, 0.25);
  box-shadow: 0 20px 50px rgba(0, 174, 239, 0.08);
}

.tool-card:hover::before {
  opacity: 1;
}

/* Card Header */
.tool-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(0, 174, 239, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #00aeef;
  flex-shrink: 0;
}

.tool-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 2px;
}

.tool-card-header p {
  font-size: 0.78rem;
  color: #718096;
  margin: 0;
}

/* ─── Inputs & Controls ──────────────────────────── */
.tool-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e2e8f0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  padding: 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  resize: vertical;
}

.tool-input:focus {
  outline: none;
  border-color: rgba(0, 174, 239, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.08);
}

.tool-input::placeholder {
  color: #4a5568;
}

select.tool-input {
  cursor: pointer;
}

select.tool-input option {
  background-color: #0F172A;
  /* Dark theme background */
  color: #e2e8f0;
  /* Light text */
  padding: 10px;
}

textarea.tool-input {
  min-height: 90px;
  font-family: 'Courier New', monospace;
}

/* Options Row */
.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}

.tool-option-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #a0aec0;
  cursor: pointer;
  user-select: none;
}

.tool-option-label input[type="checkbox"] {
  accent-color: #00aeef;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.tool-range-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.tool-range-group label {
  font-size: 0.8rem;
  color: #a0aec0;
  white-space: nowrap;
}

input[type="range"].tool-range {
  flex: 1;
  accent-color: #00aeef;
  cursor: pointer;
}

.range-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #00aeef;
  min-width: 28px;
  text-align: right;
}

/* Hash type tabs */
.hash-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.hash-tab-btn {
  padding: 5px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #a0aec0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

.hash-tab-btn.active,
.hash-tab-btn:hover {
  background: rgba(0, 174, 239, 0.15);
  border-color: rgba(0, 174, 239, 0.4);
  color: #00aeef;
}

/* Buttons */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 10px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tool-btn-primary {
  background: linear-gradient(135deg, #00aeef, #006fad);
  color: #fff;
}

.tool-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 174, 239, 0.35);
  transform: translateY(-1px);
}

.tool-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a0aec0;
}

.tool-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.tool-btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

.tool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ─── Result Box ─────────────────────────────────── */
.tool-result {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  min-height: 48px;
}

.result-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a5568;
  margin-bottom: 6px;
}

.result-value {
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  color: #00aeef;
  word-break: break-all;
  line-height: 1.5;
}

.result-value.placeholder {
  color: #4a5568;
  font-style: italic;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
}

.result-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.result-row .result-value {
  flex: 1;
}

/* Copy feedback */
.copy-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #718096;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-btn:hover,
.copy-btn.copied {
  background: rgba(0, 174, 239, 0.1);
  border-color: rgba(0, 174, 239, 0.4);
  color: #00aeef;
}

/* ─── Password Checker – security.org style ──────── */

/* Input row with inlined eye button */
.pw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-field {
  padding-right: 44px !important;
}

.pw-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #4a5568;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  transition: color 0.2s;
}

.pw-toggle-btn:hover {
  color: #00aeef;
}

/* Crack-time hero block */
.crack-hero {
  margin: 20px 0 16px;
  text-align: center;
  padding: 28px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  animation: fadeInUp 0.35s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.crack-hero-sentence {
  font-size: 0.9rem;
  color: #718096;
  line-height: 1.6;
}

.crack-hero-time {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 8px 0;
  line-height: 1.1;
  transition: color 0.4s ease;
}

/* Strength label row */
.pw-strength-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  margin-top: 4px;
}

.pw-criteria-score {
  font-size: 0.78rem;
  color: #718096;
}

/* ─── Password Strength ──────────────────────────── */
.strength-meter {
  margin-top: 14px;
}

.strength-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}

.strength-bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.5s ease, background 0.4s ease;
}

.strength-label {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.strength-tips {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.strength-tips li {
  font-size: 0.78rem;
  color: #718096;
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.3s;
}

.strength-tips li.pass {
  color: #48bb78;
}

.strength-tips li i {
  width: 14px;
  text-align: center;
  font-size: 0.72rem;
}

/* Strength levels */
.str-very-weak {
  background: #fc5c5c;
}

.str-weak {
  background: #f6a623;
}

.str-fair {
  background: #f6d860;
}

.str-strong {
  background: #48bb78;
}

.str-very-strong {
  background: linear-gradient(90deg, #00aeef, #a855f7);
}

.str-very-weak-text {
  color: #fc5c5c;
}

.str-weak-text {
  color: #f6a623;
}

.str-fair-text {
  color: #f6d860;
}

.str-strong-text {
  color: #48bb78;
}

.str-very-strong-text {
  color: #00aeef;
}

/* ─── JSON Result ─────────────────────────────────── */
.json-output {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: #48bb78;
}

.json-error {
  color: #fc5c5c;
}

/* ─── Text Utils Stats ───────────────────────────── */
.text-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.text-stat-box {
  flex: 1;
  min-width: 70px;
  background: rgba(0, 174, 239, 0.08);
  border: 1px solid rgba(0, 174, 239, 0.15);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
}

.text-stat-box .stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: #00aeef;
  display: block;
}

.text-stat-box .stat-lbl {
  font-size: 0.7rem;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── IP Info Grid ───────────────────────────────── */
.ip-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.ip-info-row {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
}

.ip-info-row .ip-key {
  font-size: 0.7rem;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
}

.ip-info-row .ip-val {
  font-size: 0.84rem;
  color: #e2e8f0;
  font-weight: 600;
}

/* ─── Section Header ─────────────────────────────── */
.tools-section .section-header {
  text-align: center;
  margin-bottom: 1rem;
}

.tools-section .section-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #f0f4ff;
  margin-bottom: 0.6rem;
}

.tools-section .section-header p {
  color: #718096;
  font-size: 0.95rem;
}

/* ─── Divider between input/output ──────────────── */
.tool-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 14px 0;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .tools-hero {
    padding: 120px 0 60px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ip-info-grid {
    grid-template-columns: 1fr;
  }
}