* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.register-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
    margin: 40px auto;
}

.register-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #495057, #6c757d);
}

.register-header {
    text-align: center;
    margin-bottom: 40px;
}

.register-logo {
    width: 80px;
    height: 80px;
    background: #495057;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(73, 80, 87, 0.2);
}

.register-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.register-subtitle {
    font-size: 16px;
    color: #6c757d;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-label .required {
    color: #dc3545;
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    color: #2c3e50;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #495057;
    box-shadow: 0 0 0 3px rgba(73, 80, 87, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: #dee2e6;
}

.form-input::placeholder {
    color: #adb5bd;
}

.form-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-input.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #495057;
}

.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-success {
    color: #28a745;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.password-strength {
    margin-top: 8px;
}

.strength-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak { background: #dc3545; width: 25%; }
.strength-fair { background: #ffc107; width: 50%; }
.strength-good { background: #17a2b8; width: 75%; }
.strength-strong { background: #28a745; width: 100%; }

.phone-input-group {
    display: flex;
    gap: 8px;
}

.country-code {
    width: 80px;
    padding: 14px 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    color: #2c3e50;
    background: #f8f9fa;
    text-align: center;
}

.agreement-section {
    margin: 24px 0;
}

.agreement-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-input:checked {
    background: #495057;
    border-color: #495057;
}

.checkbox-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.agreement-links {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.agreement-links:hover {
    color: #343a40;
    text-decoration: underline;
}

.register-button {
    width: 100%;
    padding: 16px;
    background: #495057;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.register-button:hover {
    background: #343a40;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(73, 80, 87, 0.2);
}

.register-button:active {
    transform: translateY(0);
}

.register-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.register-button.loading {
    color: transparent;
}

.register-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-link {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-top: 24px;
}

.login-link a {
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link a:hover {
    color: #343a40;
    text-decoration: underline;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .register-container {
        padding: 32px 24px;
    }

    .register-title {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-group.full-width {
        grid-column: 1;
    }
}

/* 动画效果 */
.register-container {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }
.form-group:nth-child(6) { animation-delay: 0.35s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 聚焦状态的增强 */
.form-group.focused .form-label {
    color: #495057;
} 