:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-2: #1a1a24;
  --surface-3: #242430;
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --text: #f5f5ff;
  --muted: #a0a0b0;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 18px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 58, 237, 0.18), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.12), transparent 30%);
}

.page-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.75);
  border-bottom: 1px solid var(--border);
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.back-link:hover {
  color: var(--accent-2);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.logo span {
  color: var(--accent-2);
}

.tool-page {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.tool-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
}

.tool-icon-large {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--border);
  font-size: 2.5rem;
  flex-shrink: 0;
}

.tool-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  margin: 8px 0 8px;
}

.tool-hero p {
  color: var(--muted);
  margin: 0;
  max-width: 500px;
}

.tool-category {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  background: rgba(6, 182, 212, 0.1);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.tool-workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-body input,
.tool-body textarea,
.tool-body select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.tool-body textarea {
  resize: vertical;
  min-height: 140px;
}

.tool-body input:focus,
.tool-body textarea:focus,
.tool-body select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.tool-body input[type="color"] {
  padding: 0;
  border: none;
  height: 60px;
  cursor: pointer;
}

.tool-body input[type="range"] {
  padding: 0;
  height: 8px;
  border-radius: 999px;
  accent-color: var(--accent);
}

.tool-body input[type="file"] {
  padding: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn.secondary {
  background: var(--surface-3);
  color: var(--text);
}

.btn.secondary:hover {
  background: #303040;
}

.btn-large {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-bar {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.output {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-word;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.output.success {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

.output.error {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface-2);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.08);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.upload-prompt p {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

.upload-prompt .hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 6px;
}

.file-info {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 0.9rem;
  align-items: center;
}

.file-info span:first-child {
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.file-info span:last-child {
  color: var(--muted);
  font-size: 0.8rem;
}

.result-card {
  margin-top: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.result-header {
  padding: 14px 18px;
  background: rgba(124, 58, 237, 0.15);
  border-bottom: 1px solid var(--border);
}

.result-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.result-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.result-body p {
  margin: 0;
  color: var(--muted);
}

.editor-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.editor-panel .panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.editor-panel .panel h3 {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.editor-panel textarea,
.editor-panel .preview {
  width: 100%;
  min-height: 280px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
}

.editor-panel .preview {
  overflow: auto;
  resize: none;
  white-space: normal;
}

.editor-panel textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.counter-display {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.5rem;
  text-align: center;
  padding: 8px 0;
}

.timer-display {
  font-family: 'Space Grotesk', monospace;
  font-size: 1.6rem;
  text-align: center;
  letter-spacing: 0.05em;
  padding: 8px 0;
}

.password-display {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.95rem;
  word-break: break-all;
}

.color-preview {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 6px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.toast.show {
  opacity: 1;
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.4);
  color: #34d399;
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}

.date-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.date-wrap input[type="date"] {
  padding-right: 48px;
  color-scheme: dark;
}

.date-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 1;
  width: 22px;
  height: 22px;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.date-wrap input[type="date"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(1) brightness(1.2) drop-shadow(0 0 6px rgba(124, 58, 237, 0.8));
}

.calendar-icon {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 720px) {
  .editor-panel,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tool-hero {
    flex-direction: column;
    text-align: center;
  }
  .tool-hero h1 {
    font-size: 1.5rem;
  }
  .action-bar {
    justify-content: stretch;
  }
  .action-bar .btn {
    width: 100%;
  }
}

.hidden {
  display: none !important;
}
.seo-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.seo-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}
.seo-section p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 16px;
}
.seo-section ol,
.seo-section ul {
  color: var(--muted);
  line-height: 1.8;
  padding-left: 20px;
  margin: 0 0 16px;
}
.seo-section li {
  margin-bottom: 6px;
}
.seo-section dl {
  margin: 0 0 16px;
}
.seo-section dt {
  color: var(--text);
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.seo-section dd {
  color: var(--muted);
  margin: 0 0 0 0;
  line-height: 1.7;
  padding-left: 4px;
}
.seo-section a {
  color: var(--accent-2);
  text-decoration: none;
  transition: var(--transition);
}
.seo-section a:hover {
  text-decoration: underline;
  filter: brightness(1.2);
}
.seo-section .table-wrap {
  overflow-x: auto;
}
.seo-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 0.9rem;
}
.seo-section th,
.seo-section td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.seo-section th {
  color: var(--text);
  font-weight: 600;
  background: var(--surface-2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.seo-section td {
  color: var(--muted);
}
.seo-section tr:last-child td {
  border-bottom: none;
}
.seo-section h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--text);
}
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.tag-chip {
  background: var(--surface-3);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}
.tag-chip:hover {
  background: var(--accent) !important;
}
