* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B35;
    --dark: #1A1A1A;
    --light: #F8FAFC;
    --text: #333333;
    --border: #E0E0E0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1A1A1A 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ========== КОНТЕЙНЕР РЕГИСТРАЦИИ ========== */
.auth-container {
    background: rgba(26, 26, 26, 0.95);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 107, 53, 0.2);
    position: relative;
    z-index: 1;
    text-align: center;
    backdrop-filter: blur(10px);
}

.auth-logo {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.auth-container h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    color: white;
}

.auth-container form {
    width: 100%;
}

.auth-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 6px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s;
}

.auth-container input::placeholder {
    color: #AAA;
}

.auth-container input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.3);
}

.auth-container .btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: block;
    text-align: center;
    transition: all 0.3s;
}

.auth-container .btn.primary {
    background: var(--primary);
    color: white;
}

.auth-container .btn.primary:hover {
    background: #E55A2B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.auth-container .btn:not(.primary) {
    background: transparent;
    color: white;
    border: 1px solid #AAA;
    margin-top: 10px;
}

.auth-container .btn:not(.primary):hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.auth-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.auth-actions .btn {
    flex: 1;
    margin: 0;
}

.auth-text {
    margin-top: 25px;
    text-align: center;
    font-size: 13px;
    color: #AAA;
}

.auth-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-text a:hover {
    text-decoration: underline;
}

/* ========== СООБЩЕНИЕ ОШИБКИ ========== */
.error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #FF6B5B;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    animation: shakeError 0.5s ease-in-out;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* ========== ГРУППЫ ФОРМ ========== */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.form-group label {
    font-weight: 600;
    color: #CCC;
    font-size: 14px;
}

.form-group small {
    color: #999;
    font-size: 11px;
    margin-top: -4px;
}

/* ========== СООБЩЕНИЕ УСПЕХА ========== */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

/* ========== ТРЕБОВАНИЯ К ПАРОЛЮ ========== */
.password-requirements {
    background: rgba(255, 107, 53, 0.08);
    border: 1px solid rgba(255, 107, 53, 0.2);
    padding: 10px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 11px;
    text-align: left;
    color: #AAA;
}

.password-requirements strong {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    color: #CCC;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 3px 0;
    color: #999;
    font-size: 11px;
}

.requirement.met {
    color: #4CAF50;
    font-weight: 600;
}

.requirement.unmet {
    color: #FF6B35;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .auth-container {
        max-width: 100%;
        padding: 30px;
    }

    .auth-logo {
        font-size: 28px;
    }

    .auth-container h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }

    main {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 20px;
        border-radius: 8px;
    }

    .auth-logo {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .auth-container h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .auth-container input {
        padding: 10px;
        margin-bottom: 12px;
        font-size: 16px;
    }

    .auth-container .btn {
        padding: 10px;
        font-size: 14px;
    }

    main::before {
        display: none;
    }
}