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

:root {
  --bg: #0f0f13;
  --card: #1a1a2e;
  --card-hover: #222240;
  --border: #2a2a3e;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-1: #8b5cf6;
  --accent-2: #7c3aed;
  --accent-3: #6d28d9;
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  --gradient-text: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

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

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ---- NAV ---- */
nav {
  background: rgba(15, 15, 19, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.logo-icon { font-size: 1.4rem; }
.logo:hover { color: var(--accent-1); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  transition: .2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-1);
  background: rgba(139, 92, 246, .1);
}
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.4rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ---- HERO ---- */
.hero {
  text-align: center;
  padding: 60px 0 20px;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- AD SLOT ---- */
.ad-slot {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
  margin: 24px 0;
}

/* ---- TOOL CARD ---- */
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* ---- UPLOAD ---- */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: .3s;
  position: relative;
}
.upload-area:hover,
.upload-area.dragover {
  border-color: var(--accent-1);
  background: rgba(139, 92, 246, .05);
}
.upload-icon { font-size: 3rem; margin-bottom: 12px; }
.upload-area p { color: var(--text-muted); margin: 4px 0; }
.upload-hint { font-size: .8rem !important; margin-top: 8px !important; }
.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ---- FILE INFO ---- */
.file-info {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(139, 92, 246, .08);
  border: 1px solid rgba(139, 92, 246, .2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.file-info.show { display: flex; }
.file-icon { font-size: 1.5rem; }
.file-details { flex: 1; min-width: 0; }
.file-name {
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size { color: var(--text-muted); font-size: .8rem; }
.file-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: .2s;
}
.file-remove:hover { color: #ef4444; }

/* ---- OPTIONS ---- */
.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.option-group {
  flex: 1;
  min-width: 200px;
}
.option-group label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-1);
  cursor: pointer;
  border: 2px solid var(--card);
  box-shadow: 0 0 6px rgba(139, 92, 246, .4);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-1);
  cursor: pointer;
  border: 2px solid var(--card);
  box-shadow: 0 0 6px rgba(139, 92, 246, .4);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: .3s;
  width: 100%;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, .3);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, .45);
}
.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ---- PROGRESS ---- */
.progress-bar {
  display: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 20px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  border-radius: 3px;
  transition: width .4s ease;
}

/* ---- STATUS ---- */
.status-msg {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: .9rem;
  font-weight: 500;
}
.status-msg.show { display: flex; }
.status-msg.loading { background: rgba(139, 92, 246, .1); color: var(--accent-1); }
.status-msg.success { background: rgba(34, 197, 94, .1); color: #22c55e; }
.status-msg.error { background: rgba(239, 68, 68, .1); color: #ef4444; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- RESULT ---- */
.result-area {
  display: none;
  margin-top: 24px;
}
.result-area.show { display: block; }
.result-card {
  background: rgba(139, 92, 246, .05);
  border: 1px solid rgba(139, 92, 246, .15);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.checkered-bg {
  background-image: linear-gradient(45deg, #2a2a3e 25%, transparent 25%),
    linear-gradient(-45deg, #2a2a3e 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2a3e 75%),
    linear-gradient(-45deg, transparent 75%, #2a2a3e 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #1a1a2e;
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  justify-content: center;
}
.result-preview {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-sm);
}
.result-info {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 16px 0;
  font-size: .85rem;
  color: var(--text-muted);
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: .3s;
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, .35);
}

/* ---- HOW-TO ---- */
.how-to {
  margin: 48px 0;
  text-align: center;
}
.how-to h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 32px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  transition: .3s;
}
.step:hover {
  border-color: var(--accent-1);
  transform: translateY(-4px);
}
.step-number {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.step p {
  color: var(--text-muted);
  font-size: .9rem;
}

/* ---- FEATURES ---- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 48px 0;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: .3s;
}
.feature:hover {
  border-color: var(--accent-1);
  transform: translateY(-2px);
}
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.feature p {
  color: var(--text-muted);
  font-size: .9rem;
}

/* ---- FAQ ---- */
.faq {
  margin: 48px 0;
}
.faq h2 {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: .2s;
}
.faq-q::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--accent-1);
  transition: .3s;
}
.faq-item.open .faq-q::after {
  transform: rotate(45deg);
}
.faq-q:hover { background: var(--card-hover); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-item.open .faq-a { max-height: 200px; }
.faq-a p {
  padding: 0 24px 18px;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
}

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  color: var(--text-muted);
  font-size: .85rem;
}
.footer-links {
  display: flex;
  list-style: none;
  gap: 20px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .85rem;
  transition: .2s;
}
.footer-links a:hover { color: var(--accent-1); }

/* ---- PAGE CONTENT (about, privacy, contact) ---- */
.page-content {
  padding: 48px 0;
}
.page-content h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
}
.page-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--accent-1);
}
.page-content p,
.page-content li {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}
.page-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}
.page-content a {
  color: var(--accent-1);
  text-decoration: none;
}
.page-content a:hover { text-decoration: underline; }

.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 600px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  transition: .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .15);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .tool-card { padding: 20px; }
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
  }
  .nav-links.open { display: flex; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: .95rem; }
  .container { padding: 0 12px; }
  .options-row { flex-direction: column; }
}
