﻿* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #0A5278 0%, #1A6B96 50%, #2A7FB0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: 0;
}

.register-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.register-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(10, 82, 120, 0.4);
    overflow: hidden;
    width: 100%;
    max-width: 560px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(10, 82, 120, 0.15);
    padding: 2rem 2.5rem 1.2rem 2.5rem;
    text-align: center;
}

    .card-header h2 {
        font-weight: 700;
        color: #0A5278;
        letter-spacing: -0.02em;
        margin-bottom: 0.3rem;
        font-size: 2rem;
    }

    .card-header p {
        color: #1A6B96;
        font-size: 1rem;
        margin-bottom: 0;
    }

.card-body {
    padding: 1.5rem 2.5rem 2rem 2.5rem;
}

.brand-icon {
    font-size: 3.5rem;
    color: #1E7FB0;
    margin-bottom: 0.5rem;
}

/* 表单控件 */
.form-floating {
    margin-bottom: 1.2rem;
    position: relative;
}

    .form-floating > .form-control {
        border-radius: 18px;
        border: 2px solid #B8D6E8;
        padding: 1rem 1rem;
        height: auto;
        background: #F5FAFF;
        transition: border-color 0.2s, box-shadow 0.2s;
        font-size: 0.95rem;
    }

        .form-floating > .form-control:focus {
            border-color: #1E7FB0;
            box-shadow: 0 0 0 5px rgba(30, 127, 176, 0.15);
            background: #ffffff;
        }

        .form-floating > .form-control.is-valid {
            border-color: #1E7FB0;
            background-image: none;
        }

        .form-floating > .form-control.is-invalid {
            border-color: #dc3545;
            background-image: none;
        }

    .form-floating > label {
        padding: 1rem 1rem;
        color: #1A6B96;
        font-size: 0.95rem;
    }

/* 验证反馈 */
.invalid-feedback {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    padding-left: 0.8rem;
    color: #dc3545;
    display: none;
}

.valid-feedback {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    padding-left: 0.8rem;
    color: #1E7FB0;
    display: none;
}

/* 验证中提示 */
.validating-feedback {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    padding-left: 0.8rem;
    color: #f9c74f;
    display: none;
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    background: #D4E6F2;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background-color 0.3s;
}

    .strength-bar.weak {
        background: #dc3545;
        width: 33.33%;
    }

    .strength-bar.medium {
        background: #f9c74f;
        width: 66.66%;
    }

    .strength-bar.strong {
        background: #1E7FB0;
        width: 100%;
    }

/* 注册按钮 */
.btn-register {
    background: linear-gradient(135deg, #0A5278 0%, #1E7FB0 100%);
    border: none;
    border-radius: 18px;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    width: 100%;
    transition: all 0.2s;
    box-shadow: 0 8px 20px rgba(10, 82, 120, 0.3);
    margin-top: 0.5rem;
}

    .btn-register:hover:not(:disabled) {
        background: linear-gradient(135deg, #064062 0%, #0A5278 100%);
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(10, 82, 120, 0.4);
    }

    .btn-register:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* 底部链接 */
.footer-links {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

    .footer-links a {
        color: #1E7FB0;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s;
    }

        .footer-links a:hover {
            color: #0A5278;
            text-decoration: underline;
        }

/* 版权 */
.copyright {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    margin-top: 1.5rem;
    text-align: center;
    width: 100%;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f9c74f;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.3rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 576px) {
    body {
        padding: 1rem;
    }

    .card-header, .card-body {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }
}

.form-floating > .form-control-plaintext ~ label::after, .form-floating > .form-control:focus ~ label::after, .form-floating > .form-control:not(:placeholder-shown) ~ label::after, .form-floating > .form-select ~ label::after {
    background-color: transparent !important;
}
