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

:root {
  --bg: #09090b;
  --card-bg: #111115;
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f4f4f6;
  --text-muted: #71717a;
  --accent: #ffffff;
  --accent-hover: #e4e4e7;
  --accent-text: #09090b;
  --surface: #18181d;
  --surface-hover: #1f1f26;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 380px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.subscription-badge {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--card-border);
  padding: 7px 14px;
  border-radius: 999px;
}

.subscription-badge strong {
  color: var(--text-main);
  font-weight: 600;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.2s ease;
}

.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  text-align: center;
}

.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 14px;
  text-align: center;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.input::placeholder {
  color: #52525b;
}

.input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--surface-hover);
}

.key-error {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: -4px;
}

.btn {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

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

.btn-primary:active:not(:disabled) {
  transform: scale(0.99);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  height: 36px;
  font-size: 13px;
}

.btn-ghost:hover {
  color: var(--text-main);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 20px;
  background: var(--surface);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.32);
}

.dropzone.selected {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.24);
}

.upload-icon {
  width: 26px;
  height: 26px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.dropzone-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 4px;
  word-break: break-all;
}

.dropzone-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.wait-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 8px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--text-main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.wait-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.timer {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 22px;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 1s linear;
}

.done-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 6px;
  gap: 12px;
}

.check-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-circle svg {
  width: 20px;
  height: 20px;
}

.done-filename {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
  word-break: break-all;
  text-align: center;
}
