* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #e8eef8;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 20px;
}

/* Переключение экранов */
.screen {
  display: none;
  width: 100%;
  justify-content: center;
}

.screen.active {
  display: flex;
}

/* Основной контейнер */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 400px;
  margin-top: 100px;
}

/* Карточка 1 */
.card-container {
  position: relative;
  background-color: #ffffff;
  width: 100%;
  padding: 40px 32px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.inner-back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: #0066ff;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 102, 255, 0.3);
  display: flex;
  padding-top: 4px;
  justify-content: center;
  line-height: 1;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.logo-blue { color: #0066ff; }
.logo-red { color: #e52d27; }

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: #0c2340;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 14px;
  color: #555555;
  margin-bottom: 24px;
}

.code-input-section { text-align: left; }

.field-label {
  display: block;
  font-size: 12px;
  color: #555555;
  margin-bottom: 8px;
}

.code-inputs {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.code-input {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 50px;
  border-radius: 8px;
  border: 1px solid #e1e7ed;
  background-color: #f2f5f8;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #0c2340;
  transition: border-color 0.2s, background-color 0.2s;
}

.code-input.active-input {
  border-color: #0c2340;
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(12, 35, 64, 0.1);
}

.code-input:focus {
  outline: none;
  border-color: #0066ff;
}

/* Инфо-блок */
.info-block {
  background-color: #ffffff;
  width: 100%;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  text-align: left;
  display: flex;
  align-items: center;
}

.info-icon-container {
  width: 60px;
  margin-right: 20px;
}

.info-icon {
  width: 100%;
  height: auto;
}

.info-text-container { flex: 1; }

.info-link {
  font-size: 13px;
  color: #0c2340;
  text-decoration: none;
  line-height: 1.4;
  display: inline-block;
}

.info-link:hover { text-decoration: underline; }

/* ЭКРАН 2: Лоадер */
.loader-container {
  margin-top: 200px;
  text-align: center;
  color: #0c2340;
  font-weight: 500;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e1e7ed;
  border-top: 4px solid #0066ff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ЭКРАН 3: Терминал */
.terminal-container {
    max-width: 960px;
    width: 100%;
    background: #020711;
    color: #16ff7d;
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
    padding: 16px;
    font-family: "SF Mono", "Fira Code", monospace;
    margin: 150px 20px 0;
}

#code-area {
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 400px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
}

#joke {
  display: none;
  margin-top: 15px;
  color: #ffffff;
  font-weight: bold;
}

#joke.visible {
  display: block;
}