/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #FFF8DC 0%, #FFD700 50%, #FFA500 100%);
    min-height: 100vh;
    position: relative;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Main Container */
.registration-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Registration Card */
.registration-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.2);
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.registration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Header */
.registration-header {
    margin-bottom: 30px;
}

.logo-container {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(255, 165, 0, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.logo-container i {
    font-size: 32px;
    color: white;
}

.registration-title {
    color: #1e3a5f;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #1e3a5f, #2c5282);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.registration-subtitle {
    color: #666;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Social Buttons */
.social-buttons {
    margin-bottom: 30px;
}

.btn-social {
    border: 2px solid;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-social::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-social:hover::before {
    left: 100%;
}

.btn-google {
    border-color: #db4437;
    color: #db4437;
    background: rgba(219, 68, 55, 0.05);
}

.btn-google:hover {
    background: #db4437;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(219, 68, 55, 0.3);
}

.btn-vk {
    border-color: #4680c2;
    color: #4680c2;
    background: rgba(70, 128, 194, 0.05);
}

.btn-vk:hover {
    background: #4680c2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(70, 128, 194, 0.3);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 20px;
    color: #666;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 8px;
    display: block;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.form-control:focus,
.form-select:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
    background: white;
    outline: none;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.88 1.88 3.68-3.68.94.94-4.62 4.62z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke='%23dc3545' d='m5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* Password Toggle */
.btn-password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.btn-password-toggle:hover {
    color: #FFD700;
}

/* Password Strength */
.password-strength {
    margin-top: 10px;
}

.password-strength-bar {
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-indicator {
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
    background: #dc3545;
}

.strength-indicator.weak {
    width: 25%;
    background: #dc3545;
}

.strength-indicator.fair {
    width: 50%;
    background: #ffc107;
}

.strength-indicator.good {
    width: 75%;
    background: #17a2b8;
}

.strength-indicator.strong {
    width: 100%;
    background: #28a745;
}

.strength-text {
    font-size: 0.85rem;
    color: #666;
}

/* Captcha */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 248, 220, 0.5);
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
}

.captcha-question {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 1.1rem;
    flex: 1;
}

#captchaAnswer {
    width: 100px;
    margin: 0;
    border: 1px solid #ddd;
    padding: 8px 12px;
}

.btn-captcha-refresh {
    border: none;
    background: #FFD700;
    color: #1e3a5f;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-captcha-refresh:hover {
    background: #FFA500;
    transform: rotate(180deg);
}

/* Checkbox */
.form-check {
    margin-bottom: 20px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0;
    margin-right: 10px;
    border: 2px solid #FFD700;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: #FFD700;
    border-color: #FFD700;
}

.form-check-label {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-check-label a {
    color: #FFA500;
    font-weight: 600;
}

.form-check-label a:hover {
    color: #FF8C00;
}

/* Submit Button */
.btn-submit {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e3a5f;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 165, 0, 0.4);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Login Link */
.login-link {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.login-link a {
    color: #FFA500;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link a:hover {
    color: #FF8C00;
}

/* Success Modal */
.success-icon i {
    font-size: 4rem;
    color: #28a745;
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Validation Feedback */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .registration-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .registration-title {
        font-size: 2rem;
    }
    
    .logo-container {
        width: 60px;
        height: 60px;
    }
    
    .logo-container i {
        font-size: 24px;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    #captchaAnswer {
        width: 100%;
        margin-top: 10px;
    }
    
    .btn-captcha-refresh {
        align-self: flex-end;
        width: fit-content;
    }
}

@media (max-width: 480px) {
    .registration-container {
        padding: 10px;
    }
    
    .registration-card {
        padding: 20px 15px;
    }
    
    .registration-title {
        font-size: 1.8rem;
    }
    
    .social-buttons .col-6 {
        margin-bottom: 10px;
    }
    
    .form-control,
    .form-select {
        padding: 12px 15px;
    }
}

/* Custom Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.registration-card {
    animation: slideInUp 0.6s ease-out;
}

/* Loading State */
.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline-block !important;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .registration-card {
        border: 3px solid #000;
        background: #fff;
    }
    
    .form-control,
    .form-select {
        border-color: #000;
    }
    
    .btn-submit {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}