/* ============================================================
   PrivacyToolsFree.com — Shared Stylesheet
   Aesthetic: Dark Security Lab — Precise, Technical, Trustworthy
   ============================================================ */

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

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:    #0a0e17;
  --bg-secondary:  #0f1623;
  --bg-surface:    #151d2e;
  --bg-elevated:   #1a2438;
  --bg-hover:      #1f2d45;

  --accent-green:  #00d4aa;
  --accent-cyan:   #00b4d8;
  --accent-blue:   #4361ee;
  --accent-red:    #ef233c;
  --accent-yellow: #f8c537;

  --text-primary:  #e8edf5;
  --text-secondary:#8fa3c0;
  --text-muted:    #4a6080;
  --text-mono:     #00d4aa;

  --border-subtle: rgba(255,255,255,0.06);
  --border-accent: rgba(0,212,170,0.25);
  --border-focus:  rgba(0,212,170,0.6);

  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 20px rgba(0,212,170,0.12);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* === BACKGROUND GRID TEXTURE === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,170,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* === SITE HEADER / NAV === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,23,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-green);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-bracket {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* === PAGE LAYOUT === */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* === BREADCRUMB === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover { color: var(--accent-green); }
.breadcrumb .sep { color: var(--text-muted); opacity: 0.4; }
.breadcrumb .current { color: var(--accent-green); }

/* === TOOL HEADER === */
.tool-header {
  margin-bottom: 36px;
}

.tool-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-cyan);
  background: rgba(0,180,216,0.08);
  border: 1px solid rgba(0,180,216,0.2);
  border-radius: 100px;
  padding: 4px 10px;
  margin-bottom: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-category-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

h1.tool-title {
  font-family: var(--font-sans);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.tool-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
}

/* === PRIVACY BADGE === */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,212,170,0.06);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--accent-green);
  font-family: var(--font-mono);
  margin-top: 20px;
}

.privacy-badge svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* === TOOL CARD === */
.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition);
}

.tool-card:hover {
  border-color: rgba(0,212,170,0.12);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

/* === DROPZONE === */
.dropzone {
  border: 2px dashed rgba(0,212,170,0.2);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(0,212,170,0.02);
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent-green);
  background: rgba(0,212,170,0.05);
  box-shadow: var(--shadow-glow);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone-icon {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}

.dropzone-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.dropzone-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* === INPUTS === */
textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px 16px;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  line-height: 1.6;
}

textarea:focus, input[type="text"]:focus, input[type="number"]:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0,212,170,0.08);
}

textarea::placeholder, input::placeholder {
  color: var(--text-muted);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-green);
  color: #0a0e17;
}

.btn-primary:hover {
  background: #00e8bb;
  box-shadow: 0 4px 16px rgba(0,212,170,0.3);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: rgba(255,255,255,0.12);
}

.btn-danger {
  background: rgba(239,35,60,0.12);
  color: var(--accent-red);
  border: 1px solid rgba(239,35,60,0.2);
}

.btn-danger:hover {
  background: rgba(239,35,60,0.2);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* === CONTROLS ROW === */
.controls-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.control-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* === OUTPUT AREA === */
.output-area {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 80px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
}

.output-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
  font-style: italic;
}

/* === CANVAS CONTAINER === */
.canvas-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

canvas {
  max-width: 100%;
  display: block;
  cursor: crosshair;
}

/* === STATUS / ALERTS === */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: var(--font-mono);
  margin-top: 12px;
}

.status-success {
  background: rgba(0,212,170,0.08);
  border: 1px solid rgba(0,212,170,0.2);
  color: var(--accent-green);
}

.status-error {
  background: rgba(239,35,60,0.08);
  border: 1px solid rgba(239,35,60,0.2);
  color: var(--accent-red);
}

.status-info {
  background: rgba(0,180,216,0.08);
  border: 1px solid rgba(0,180,216,0.2);
  color: var(--accent-cyan);
}

.status-warning {
  background: rgba(248,197,55,0.08);
  border: 1px solid rgba(248,197,55,0.2);
  color: var(--accent-yellow);
}

/* === SLIDER === */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-elevated);
  outline: none;
  border: none;
  padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,212,170,0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
  border: none;
}

/* === CHECKBOX / TOGGLE === */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-green);
  cursor: pointer;
}

/* === METADATA TABLE === */
.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}

.meta-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
}

.meta-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
  vertical-align: top;
  word-break: break-all;
}

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

.meta-table td:first-child {
  color: var(--accent-cyan);
  font-weight: 500;
  white-space: nowrap;
  padding-right: 20px;
  min-width: 160px;
}

.meta-table tr:hover td {
  background: rgba(255,255,255,0.015);
}

/* === PILL TAGS === */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
}

.tag-green { background: rgba(0,212,170,0.1); color: var(--accent-green); }
.tag-red   { background: rgba(239,35,60,0.1); color: var(--accent-red); }
.tag-cyan  { background: rgba(0,180,216,0.1); color: var(--accent-cyan); }
.tag-yellow{ background: rgba(248,197,55,0.1); color: var(--accent-yellow); }

/* === LOADING SPINNER === */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,212,170,0.2);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === PROGRESS BAR === */
.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* === SECTION DIVIDER === */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 28px 0;
}

/* === INFO BOX === */
.info-box {
  background: rgba(0,180,216,0.05);
  border: 1px solid rgba(0,180,216,0.15);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.info-box strong { color: var(--text-primary); }

/* === EXAMPLE USAGE === */
.example-section {
  margin-top: 40px;
}

.example-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.example-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.example-block .ex-label {
  color: var(--accent-green);
  font-weight: 600;
}

/* === RELATED TOOLS === */
.related-tools {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.related-tools h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.related-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-decoration: none;
  transition: all var(--transition);
  display: block;
}

.related-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.related-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.related-card-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* === SITE FOOTER === */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent-green); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* === MOBILE NAV HAMBURGER === */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.2s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(10,14,23,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px 20px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.nav-mobile-menu a:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* === TABLE OVERFLOW WRAPPER === */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.meta-table {
  min-width: 420px;
}

/* === CANVAS TOUCH === */
canvas {
  touch-action: none;
}

/* === RESPONSIVE — TABLET (768px) === */
@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .control-group {
    min-width: 120px;
  }
}

/* === RESPONSIVE — MOBILE (640px) === */
@media (max-width: 640px) {
  /* Layout */
  .page-wrapper { padding: 24px 16px 60px; }
  .tool-card { padding: 20px 16px; }
  .controls-row { flex-direction: column; }

  /* Buttons */
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; justify-content: center; }

  /* Nav */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Inputs — prevent iOS auto-zoom (font-size must be ≥16px) */
  textarea,
  input[type="text"],
  input[type="number"],
  select {
    font-size: 16px !important;
  }

  /* Tables */
  .meta-table td:first-child {
    min-width: 110px;
    padding-right: 12px;
  }

  /* Related grid — single column on very small screens */
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Tool header */
  h1.tool-title { font-size: 22px; }
  .tool-description { font-size: 14px; }

  /* Breadcrumb */
  .breadcrumb { font-size: 11px; gap: 5px; flex-wrap: wrap; }

  /* Dropzone */
  .dropzone { padding: 32px 16px; }
  .dropzone-icon { font-size: 32px; }

  /* Footer links */
  .footer-links { gap: 14px; }
}

/* === UTILITY === */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.text-mono { font-family: var(--font-mono); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-cyan { color: var(--accent-cyan); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
