* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 450px;
}

.register-box {
    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);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

.logo-section h1 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.logo-section p {
    color: #666;
    font-size: 0.9rem;
}

.name-fields {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.half {
    flex: 1;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    z-index: 2;
}

.username-availability,
.password-match {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.username-availability.show,
.password-match.show {
    opacity: 1;
}

.password-strength {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-strength.show {
    opacity: 1;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #f44336;
    transition: all 0.3s ease;
}

.strength-bar.weak::before {
    width: 33%;
    background: #f44336;
}

.strength-bar.medium::before {
    width: 66%;
    background: #ff9800;
}

.strength-bar.strong::before {
    width: 100%;
    background: #4CAF50;
}

.strength-text {
    color: #666;
    font-size: 0.7rem;
    white-space: nowrap;
}

.terms-agreement,
.newsletter {
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    min-width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.checkbox-container input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-container a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-container a:hover {
    color: #764ba2;
}

.register-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
}

.register-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.register-btn:active:not(:disabled) {
    transform: translateY(0);
}

.register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.social-register {
    text-align: center;
    margin: 25px 0;
    padding-top: 25px;
    border-top: 1px solid #e1e5e9;
}

.social-register p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover {
    border-color: #db4437;
    color: #db4437;
}

.social-btn.facebook:hover {
    border-color: #4267B2;
    color: #4267B2;
}

.social-btn.github:hover {
    border-color: #333;
    color: #333;
}

.login-link {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link a:hover {
    color: #764ba2;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: #4CAF50;
}

.notification.error {
    background: #f44336;
}

@media (max-width: 480px) {
    .register-box {
        padding: 30px 20px;
    }
    
    .name-fields {
        flex-direction: column;
        gap: 0;
    }
    
    .checkbox-container {
        font-size: 0.8rem;
    }
}

/* Анимации для проверок */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.username-availability.show,
.password-match.show {
    animation: pulse 0.3s ease;
}