/* Dark Luxury One-Screen Theme */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Playfair+Display:wght@700&display=swap');

/* ========== GLOBAL RESET ========== */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
  color: #f5f5f5;
  font-family: 'Roboto', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* Добавляем поддержку безопасных зон на iPhone */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* ========== WRAPPER ========== */
.container {
  width: 100%;
  max-width: 600px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ========== HEADER ========== */
header {
  width: 100%;
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  margin: 0.3rem 0;
  letter-spacing: 2px;
  color: #ffdd00;
  text-shadow: 0 0 10px #ffdd00, 0 0 25px #ffaa00;
}

h2 {
  font-size: 1.4rem;
  color: #ccc;
  margin-bottom: 0.5rem;
}

p {
  font-size: 1rem;
  color: #ddd;
  word-wrap: break-word;
}

/* ========== FORM ========== */
form {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* предотвращает вылаз теней */
}

form:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

label {
  display: block;
  margin: 0.8rem 0 0.3rem 0;
  font-weight: 500;
}

input {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.2rem;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: background 0.3s, box-shadow 0.3s;
}

input:focus {
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 10px #ffdd00;
}

/* ========== BUTTON ========== */
button {
  margin-top: 1rem;
  padding: 0.7rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(45deg, #ffdd00, #ffaa00);
  color: #000;
  transition: background 0.3s, transform 0.2s;
  width: 100%;
}

button:hover {
  background: linear-gradient(45deg, #ffaa00, #ffdd00);
  transform: scale(1.05);
}

button:active {
  transform: scale(0.98);
}

/* ========== LOADING BUTTON ========== */
button.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

button.loading::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== DESKTOP ONLY ========== */
@media (min-width: 1024px) {
  body {
    overflow-y: auto;
    align-items: center;
  }

  .container {
    padding: 3rem;
  }

  h1 { font-size: 3.8rem; }
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  body {
    display: block; /* фикс для iOS Safari */
    padding: 0;
  }

  .container {
    padding: 1.2rem;
  }

  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.2rem; }
  p { font-size: 0.95rem; }

  form {
    padding: 1.2rem;
    margin: 1rem 0;
    border-radius: 10px;
  }
}
