/**
 * 全新现代化登录注册页面样式
 * Modern Auth Page Styles
 * Design: Glassmorphism + Gradient + Animated Background
 */

/* ==================== CSS Variables ==================== */
:root {
    --auth-primary: #667eea;
    --auth-primary-dark: #5568d3;
    --auth-secondary: #764ba2;
    --auth-success: #4facfe;
    --auth-success-dark: #00d2ff;
    --auth-bg-dark: #1a1a2e;
    --auth-bg-medium: #16213e;
    --auth-text: #ffffff;
    --auth-text-muted: rgba(255, 255, 255, 0.7);
    --auth-border: rgba(255, 255, 255, 0.1);
    --auth-glass: rgba(255, 255, 255, 0.08);
    --auth-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ==================== Global Reset ==================== */
body.auth-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--auth-bg-dark);
    color: var(--auth-text);
    overflow-x: hidden;
}

body.auth-page .full-bg {
    display: none;
}

/* ==================== Animated Background ==================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-animation__gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--auth-bg-dark) 0%, var(--auth-bg-medium) 50%, #0f3460 100%);
}

.bg-animation__particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--auth-primary) 0%, transparent 70%);
    opacity: 0.3;
    animation: floatParticle 20s infinite ease-in-out;
}

.bg-animation__particle:nth-child(1) {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.bg-animation__particle:nth-child(2) {
    width: 400px;
    height: 400px;
    top: 50%;
    right: -100px;
    animation-delay: -4s;
    background: radial-gradient(circle, var(--auth-secondary) 0%, transparent 70%);
}

.bg-animation__particle:nth-child(3) {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: 30%;
    animation-delay: -8s;
    background: radial-gradient(circle, var(--auth-success) 0%, transparent 70%);
}

.bg-animation__particle:nth-child(4) {
    width: 500px;
    height: 500px;
    top: 30%;
    left: 20%;
    animation-delay: -12s;
    background: radial-gradient(circle, var(--auth-secondary) 0%, transparent 70%);
}

.bg-animation__particle:nth-child(5) {
    width: 350px;
    height: 350px;
    bottom: 20%;
    right: 10%;
    animation-delay: -16s;
    background: radial-gradient(circle, var(--auth-primary) 0%, transparent 70%);
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -30px) scale(1.1);
    }
    50% {
        transform: translate(20px, 50px) scale(0.9);
    }
    75% {
        transform: translate(-30px, 20px) scale(1.05);
    }
}

/* ==================== Auth Container ==================== */
.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 60px;
}

/* ==================== Brand Section ==================== */
.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 400px;
    animation: fadeInLeft 1s ease;
}

.brand-content {
    text-align: center;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    animation: pulse 3s infinite;
}

.brand-logo i {
    font-size: 56px;
    color: #fff;
}

.brand-title {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #fff 0%, #a8c0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.brand-slogan {
    font-size: 18px;
    color: var(--auth-text-muted);
    margin: 0 0 40px;
    letter-spacing: 8px;
    text-transform: uppercase;
}

.brand-features {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.feature-item i {
    width: 50px;
    height: 50px;
    background: var(--auth-glass);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--auth-success);
    transition: all 0.3s ease;
}

.feature-item:hover i {
    background: var(--auth-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.feature-item span {
    font-size: 13px;
    color: var(--auth-text-muted);
}

/* ==================== Auth Form Wrapper ==================== */
.auth-form-wrapper {
    width: 100%;
    max-width: 440px;
    animation: fadeInRight 1s ease;
}

/* ==================== Auth Card ==================== */
.auth-card {
    background: var(--auth-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    padding: 45px 40px;
    box-shadow: var(--auth-shadow);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-primary), var(--auth-secondary));
}

.register-card::before {
    background: linear-gradient(90deg, var(--auth-success), var(--auth-success-dark));
}

/* Card Header */
.auth-card__header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-card__icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.35);
    animation: floatIcon 3s ease-in-out infinite;
}

.auth-card__icon i {
    font-size: 32px;
    color: #fff;
}

.register-icon {
    background: linear-gradient(135deg, var(--auth-success) 0%, var(--auth-success-dark) 100%) !important;
    box-shadow: 0 15px 40px rgba(79, 172, 254, 0.35) !important;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.auth-card__title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.auth-card__subtitle {
    font-size: 14px;
    color: var(--auth-text-muted);
    margin: 0;
}

/* ==================== Auth Form ==================== */
.auth-form {
    margin-bottom: 25px;
}

.auth-form .form-group {
    margin-bottom: 22px;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 18px;
    color: var(--auth-text-muted);
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-suffix {
    position: absolute;
    right: 18px;
    color: var(--auth-text-muted);
    font-size: 14px;
    z-index: 2;
}

.form-input {
    width: 100%;
    height: 56px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid var(--auth-border) !important;
    border-radius: 14px !important;
    padding: 0 50px !important;
    font-size: 15px !important;
    color: #fff !important;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-primary) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px);
}

.form-input:focus + .input-prefix,
.input-wrapper:focus-within .input-prefix {
    color: var(--auth-primary);
    transform: scale(1.1);
}

.register-card .form-input:focus {
    border-color: var(--auth-success) !important;
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.15), 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

.register-card .form-input:focus + .input-prefix,
.register-card .input-wrapper:focus-within .input-prefix {
    color: var(--auth-success);
}

/* Toggle Password */
.toggle-password {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
}

.toggle-password:hover {
    color: var(--auth-primary);
}

/* Input Hint */
.input-hint {
    font-size: 12px;
    color: var(--auth-text-muted);
    margin-top: 8px;
    padding-left: 18px;
}

.input-hint i {
    margin-right: 4px;
}

.text-success {
    color: #52c41a !important;
}

.text-danger {
    color: #ff4d4f !important;
}

.text-warning {
    color: #faad14 !important;
}

/* ==================== Form Options ==================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* Custom Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--auth-border);
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
    border-color: var(--auth-primary);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 7px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.register-card .checkbox-wrapper input:checked + .checkbox-custom {
    background: linear-gradient(135deg, var(--auth-success) 0%, var(--auth-success-dark) 100%);
    border-color: var(--auth-success);
}

.checkbox-label {
    font-size: 14px;
    color: var(--auth-text-muted);
}

/* Links */
.link-forgot {
    color: var(--auth-primary);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-forgot:hover {
    color: #8fa0ff;
    text-decoration: underline;
}

.terms-link {
    color: var(--auth-success);
    font-weight: 500;
}

.terms-link:hover {
    color: #7dd5ff;
    text-decoration: underline;
}

/* ==================== Auth Button ==================== */
.btn-auth {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
    border: none !important;
    border-radius: 14px !important;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.45);
}

.btn-auth:active {
    transform: translateY(-1px);
}

.btn-register {
    background: linear-gradient(135deg, var(--auth-success) 0%, var(--auth-success-dark) 100%) !important;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.35) !important;
}

.btn-register:hover {
    box-shadow: 0 12px 35px rgba(79, 172, 254, 0.45) !important;
}

.btn-text {
    transition: all 0.3s ease;
}

.btn-icon {
    position: absolute;
    right: 30px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.btn-loading {
    display: none;
    position: absolute;
}

.btn-auth.loading .btn-text,
.btn-auth.loading .btn-icon {
    opacity: 0;
}

.btn-auth.loading .btn-loading {
    display: inline-block;
}

.btn-auth:hover .btn-icon {
    opacity: 1;
    transform: translateX(0);
}

/* ==================== Verification Group ==================== */
.verification-group {
    margin-bottom: 20px !important;
}

.slideunlock-slider {
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid var(--auth-border) !important;
    height: 52px !important;
}

.slideunlock-label {
    background: linear-gradient(135deg, var(--auth-success) 0%, var(--auth-success-dark) 100%) !important;
    border-radius: 10px !important;
    width: 52px !important;
    height: 44px !important;
}

.slideunlock-lable-tip {
    color: var(--auth-text-muted) !important;
    font-size: 14px !important;
}

/* ==================== Social Section ==================== */
.social-section {
    margin-top: 30px;
}

.divider-text {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--auth-border), transparent);
}

.divider-text span {
    padding: 0 15px;
    color: var(--auth-text-muted);
    font-size: 13px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    text-decoration: none;
    display: block;
}

.social-btn__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--auth-border);
    transition: all 0.3s ease;
    font-size: 22px;
    color: #fff;
}

.social-btn:hover .social-btn__icon {
    transform: translateY(-5px) scale(1.1);
}

.social-btn__icon.qq:hover {
    background: #12b7f5;
    border-color: #12b7f5;
    box-shadow: 0 8px 25px rgba(18, 183, 245, 0.4);
}

.social-btn__icon.wx:hover {
    background: #07c160;
    border-color: #07c160;
    box-shadow: 0 8px 25px rgba(7, 193, 96, 0.4);
}

.social-btn__icon.bd:hover {
    background: #2932e1;
    border-color: #2932e1;
    box-shadow: 0 8px 25px rgba(41, 50, 225, 0.4);
}

.social-btn__icon.wb:hover {
    background: #e6162d;
    border-color: #e6162d;
    box-shadow: 0 8px 25px rgba(230, 22, 45, 0.4);
}

/* ==================== Auth Switch ==================== */
.auth-switch {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--auth-border);
}

.auth-switch__text {
    color: var(--auth-text-muted);
    font-size: 14px;
}

.auth-switch__link {
    color: var(--auth-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-left: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-switch__link:hover {
    color: #8fa0ff;
}

.auth-switch__link i {
    font-size: 12px;
    transition: all 0.3s ease;
}

.auth-switch__link:hover i {
    transform: translateX(-3px);
}

.register-card .auth-switch__link {
    color: var(--auth-success);
}

.register-card .auth-switch__link:hover {
    color: #7dd5ff;
}

.register-card .auth-switch__link i {
    transition: all 0.3s ease;
}

.register-card .auth-switch__link:hover i {
    transform: translateX(3px);
}

/* ==================== Auth Footer ==================== */
.auth-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    color: var(--auth-text-muted);
    font-size: 13px;
}

.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: #8fa0ff;
    text-decoration: underline;
}

/* ==================== Modal Styles ==================== */
.modal-content {
    background: linear-gradient(135deg, var(--auth-bg-medium) 0%, var(--auth-bg-dark) 100%);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    color: #fff;
    box-shadow: var(--auth-shadow);
}

.modal-header {
    border-bottom: 1px solid var(--auth-border);
    padding: 20px 25px;
}

.modal-header .close {
    color: #fff;
    opacity: 0.7;
    font-size: 28px;
    transition: all 0.3s ease;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-title {
    color: #fff;
    font-weight: 600;
}

.modal-title i {
    color: var(--auth-success);
    margin-right: 8px;
}

.modal-body {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--auth-primary);
    border-radius: 3px;
}

.modal-footer {
    border-top: 1px solid var(--auth-border);
    padding: 20px 25px;
}

/* Terms Content */
.terms-content h4 {
    color: var(--auth-success);
    font-size: 16px;
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terms-content h4:first-child {
    margin-top: 0;
}

.terms-content p {
    color: var(--auth-text-muted);
    line-height: 1.8;
    margin: 0 0 12px;
}

.terms-content ul {
    color: var(--auth-text-muted);
    padding-left: 20px;
    margin: 10px 0;
}

.terms-content ul li {
    margin: 8px 0;
}

.btn-modal {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    padding: 12px 40px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ==================== Animations ==================== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .auth-brand {
        display: none;
    }
    
    .auth-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 20px 15px;
    }
    
    .auth-card {
        padding: 35px 25px;
        border-radius: 20px;
    }
    
    .auth-card__icon {
        width: 70px;
        height: 70px;
    }
    
    .auth-card__icon i {
        font-size: 28px;
    }
    
    .auth-card__title {
        font-size: 24px;
    }
    
    .form-input {
        height: 50px;
        font-size: 14px !important;
    }
    
    .btn-auth {
        height: 50px;
        font-size: 15px;
    }
    
    .social-btn__icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .brand-features {
        gap: 15px;
    }
    
    .feature-item i {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .link-forgot {
        align-self: flex-end;
    }
    
    .social-buttons {
        gap: 15px;
    }
    
    .social-btn__icon {
        width: 44px;
        height: 44px;
    }
}

/* ==================== Utility Classes ==================== */
.text-light-op {
    opacity: 0.7;
}

/* Override Bootstrap modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Loading State */
.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Input Error State */
.form-input.is-invalid {
    border-color: #ff4d4f !important;
}

/* Focus Visible */
.form-input:focus-visible {
    outline: none;
}
