/* Основные стили */
: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);
}





body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f0805;
    color: #f0e6d2;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    position: relative;
}

.login-modal {
    background: rgba(15, 8, 5, 0.95);
    border: 1px solid #3a2518;
    border-radius: 12px;
    padding: 30px;
    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 {
  /* подтягиваем шапку вверх на 12px, сохраняя выдвижение по горизонтали */
  margin: -28px -30px 12px;
  padding: 8px 30px;
  border-bottom: 1px solid #3a2518;
  background: linear-gradient(
    to right,
    transparent,
    rgba(58, 37, 24, 0.3),
    transparent
  );
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.modal-title {
    color: #e8c070;
    font-weight: bold;
    font-size: 24;
    margin-bottom: -10px;
    margin-top: 0px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); 
    text-align:center;
}

.modal-subtitle {
    color: #a99e87;
    font-size: 14px;
    text-align:center;
}

/* Форма */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Единый отступ между элементами */
}

.form-group {
    width: 100%;
    margin-bottom: 0; /* Убираем старый отступ */
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #e8c070;
    font-size: 14px;
}

/* Общие стили для всех элементов ввода */
.form-input,
.select-input,
.textarea-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    background: rgba(40, 25, 15, 0.8);
    border: 1px solid #3a2518;
    border-radius: 6px;
    color: #f0e6d2;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus,
.select-input:focus,
.textarea-input:focus {
    outline: none;
    border-color: #e8c070;
    box-shadow: 0 0 0 2px rgba(192, 154, 94, 0.3);
}

.form-input::placeholder {
    color: #a99e87;
}

/* Стиль для выпадающих списков */
.select-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a99e87'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

/* Для текстовых областей */
.textarea-input {
    min-height: 100px;
    resize: vertical;
}

/* Для радио-кнопок и чекбоксов */
.radio-group, 
.checkbox-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option, 
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Иконка информации */
.info-icon {
    margin-left: 8px;
    cursor: pointer;
    color: #f0e6d2;
    transition: all 0.2s;
}

.info-icon:hover {
    color: #f5d28a;
    transform: scale(1.1);
}

/* Поля пароля */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper i {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #f0e6d2;
}

/* Ошибки */
.error-message {
    width: 100%;
    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;
}

.error-message::before {
    content: '!';
    background: #ff4d4d;
    color: #fff;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}


/* Капча */
.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;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        align-items: flex-start; /* Форма прилипает к верху */
    }

    .auth-container {
        padding: 10px;
    }

    .login-modal {
        padding: 15px;
    }

    .modal-header {
        margin: -15px -15px 10px;
        padding: 6px 15px;
    }

    .modal-title {
        font-size: 18px;
        margin-bottom: -8px;
    }

    .modal-subtitle {
        font-size: 12px;
    }

    .login-form {
        gap: 12px;
    }

    .form-label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .form-input,
    .select-input,
    .textarea-input {
        padding: 8px 12px;
        font-size: 14px;
    }

    .textarea-input {
        min-height: 80px;
    }


 /* Сам трек (круг) */
.slider-track {
 width: 50px;                 /* сохраняем размер кружка */
    height: 50px;
}
/* Иконка внутри трека */
.slider-track i {
  font-size: 18px !important;  /* чуть меньше, но видно */
}
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    .txt {
        font-size: 12px;
        margin-top: 15px;
    }

    /* Дополнительно сжимаем отступы */
    .form-group {
        margin-bottom: -5px;
    }

    .form-btn {
        margin-top: 10px;
    }
}
/* Кнопка */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(to bottom,#5a0a0a,#3a0505);
    color: #f0e6d2;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.btn:hover {
    background: linear-gradient(to bottom,#6a0a0a,#4a0505);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn i { 
    margin-right: 8px; 
}

.form-btn { 
    margin-top: 15px; 
}

/* Текст и ссылки */
.txt {
    text-align: center;
    color: #a99e87;
    font-size: 14px;
    margin-top: 20px;
}

.auth-link {
    color: #e8c070;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-link:hover { 
    color: #f5d28a; 
}

/* Ссылка назад */
.back-home {
    position: absolute;
    top: 20px; 
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8c070;
    text-decoration: none;
    font-size: 16px;
}

.back-home:hover { 
    color: #f5d28a; 
}

/* Оверлей и меню расы */
.race-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    backdrop-filter: blur(3px);
    display: none;
    animation: fadeIn 0.3s ease;
}

.race-menu {
    position: fixed;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: linear-gradient(to bottom,#1a120e,#0f0a08);
    border: 1px solid #c09a5e;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(192,154,94,0.3);
    z-index: 1001;
    width: 600px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s ease-out;
    display: none;
    animation: menuAppear 0.3s ease forwards;
}

@keyframes menuAppear {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.race-menu-header {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #3a2518;
    background: linear-gradient(to right,transparent,rgba(58,37,24,0.3),transparent);
    position: relative;
}

.race-menu-name {
    color: #e8c070;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.race-menu-close {
    position: absolute;
    top: 12px; 
    right: 12px;
    background: none;
    border: none;
    color: #c09a5e;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.race-menu-close:hover {
    color: #f5d28a;
    transform: scale(1.1);
}

/* Блок описания расы */
.race-menu-body {
    padding: 20px;
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
    color: #c0b8a8;
    background: rgba(20,12,8,0.4);
    white-space: pre-line;
    max-width: 600px;
    margin: 0 auto;
    overflow-y: auto;
    max-height: 60vh;
}

.race-menu-body p {
    margin-bottom: 1em;
}

/* Статы */
.race-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.stat-value {
    color: #f5d28a;
    font-weight: bold;
    font-size: 16px;
}

/* Пути развития */
.development-paths {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(192, 154, 94, 0.2);
}

.paths-title {
    color: #e8c070;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.paths-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.path-branch {
    background: rgba(30, 20, 15, 0.7);
    border: 1px solid #3a2518;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.path-branch.warrior {
    border-left: 3px solid #a52a2a;
}

.path-branch.mage {
    border-left: 3px solid rgb(72, 131, 209);
}

.branch-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(192, 154, 94, 0.1);
}

.branch-header h5 {
    margin: 0;
    font-size: 16px;
    color: #f5d28a;
}

.branch-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.path-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.path-option.heaven {
    background: linear-gradient(
        to right, 
        rgba(50, 100, 50, 0.15), 
        rgba(100, 180, 100, 0.25)
    );
    border: 1px solid rgba(100, 200, 100, 0.3);
    color: #c8f5c8;
}

.path-option.hell {
    background: linear-gradient(
        to right, 
        rgba(100, 50, 50, 0.15), 
        rgba(180, 100, 100, 0.25)
    );
    border: 1px solid rgba(200, 100, 100, 0.3);
    color: #f5c8c8;
}

.path-direction {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.path-name {
    font-weight: bold;
    font-size: 14px;
}

.path-option:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

