﻿@import url('../css2');

:root {
  --primary: #101010;
  --secondary: #333333;
  --accent: #9147ff;
  --accent-hover: #772ce8;
  --text: rgba(255, 255, 255, 0.9);
  --glass-bg: rgba(16, 16, 16, 0.4);
  --border-radius: 1.9025vw; /* 2.1875vw * 0.87 */
  --blur: blur(0.625rem); /* фильтр остаётся неизменным */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 0.87vw; /* 1vw * 0.87 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  user-select: none;
}

body {
  background: var(--primary);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.87rem; /* 1rem * 0.87 */
}

.glow-container {
  position: fixed;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: screen;
}

.glow {
  position: absolute;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%) scale(1.3);
  opacity: 0.3;
}

.container {
  max-width: 29.90625rem; /* 34.375rem * 0.87 */
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  border-radius: var(--border-radius);
  padding: 1.74rem; /* 2rem * 0.87 */
  box-shadow: 0 0.435rem 1.74rem rgba(0, 0, 0, 0.3); /* 0.5rem * 0.87, 2rem * 0.87 */
  border: 0.054375rem solid rgba(255, 255, 255, 0.1); /* 0.0625rem * 0.87 */
  position: relative;
  margin: 0.6525rem auto; /* 0.75rem * 0.87 */
}

.instructions-container {
  width: auto;
  max-width: none;
}

h1 {
  text-align: center;
  font-size: 1.74rem; /* 2rem * 0.87 */
  font-weight: 900;
  margin-bottom: 1.74rem; /* 2rem * 0.87 */
  margin-top: 0.87rem; /* 1rem * 0.87 */
}

h2 {
  font-size: 1.305rem; /* 1.5rem * 0.87 */
  font-weight: 900;
  margin-bottom: 0.87rem; /* 1rem * 0.87 */
}

h3 {
  font-size: 1.044rem; /* 1.2rem * 0.87 */
  font-weight: 500;
}

p {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.87rem; /* 1rem * 0.87 */
  font-size: 0.93525rem; /* 1.075rem * 0.87 */
  margin-top: 2.175rem; /* 2.5rem * 0.87 */
  line-height: 1.305rem; /* 1.5rem * 0.87 */
}

.description {
  font-size: 0.87rem; /* 1rem * 0.87 */
  margin-top: 1.305rem; /* 1.5rem * 0.87 */
  line-height: 1.305rem; /* 1.5rem * 0.87 */
}

.section {
  text-align: center;
}

.section-title {
  font-size: 1.044rem; /* 1.2rem * 0.87 */
  font-weight: 500;
  margin-bottom: 2.175rem; /* 2.5rem * 0.87 */
}

.tab {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.305rem; /* 1.5rem * 0.87 */
  align-items: center;
}

input {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--border-radius);
  padding: 0.87rem; /* 1rem * 0.87 */
  width: 21.75rem; /* 25rem * 0.87 */
  height: 3.2625rem; /* 3.75rem * 0.87 */
  font-size: 0.87rem; /* 1rem * 0.87 */
  color: var(--text);
  outline: none;
  text-align: center;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.buttons-list {
  display: flex;
  flex-direction: column;
  gap: 1.044rem; /* 1.2rem * 0.87 */
  max-width: 21.75rem; /* 25rem * 0.87 */
  margin: 0 auto;
}

.button, .back-button, .copy-key-button, .download-button {
  border-radius: var(--border-radius);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.submit-button {
  background: transparent;
  border: 0.10875rem solid rgba(255, 255, 255, 0.3); /* 0.125rem * 0.87 */
  padding: 0.87rem; /* 1rem * 0.87 */
  width: 21.75rem; /* 25rem * 0.87 */
  height: 3.2625rem; /* 3.75rem * 0.87 */
  font-size: 0.87rem; /* 1rem * 0.87 */
  font-weight: 500;
  transform: translateY(0);
  border-radius: var(--border-radius);
  color: var(--text);
  cursor: not-allowed;
  transition: var(--transition);
}

.submit-button:enabled {
  background: var(--accent);
  border: 0.10875rem solid var(--accent); /* 0.125rem * 0.87 */
  box-shadow: 0 0.2175rem 0.6525rem rgba(0, 0, 0, 0.1); /* 0.25rem * 0.87, 0.75rem * 0.87 */
  cursor: pointer;
}

.submit-button:enabled:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-0.271875rem); /* -0.3125rem * 0.87 */
  box-shadow: 0 0.6525rem 1.74rem rgba(145, 71, 255, 0.2), 0 0.32625rem 1.0875rem rgba(0, 0, 0, 0.2); /* 0.75rem * 0.87, 2rem * 0.87, 0.375rem * 0.87, 1.25rem * 0.87 */
}

.button {
  background: rgba(145, 71, 255, 0.05);
  border: 0.10875rem solid var(--accent); /* 0.125rem * 0.87 */
  padding: 0.87rem; /* 1rem * 0.87 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21.75rem; /* 25rem * 0.87 */
  height: 3.2625rem; /* 3.75rem * 0.87 */
  font-size: 0.87rem; /* 1rem * 0.87 */
  font-weight: 500;
  box-shadow: 0 0.2175rem 0.6525rem rgba(0, 0, 0, 0.1); /* 0.25rem * 0.87, 0.75rem * 0.87 */
  transform: translateY(0);
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-0.271875rem); /* -0.3125rem * 0.87 */
  box-shadow: 0 0.6525rem 1.74rem rgba(145, 71, 255, 0.2), 0 0.32625rem 1.0875rem rgba(0, 0, 0, 0.2); /* 0.75rem * 0.87, 2rem * 0.87, 0.375rem * 0.87, 1.25rem * 0.87 */
}

.copy-key-button {
  background: var(--accent);
  border: none;
  padding: 0.87rem; /* 1rem * 0.87 */
  width: 21.75rem; /* 25rem * 0.87 */
  height: 3.2625rem; /* 3.75rem * 0.87 */
  font-size: 0.87rem; /* 1rem * 0.87 */
  font-weight: 500;
  box-shadow: 0 0.2175rem 0.6525rem rgba(0, 0, 0, 0.1); /* 0.25rem * 0.87, 0.75rem * 0.87 */
  transform: translateY(0);
}

.copy-key-button:hover {
  background: var(--accent-hover);
  transform: translateY(-0.271875rem); /* -0.3125rem * 0.87 */
  box-shadow: 0 0.6525rem 1.74rem rgba(145, 71, 255, 0.2), 0 0.32625rem 1.0875rem rgba(0, 0, 0, 0.2); /* 0.75rem * 0.87, 2rem * 0.87, 0.375rem * 0.87, 1.25rem * 0.87 */
}

.back-button {
  position: absolute;
  top: 0.87rem; /* 1rem * 0.87 */
  left: 0.87rem; /* 1rem * 0.87 */
  background: transparent;
  border: none;
  padding: 0.696rem 1.218rem; /* 0.8rem * 0.87, 1.4rem * 0.87 */
  font-size: 0.87rem; /* 1rem * 0.87 */
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.435rem; /* 0.5rem * 0.87 */
  transform: translateY(0);
}

.back-button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-0.271875rem); /* -0.3125rem * 0.87 */
  box-shadow: 0 0.6525rem 1.74rem rgba(145, 71, 255, 0.2), 0 0.32625rem 1.0875rem rgba(0, 0, 0, 0.2); /* 0.75rem * 0.87, 2rem * 0.87, 0.375rem * 0.87, 1.25rem * 0.87 */
}

.back-button svg {
  min-width: 1.305rem; /* 1.5rem * 0.87 */
  height: 1.305rem; /* 1.5rem * 0.87 */
}

.download-buttons {
  display: flex;
  gap: 0.87rem; /* 1rem * 0.87 */
  justify-content: center;
  margin-bottom: 1.74rem; /* 2rem * 0.87 */
}

.download-button {
  background: var(--accent);
  border: none;
  padding: 0.696rem 1.218rem; /* 0.8rem * 0.87, 1.4rem * 0.87 */
  font-size: 0.87rem; /* 1rem * 0.87 */
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.435rem; /* 0.5rem * 0.87 */
  transform: translateY(0);
}

.download-button:hover {
  background: var(--accent-hover);
  transform: translateY(-0.271875rem); /* -0.3125rem * 0.87 */
  box-shadow: 0 0.6525rem 1.74rem rgba(145, 71, 255, 0.2), 0 0.32625rem 1.0875rem rgba(0, 0, 0, 0.2); /* 0.75rem * 0.87, 2rem * 0.87, 0.375rem * 0.87, 1.25rem * 0.87 */
}

.download-button svg {
  width: 1.305rem; /* 1.5rem * 0.87 */
  height: 1.305rem; /* 1.5rem * 0.87 */
}

#key-display, #key-display-instructions {
  color: var(--accent);
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 1.044rem; /* 1.2rem * 0.87 */
  margin: 0.87rem 0; /* 1rem * 0.87 */
}

.instructions-list {
  display: flex;
  flex-direction: row;
  gap: 1.74rem; /* 2rem * 0.87 */
  flex-wrap: wrap;
  justify-content: center;
}

.instruction-card {
  border: 0.054375rem solid rgba(255, 255, 255, 0.1); /* 0.0625rem * 0.87 */
  border-radius: var(--border-radius);
  padding: 1.74rem; /* 2rem * 0.87 */
  width: 21.75rem; /* 25rem * 0.87 */
  text-align: center;
  transition: var(--transition);
}

.instruction-card:hover {
  border: 0.054375rem solid var(--accent); /* 0.0625rem * 0.87 */
  transform: translateY(-0.271875rem); /* -0.3125rem * 0.87 */
}

.instruction-card h2 {
  color: var(--accent);
}

.instruction-card p {
  font-size: 0.957rem; /* 1.1rem * 0.87 */
  margin-top: 0;
  color: rgba(255, 255, 255, 0.9);
}

#notifications {
  position: fixed;
  top: 1.74rem; /* 2rem * 0.87 */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.435rem; /* 0.5rem * 0.87 */
}

.notification {
  padding: 0.87rem 1.305rem; /* 1rem * 0.87, 1.5rem * 0.87 */
  border-radius: var(--border-radius);
  color: white;
  font-size: 0.87rem; /* 1rem * 0.87 */
  text-align: center;
  background: rgba(145, 71, 255, 0.9);
  backdrop-filter: var(--blur);
  border: 0.054375rem solid var(--accent); /* 0.0625rem * 0.87 */
  min-width: 17.4rem; /* 20rem * 0.87 */
  animation: slideIn 0.3s ease-out forwards, slideOut 0.3s ease-in 2.7s forwards;
}

.notification.success {
  background: rgba(40, 167, 69, 0.9);
  border-color: #28a745;
}

.notification.error {
  background: rgba(220, 53, 69, 0.9);
  border-color: #dc3545;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-1.74rem); } /* 2rem * 0.87 */
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-1.74rem); } /* 2rem * 0.87 */
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   Сообщение об ошибке
   ========================================================================== */

.error-message {
  display: none;
  text-align: center;
  width: calc(100% - 32px);
  padding: 32px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.error-message h1 {
  font-size: 24px;
  margin-top: 16px;
  text-align: center;
  font-weight: 900;
  margin-bottom: 32px;
}

.error-message p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 17.6px;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 16px;
  margin-top: 40px;
}

.error-button span {
  font-size: 16px;
  font-weight: 500;
}

.error-button {
  background: var(--accent);
  border: none;
  padding: 16px;
  border-radius: 40px;
  text-decoration: none;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  margin: 24px 0 16px 0;
}

.error-button:hover {
  background: var(--accent-hover);
}

.error-button svg {
  width: 24px;
  height: 24px;
  margin-right: 0;
}

body.show-error .tab,
body.show-error #notifications {
  display: none;
}

@media (max-width: 768px) {
  .error-message {
    display: block;
  }

  .tab,
  .container,
  #notifications {
    display: none;
  }
}