:root {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #334155;
  --border-color: #334155;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --accent-blue: #38bdf8;
  --accent-hover: #0284c7;
  --accent-green: #22c55e;
  --danger-color: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
}

.app-header {
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.brand b { color: var(--accent-blue); }
.security-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-green);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.status-dot { width: 8px; height: 8px; background: var(--accent-green); border-radius: 50%; }

.lang-selector {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-license {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-license:hover { background: var(--border-color); }

.main-container { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }
.hero-section { text-align: center; margin-bottom: 2rem; }
.hero-section h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.hero-section p { color: var(--text-muted); font-size: 1.05rem; }

.converter-selector {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.converter-selector select, .options-panel select, .options-panel input[type="text"], .options-panel input[type="number"] {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 1rem;
  flex: 1;
}

.options-panel {
  background: var(--bg-card);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}
.option-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.chk-label { cursor: pointer; display: flex; align-items: center; gap: 0.35rem; }

.dropzone-card {
  border: 2px dashed var(--border-color);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.dropzone-card:hover, .dropzone-card.drag-over {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.05);
}
.file-input-hidden { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.file-hint { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.5rem; }
.selected-file-info { color: var(--accent-blue); font-weight: 600; margin-top: 0.75rem; }

.progress-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.progress-header { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 0.5rem; }
.progress-bar-bg { width: 100%; height: 10px; background: var(--bg-input); border-radius: 5px; overflow: hidden; }
.progress-bar-fill { width: 0%; height: 100%; background: var(--accent-blue); transition: width 0.1s linear; }
.progress-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; flex-wrap: wrap; gap: 0.5rem; }
.hardware-notice { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; text-align: left; background: rgba(15, 23, 42, 0.4); padding: 0.5rem; border-radius: 4px; }

.action-buttons { display: flex; gap: 1rem; margin: 1.5rem 0; }
.btn-primary {
  background: var(--accent-blue);
  color: #0f172a;
  border: none;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  flex: 1;
  transition: background 0.2s;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
}

.preview-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.preview-tag { background: rgba(56, 189, 248, 0.1); color: var(--accent-blue); padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem; }
.table-wrapper { overflow-x: auto; max-height: 350px; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-family: monospace; }
th, td { border: 1px solid var(--border-color); padding: 0.5rem 0.75rem; text-align: left; }
th { background: var(--bg-input); }

.trust-footer-banner {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}
.trust-footer-banner h4 { color: var(--accent-blue); margin-bottom: 0.35rem; }
.trust-footer-banner code { background: var(--bg-input); padding: 0.15rem 0.4rem; border-radius: 4px; }

/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; justify-content: center; align-items: center; z-index: 100;
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 650px;
  width: 90%;
  padding: 1.5rem;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.btn-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; }
.modal-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.pricing-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.price-box { border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; background: var(--bg-main); text-align: center; }
.price-box.featured { border-color: var(--accent-blue); }
.price-box h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.price-box .price { font-size: 1.5rem; font-weight: 800; color: var(--accent-blue); margin-bottom: 0.75rem; }
.price-box .price span { font-size: 0.75rem; color: var(--text-muted); font-weight: normal; }
.price-box ul { list-style: none; font-size: 0.8rem; color: var(--text-muted); text-align: left; margin-bottom: 1rem; }
.price-box li { margin-bottom: 0.35rem; }
.btn-buy { display: block; background: var(--bg-input); color: var(--text-primary); text-decoration: none; padding: 0.5rem; border-radius: 6px; font-weight: 600; font-size: 0.9rem; }
.btn-buy.featured-btn { background: var(--accent-blue); color: #0f172a; }

.activation-form { border-top: 1px solid var(--border-color); padding-top: 1rem; }
.activation-form label { font-size: 0.9rem; display: block; margin-bottom: 0.5rem; }
.input-group { display: flex; gap: 0.5rem; }
.input-group input { flex: 1; background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-primary); padding: 0.6rem; border-radius: 6px; }
.activation-msg { margin-top: 0.5rem; font-size: 0.85rem; }
.modal-recovery-info { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; }
.modal-recovery-info a { color: var(--accent-blue); text-decoration: none; }
