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

html,
body {
  height: 100%;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #e6f0ff;
  color: #1f1f1f;
}

/* Ð­ÐºÑÐ°Ð½Ñ */

.screen {
  display: none;
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.38s ease;
}

.screen.active {
  display: flex;
  opacity: 1;
}

/* ÐÐ°ÑÑÐ¾ÑÐºÐ¸ */

.card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(32, 56, 117, 0.16);
}

/* Ð­ÐºÑÐ°Ð½ 1 */

.card-loading {
  padding: 32px 24px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  background: #ffffff;
}

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

.logo span:first-child {
  color: #005ff9;
}

.logo span:last-child {
  color: #ff2d55;
}

.title-main {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.subtext {
  margin-top: 4px;
  font-size: 15px;
  color: #5c6470;
}

.dots {
  margin-top: 20px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background: #d3d7e1;
  animation: blink 1.4s infinite ease-in-out;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}

/* Ð­ÐºÑÐ°Ð½ 2 â Ð»Ð¾Ð³Ð¸Ð½ */

.page-login {
  max-width: 900px;
  width: 100%;
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.login-card-wrap {
  flex: 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.card-login {
  padding: 32px 30px 24px;
  min-width: 360px;
}

.logo-login {
  margin-bottom: 16px;
}

.lang-row {
  font-size: 13px;
  color: #5c6470;
  margin-bottom: 18px;
}

.flag {
  font-size: 16px;
  margin-left: 6px;
}

.field-label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d5d9e2;
  font-size: 14px;
  margin-bottom: 14px;
  outline: none;
  background: #fdfdff;
}

.input:focus {
  border-color: #005ff9;
  box-shadow: 0 0 0 1px rgba(0, 95, 249, 0.2);
}

.btn-primary {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: #005ff9;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin: 6px 0 10px;
}

.btn-primary:active {
  transform: translateY(1px);
}

.link {
  font-size: 13px;
  color: #005ff9;
  text-decoration: none;
}

.restore-link {
  display: inline-block;
  margin-bottom: 6px;
}

.small-text {
  font-size: 13px;
  color: #7a8190;
}

.small-problem {
  text-align: center;
  margin: 6px 0 10px;
}

.alt-login {
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.alt-btn {
  flex: 1;
  border-radius: 8px;
  border: 1px solid #d5d9e2;
  padding: 8px 10px;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
}

.alt-more {
  margin-top: 8px;
}

.register-link {
  display: block;
  margin-top: 14px;
  text-align: center;
}

/* ÐÑÐ°Ð²Ð°Ñ Ð¿Ð¾Ð´ÑÐºÐ°Ð·ÐºÐ° */

.card-tip {
  flex: 2;
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-size: 14px;
  color: #3f4a5a;
  border-left: 4px solid #005ff9;
}

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

.tip-icon {
  font-size: 22px;
}

.tip-title {
  font-weight: 600;
}

.tip-text {
  font-size: 13px;
  color: #5c6470;
}

/* Ð­ÐºÑÐ°Ð½ 3 â Ð¿ÑÐµÐ²Ð´Ð¾-Ð²Ð·Ð»Ð¾Ð¼ */

.hack-wrapper {
  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;
}

#hack-header {
  font-size: 13px;
  color: #7ef5c7;
  margin-bottom: 10px;
}

#code-area {
  height: 360px;
  overflow-y: auto;
  background: #000309;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

#joke {
  margin-top: 12px;
  font-size: 13px;
  color: #fefefe;
  text-align: right;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#joke.visible {
  opacity: 1;
}

/* ÐÐ´Ð°Ð¿ÑÐ¸Ð² */

@media (max-width: 900px) {
  .page-login {
    flex-direction: column;
    max-width: 420px;
  }

  .card-tip {
    border-left: none;
    border-top: 4px solid #005ff9;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  .card-login {
    padding: 24px 20px 20px;
    min-width: auto;
  }

  .card-tip {
    display: none; /* ÐºÐ°Ðº Ð¼Ð¾Ð±Ð¸Ð»ÑÐ½Ð°Ñ Ð²ÐµÑÑÐ¸Ñ: Ð¿ÑÐ°Ð²Ð¾Ð³Ð¾ Ð±Ð»Ð¾ÐºÐ° Ð½ÐµÑ */
  }
}

/* ======= MOBILE ADAPTATION ======= */
@media screen and (max-width: 600px) {
  .hack-wrapper {
    padding: 10px;
  }

  #code-area {
    font-size: 13px;
    line-height: 1.3;
    padding: 12px;
  }

  .terminal-container img,
  .terminal-container {
    max-width: 100%;
    margin: 0 auto;
    border-radius: 10px !important;
  }
}

/* Подпись внизу: страница декоративная, не официальный портал. */
.disclaimer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 6px 12px;
  font:
    400 11px/1.35 -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  text-align: center;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.disclaimer a {
  color: #005ff9;
  text-decoration: none;
}

@media screen and (max-width: 600px) {
  .disclaimer {
    font-size: 10px;
    padding: 5px 10px;
  }
}
