:root {
  --bg-dark: #0a0503;
  --gold: #e1b76c;
  --gold-light: #f5d28a;
  --text: #f0e6d2;
  --text-dark: #a99e87;
  --border: #4a3325;
  --blood: #8b0000;
  --success-green: rgba(100, 255, 100, 0.6);
  --success-glow: rgba(100, 255, 100, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
}

.login-modal {
  background: rgba(15, 8, 5, 0.95);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  text-align: center;
  margin-bottom: 25px;
}

.modal-title {
  color: var(--gold);
  font-size: 24px;
  margin-bottom: 8px;
}

.modal-subtitle {
  color: var(--text-dark);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  background: rgba(40, 25, 15, 0.8);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(192, 154, 94, 0.3);
}

.error-message {
  background: rgba(180, 0, 0, 0.2);
  border: 1px solid #ff4d4d;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
  color: #ff8080;
  display: none;
  align-items: center;
  gap: 8px;
}

.forgot-password {
  display: inline-block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.forgot-password:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* Капча */
.captcha-container {
  margin: 25px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.captcha-text {
  color: var(--text-dark);
  font-size: 14px;
  margin-bottom: 10px;
  text-align: center;
}

.captcha-slider {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.slider-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.2);
}

.slider-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}

.slider-progress.success {
  background: var(--success-green);
  box-shadow: 0 0 15px var(--success-glow);
}

.slider-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  background: var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--blood);
  transition: all 0.2s ease;
  cursor: grab;
}

.slider-track:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.captcha-success {
  margin-top: 15px;
  display: none;
  align-items: center;
  background: var(--success-green);
  padding: 10px 20px;
  border-radius: 20px;
  color: white;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  box-shadow: 0 0 10px var(--success-glow);
}

.captcha-success i {
  margin-right: 8px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(to bottom, #5a0a0a, #3a0505);
  color: var(--text);
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn:hover {
  background: linear-gradient(to bottom, #6a0a0a, #4a0505);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn i {
  margin-right: 8px;
}

.form-btn {
  width: 100%;
  margin-top: 15px;
}

.back-to-login {
  display: block;
  text-align: center;
  color: var(--text-dark);
  font-size: 14px;
  margin-top: 20px;
}

.back-home {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  text-decoration: none;
  font-size: 16px;
  z-index: 10;
}

.back-home:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

/* Анимации */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--success-glow); }
  70% { box-shadow: 0 0 0 10px rgba(100, 255, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(100, 255, 100, 0); }
}

@media (max-width: 480px) {
  .slider-track.success {
    width: 50px;                 /* сохраняем размер кружка */
    height: 50px;
  }
  .slider-track.success i {
    font-size: 18px !important;  /* чуть меньше, но видно */
  }
}