:root {
  --primary: #f68100;
  --primary-dark: #d86f00;
  --secondary: #67bc25;
  --background: #FDF6E8;
  --surface: #FFFDF7;
  --text-primary: #3D2914;
  --text-secondary: #7A6A52;
  --error: #d03a3a;
  --success: #4a8f2a;
  --border: #E0D4B8;
  --radius: 12px;
  --radius-lg: 20px;
}

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

html, body {
  height: 100%;
  background: var(--background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  max-width: 440px;
  margin: 0 auto;
}

.mascot {
  width: 96px;
  height: auto;
  margin-bottom: 16px;
}

h1 {
  font-size: 28px;
  color: var(--primary);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 700;
}

.tagline {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.coming-soon {
  text-align: center;
  color: var(--text-primary);
  font-size: 16px;
  margin-top: 16px;
  font-weight: 500;
}

.hint {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
  max-width: 340px;
}

.lang-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  font-size: 13px;
}

.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.lang-toggle button.active {
  background: var(--primary);
  color: white;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  position: relative;
  width: 100%;
}

.field input {
  width: 100%;
  padding: 14px 44px 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus {
  border-color: var(--primary);
}

.field .toggle-visibility {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 13px;
}

.rules {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: -4px;
  padding-left: 4px;
}

.rules li {
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rules li::before {
  content: "○";
  color: var(--text-secondary);
  font-size: 14px;
  width: 14px;
  text-align: center;
}

.rules li.ok {
  color: var(--success);
}

.rules li.ok::before {
  content: "✓";
  color: var(--success);
}

.rules li.fail {
  color: var(--error);
}

.rules li.fail::before {
  content: "✗";
  color: var(--error);
}

button.primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.15s;
  margin-top: 8px;
}

button.primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

button.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-banner {
  color: var(--error);
  text-align: center;
  padding: 8px;
  font-size: 14px;
}

.success-state,
.invalid-state,
.loading-state {
  text-align: center;
}

.success-state h1,
.invalid-state h1 {
  margin-bottom: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 32px auto;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 420px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 24px;
  }
}
