/* ===== Tool Site Shared Styles ===== */
:root {
  --bg-dark: #0f1117;
  --bg-card: #1a1d27;
  --bg-input: #252836;
  --accent: #6c5ce7;
  --accent-hover: #5a4bd1;
  --text: #e4e6eb;
  --text-muted: #8b8fa3;
  --border: #2d3142;
  --success: #00b894;
  --danger: #e74c3c;
  --warning: #fdcb6e;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo i { font-size: 1.5rem; }

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* Main */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}

/* Hero */
.hero {
  text-align: center;
  padding: 40px 0 50px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent), #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Search */
.search-box {
  max-width: 500px;
  margin: 24px auto 0;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus { border-color: var(--accent); }
.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.15);
}

.tool-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(108, 92, 231, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
}

.tool-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.tool-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Tool Page */
.tool-page { max-width: 900px; margin: 0 auto; }

.tool-header {
  text-align: center;
  margin-bottom: 32px;
}

.tool-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.tool-header p { color: var(--text-muted); }

.tool-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

 textarea, .tool-box input[type="text"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: 'Courier New', monospace;
  outline: none;
  transition: border-color 0.2s;
}

.tool-box textarea {
  min-height: 200px;
  resize: vertical;
}

.tool-box input:focus, .tool-box textarea:focus { border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }

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

.btn-secondary:hover { border-color: var(--accent); }

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.output-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  min-height: 100px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

.status-msg {
  padding: 10px 16px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.9rem;
}

.status-msg.success { background: rgba(0, 184, 148, 0.1); color: var(--success); }
.status-msg.error { background: rgba(231, 76, 60, 0.1); color: var(--danger); }

/* Ad placeholder */
.ad-slot {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 24px 0;
}

/* Options row */
.options-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.option-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-group label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.option-group input[type="range"] {
  width: 200px;
  accent-color: var(--accent);
}

.option-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.value-badge {
  background: var(--bg-input);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

/* Color preview */
.color-preview {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.color-value {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  text-align: center;
  padding: 12px;
  background: var(--bg-input);
  border-radius: 8px;
  cursor: pointer;
}

.color-value:hover { border: 1px solid var(--accent); }

/* FAQ */
.faq-section { margin-top: 40px; }
.faq-section h2 { font-size: 1.5rem; margin-bottom: 20px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq-item h3 { font-size: 1rem; margin-bottom: 8px; color: var(--accent); }
.faq-item p { font-size: 0.9rem; color: var(--text-muted); }

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-links { display: none; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr; }
}
