/* Tools page specific styles */
body {
  align-items: flex-start;
  padding: 60px 20px 60px;
  overflow-y: auto;
  overflow-x: hidden;
}

.tools-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
  animation: cardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 32px;
  cursor: none;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--accent-glow); }
.back-btn svg { transition: transform 0.2s; }
.back-btn:hover svg { transform: translateX(-3px); }

/* Page header */
.tools-header {
  margin-bottom: 32px;
}
.tools-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tools-title svg {
  color: var(--accent-glow);
}
.tools-subtitle {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  font-weight: 300;
}

/* Tool card */
.tool-card {
  background: rgba(26, 26, 26, 0.7);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(137, 233, 0, 0.05),
    0 24px 60px rgba(0,0,0,0.5);
  position: relative;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 48px; height: 48px;
  border-top: 2px solid rgba(137, 233, 0, 0.35);
  border-left: 2px solid rgba(137, 233, 0, 0.35);
  border-radius: 20px 0 0 0;
}

.tool-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-glow);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-card-title::before {
  content: '';
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent-glow);
}

/* Form fields */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.field input[type="number"] {
  background: rgba(137, 233, 0, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  cursor: none;
}
.field input[type="number"]:focus {
  border-color: rgba(137, 233, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(137, 233, 0, 0.09);
}
.field input[type="number"]::-webkit-inner-spin-button { opacity: 0.4; }

/* Checkboxes */
.checks-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: none;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
  flex: 1;
  background: rgba(137, 233, 0, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.check-label:hover { color: var(--white); border-color: rgba(137, 233, 0, 0.25); }
.check-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1px solid rgba(137, 233, 0, 0.35);
  border-radius: 5px;
  background: transparent;
  flex-shrink: 0;
  cursor: none;
  transition: all 0.2s;
  position: relative;
}
.check-label input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* Buttons */
.btn-row {
  display: flex;
  gap: 10px;
}
.btn-primary {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  border: none;
  border-radius: 12px;
  color: white;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: none;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(137, 233, 0, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(137, 233, 0, 0.40);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 12px 16px;
  background: rgba(137, 233, 0, 0.07);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: none;
  transition: all 0.25s;
  white-space: nowrap;
}
.btn-secondary:hover {
  border-color: rgba(137, 233, 0, 0.35);
  color: var(--white);
  background: rgba(137, 233, 0, 0.10);
}
.btn-secondary.copied {
  border-color: rgba(34, 197, 94, 0.5);
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
}

/* Output area */
.pw-output {
  margin-top: 20px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.pw-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pw-output-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.pw-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(137, 233, 0, 0.25) transparent;
}
.pw-list::-webkit-scrollbar { width: 4px; }
.pw-list::-webkit-scrollbar-track { background: transparent; }
.pw-list::-webkit-scrollbar-thumb { background: rgba(137, 233, 0, 0.25); border-radius: 2px; }

.pw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(137, 233, 0, 0.04);
  border: 1px solid rgba(137, 233, 0, 0.10);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.2s;
}
.pw-row:hover { border-color: rgba(137, 233, 0, 0.22); }
.pw-text {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.5px;
  word-break: break-all;
}
.copy-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(137, 233, 0, 0.18);
  border-radius: 7px;
  padding: 5px 7px;
  color: var(--muted);
  cursor: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.copy-btn:hover {
  border-color: rgba(137, 233, 0, 0.45);
  color: var(--accent-glow);
  background: rgba(137, 233, 0, 0.09);
}
.copy-btn.copied {
  border-color: rgba(34, 197, 94, 0.5);
  color: #22c55e;
}

@media (max-width: 480px) {
  .tools-container { padding: 0; }
  .field-row { grid-template-columns: 1fr; }
  .checks-row { flex-direction: column; }
}