/* ============================================
   ROOT & BASE STYLES
   ============================================ */

:root {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, sans-serif;
}

body {
  margin: 0;
  background: #0b0d10;
  color: #e6edf3;
  min-height: 100vh;
}


/* ============================================
   LAYOUT
   ============================================ */

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 16px;
}


/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-size: 1.5rem;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

h1 span {
  font-size: 1.8rem;
}

.subtitle {
  color: #8b949e;
  margin-bottom: 24px;
  font-size: 0.95rem;
}


/* ============================================
   CARD COMPONENT
   ============================================ */

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 24px;
}


/* ============================================
   STEP COMPONENT
   ============================================ */

.step {
  margin-bottom: 20px;
}

.step:last-child {
  margin-bottom: 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.step-num {
  background: #238636;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.step-num.done {
  background: #1f6feb;
}

.step-title {
  font-weight: 600;
  font-size: 1rem;
}

.step-content {
  margin-left: 40px;
}


/* ============================================
   FORM CONTROLS
   ============================================ */

select,
button {
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 10px 14px;
  border: none;
  cursor: pointer;
}

/* Select Dropdown */
select {
  background: #21262d;
  color: #e6edf3;
  border: 1px solid #30363d;
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b949e'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select:focus {
  outline: 2px solid #1f6feb;
}

/* Buttons */
button {
  background: #238636;
  color: #fff;
  font-weight: 600;
  width: 100%;
  margin-top: 12px;
  transition: background 0.15s;
}

button:hover:not(:disabled) {
  background: #2ea043;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary {
  background: #30363d;
}

button.secondary:hover:not(:disabled) {
  background: #3d444d;
}

button.danger {
  background: #da3633;
}

button.danger:hover:not(:disabled) {
  background: #e5534b;
}


/* ============================================
   FILE INPUT
   ============================================ */

.file-input-wrap {
  margin-top: 12px;
  display: none;
}

.file-input-wrap.visible {
  display: block;
}

.file-input-wrap input[type="file"] {
  width: 100%;
  color: #8b949e;
  font-size: 0.9rem;
}

#customFile {
  display: none;
}


/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-wrap {
  margin-top: 20px;
  margin-left: 40px;
  display: none;
}

.progress-wrap.visible {
  display: block;
}

progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #21262d;
  border: none;
}

progress::-webkit-progress-bar {
  background: #21262d;
  border-radius: 4px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #238636, #2ea043);
  border-radius: 4px;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, #238636, #2ea043);
  border-radius: 4px;
}


/* ============================================
   STATUS MESSAGES
   ============================================ */

.status {
  margin-top: 12px;
  margin-left: 40px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.status.visible {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.status.info {
  background: #161b22;
  border: 1px solid #30363d;
  color: #8b949e;
}

.status.success {
  background: #0d1117;
  border: 1px solid #238636;
  color: #3fb950;
}

.status.error {
  background: #0d1117;
  border: 1px solid #da3633;
  color: #ff7b72;
}

.status.waiting {
  background: #0d1117;
  border: 1px solid #9e6a03;
  color: #d29922;
}

.status-warning {
  color: #d29922;
  font-size: 0.85rem;
  white-space: nowrap;
}


/* ============================================
   HELP & UTILITY
   ============================================ */

.help {
  margin-top: 20px;
  font-size: 0.85rem;
  color: #8b949e;
  line-height: 1.5;
}

.help a {
  color: #58a6ff;
  text-decoration: none;
}

.help a:hover {
  text-decoration: underline;
}

.device-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #30363d;
}


/* ============================================
   FOOTER
   ============================================ */

.footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #21262d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #8b949e;
}

.footer-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer a {
  color: #58a6ff;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}