* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px 0;
}

.register-container {
    width: 100%;
    max-width: 780px;
    padding: 20px;
}

.register-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9edf4;
    padding: 52px 48px;
    transition: all 0.3s ease;
}

.register-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    /* background: #1677ff; */
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}
.logo-icon-m{
    width: 35px;
}
.logo-text {
    font-size: 26px;
    font-weight: 600;
    color: #1e293b;
}

.logo-text span {
    font-weight: 400;
    color: #6c7a91;
    font-size: 18px;
    margin-left: 4px;
}

.register-title {
    font-size: 30px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.register-subtitle {
    font-size: 15px;
    color: #6c7a91;
    margin-bottom: 36px;
}

.register-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e9edf4;
    padding-bottom: 10px;
}

.register-tab {
    font-size: 16px;
    font-weight: 500;
    color: #9aa6b8;
    cursor: pointer;
    padding: 8px 0;
    position: relative;
    transition: all 0.2s ease;
}

.register-tab.active {
    color: #1677ff;
}

.register-tab.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #1677ff;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 26px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.form-label .required {
    color: #f56c6c;
    margin-left: 2px;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.2s ease;
    background-color: #fafcff;
}

.form-input:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
    background-color: #ffffff;
}

.form-input::placeholder {
    color: #9aa6b8;
}

.form-input.error {
    border-color: #f56c6c;
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(245, 108, 108, 0.1);
}

.code-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.code-row .form-input {
    flex: 1;
    height: 48px;
}

.get-code-btn {
    width: 140px;
    height: 48px;
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.get-code-btn:hover:not(:disabled) {
    background-color: #0f5bbf;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 119, 255, 0.25);
}

.get-code-btn:active:not(:disabled) {
    transform: translateY(0);
}

.get-code-btn:disabled {
    background-color: #94b9f0;
    cursor: not-allowed;
}

.get-code-btn.countdown {
    background-color: #94b9f0;
    cursor: not-allowed;
}

.captcha-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.captcha-row .form-input {
    flex: 1;
    height: 48px;
}

.captcha-image {
    width: 140px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #f0f2f5;
}

.captcha-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.term-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.term-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1677ff;
}

.term-text {
    font-size: 14px;
    color: #6c7a91;
}

.term-link {
    color: #1677ff;
    text-decoration: none;
    cursor: pointer;
    margin: 0 3px;
}

.term-link:hover {
    text-decoration: underline;
}

.register-btn {
    width: 100%;
    height: 52px;
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.register-btn:hover:not(:disabled) {
    background-color: #0f5bbf;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(22, 119, 255, 0.25);
}

.register-btn:active:not(:disabled) {
    transform: translateY(0);
}

.register-btn:disabled {
    background-color: #94b9f0;
    cursor: not-allowed;
}

.login-tip {
    text-align: center;
    font-size: 15px;
    color: #6c7a91;
}

.login-link {
    color: #1677ff;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.login-link:hover {
    color: #0f5bbf;
    text-decoration: underline;
}

.error-message, .register-error {
    display: none;
}

.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    gap: 4px;
}

.strength-segment {
    flex: 1;
    height: 100%;
    background-color: #e2e8f0;
    transition: all 0.3s ease;
}

.strength-segment.weak {
    background-color: #f56c6c;
}

.strength-segment.medium {
    background-color: #e6a23c;
}

.strength-segment.strong {
    background-color: #67c23a;
}

.strength-text {
    font-size: 13px;
    color: #9aa6b8;
    min-width: 60px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1999;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-container {
    background-color: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9edf4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #f5f7fa;
    border: none;
    font-size: 20px;
    color: #6c7a91;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #e9edf4;
    color: #334155;
}

.modal-content {
    padding: 24px;
    overflow-y: auto;
    line-height: 1.6;
    color: #4a5a72;
    font-size: 14px;
}

.modal-content h2 {
    font-size: 18px;
    color: #1e293b;
    margin: 20px 0 10px;
}

.modal-content h3 {
    font-size: 16px;
    color: #1e293b;
    margin: 15px 0 8px;
}

.modal-content p {
    margin-bottom: 12px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9edf4;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-btn-primary {
    background-color: #1677ff;
    color: white;
}

.modal-btn-primary:hover {
    background-color: #0f5bbf;
}

.modal-btn-secondary {
    background-color: #f5f7fa;
    color: #4a5a72;
}

.modal-btn-secondary:hover {
    background-color: #e9edf4;
}

.hidden {
    display: none;
}

/* 邀请码隐藏字段 */
#invite_code {
    display: none;
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 0;
    }

    .register-container {
        max-width: 100%;
        padding: 16px;
        margin: 20px auto;
    }
    
    .register-card {
        padding: 36px 28px;
    }
    
    .register-title {
        font-size: 28px;
    }
    
    .register-subtitle {
        font-size: 14px;
        margin-bottom: 28px;
    }
    
    .register-tabs {
        gap: 15px;
    }

    .register-tab {
        font-size: 15px;
    }
    
    .code-row {
        display: flex;
        gap: 10px;
        align-items: center;
        width: 100%;
    }

    .code-row .form-input {
        flex: 1;
        height: 48px;
        width: auto;
    }

    .get-code-btn {
        width: 120px;
        height: 48px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .captcha-row {
        display: flex;
        gap: 10px;
        align-items: center;
        width: 100%;
    }
    
    .captcha-row .form-input {
        flex: 1;
        height: 48px;
        width: auto;
    }
    
    .captcha-image {
        width: 120px;
        height: 48px;
        flex-shrink: 0;
    }

    .modal-container {
        max-height: 90vh;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-footer {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .register-container {
        padding: 12px;
    }

    .register-card {
        padding: 28px 20px;
    }
    
    .register-title {
        font-size: 26px;
    }

    .register-tabs {
        gap: 12px;
    }

    .register-tab {
        font-size: 14px;
    }
    
    .get-code-btn {
        width: 100px;
        font-size: 13px;
    }

    .captcha-image {
        width: 100px;
    }
    
    .form-input, .register-btn {
        height: 46px;
    }

    .password-strength {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .strength-bar {
        width: 100%;
    }

    .modal-btn {
        padding: 8px 16px;
    }
}

@media (max-width: 360px) {
    .code-row {
        flex-wrap: wrap;
    }

    .code-row .form-input {
        width: 100%;
    }

    .get-code-btn {
        width: 100%;
        height: 46px;
    }
    
    .captcha-row {
        flex-wrap: wrap;
    }
    
    .captcha-row .form-input {
        width: 100%;
    }
    
    .captcha-image {
        width: 100%;
        height: 46px;
    }
}