/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background: #f7f7f7;
    min-height: 100vh;
}

/* 背景动画 */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #1890ff, #722ed1);
    z-index: -1;
    overflow: hidden;
}

.circle-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation: float 6s ease-in-out infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* 容器 */
.container {
    max-width: 420px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* Logo区域 */
.logo-area {
    margin-bottom: 40px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}

.logo {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 添加渐变分隔线 */
.divider {
    width: 2px;
    height: 110px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0.1)
    );
    margin: 0 4px;
}

.logo-text {
    flex: 1;
}

.title {
    font-size: 28px;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}

.desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 邀请人弹窗 */
.inviter-popup {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.inviter-content {
    display: flex;
    align-items: center;
}

.inviter-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 16px;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.inviter-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inviter-info {
    flex: 1;
}

.inviter-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.inviter-tip {
    font-size: 14px;
    color: #666;
}

/* 表单容器 */
.form-container {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 邀请人区域样式 */
.inviter-section {
    background: linear-gradient(135deg, #1890ff, #722ed1);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.inviter-content {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.inviter-avatar {
    width: 64px;
    height: 64px;
    position: relative;
    margin-right: 16px;
}

.inviter-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    object-fit: cover;
}

/* 头像光环动画 */
.avatar-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: ringPulse 2s ease-out infinite;
}

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

.inviter-info {
    flex: 1;
}

.inviter-name {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 邀请标签 */
.inviter-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: white;
    backdrop-filter: blur(4px);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 装饰元素 */
.invite-decoration {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    top: -60px;
    right: -60px;
    animation: rotate 10s linear infinite;
}

.decoration-line {
    position: absolute;
    width: 150%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    bottom: 20px;
    left: -25%;
    animation: lineMove 3s ease-in-out infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes lineMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 注册表单样式调整 */
.register-form {
    padding: 24px;
    position: relative;
    z-index: 2;
}

/* 输入框组样式优化 */
.input-group {
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.input-group:hover {
    transform: translateX(4px);
}

.input-box {
    border: 1px solid #eee;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.input-box:focus-within {
    border-color: #1890ff;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.iconfont {
    font-size: 20px;
    color: #999;
    margin-right: 12px;
}

.input-box input {
    flex: 1;
    border: none;
    background: none;
    font-size: 16px;
    color: #333;
}

.input-box input::placeholder {
    color: #999;
}

/* 验证码按钮 */
.code-box {
    padding-right: 8px;
}

.code-btn {
    padding: 8px 16px;
    border: none;
    background: #1890ff;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.code-btn:hover {
    background: #40a9ff;
}

.code-btn.disabled {
    background: #d9d9d9;
    cursor: not-allowed;
}

/* 提示文本 */
.tip-text {
    margin-top: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tip-text.success {
    color: #52c41a;
}

.tip-text.error {
    color: #f5222d;
}

/* 协议勾选 */
.agreement-group {
    margin: 24px 0;
}

.agreement-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.agreement-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d9d9d9;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.agreement-label input[type="checkbox"]:checked + .checkmark {
    background: #1890ff;
    border-color: #1890ff;
}

.agreement-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.agreement-label .text {
    font-size: 14px;
    color: #666;
}

.agreement-label .text a {
    color: #1890ff;
    text-decoration: none;
}

/* 提交按钮 */
.submit-button {
    width: 100%;
    padding: 14px 0;
    border: none;
    background: linear-gradient(135deg, #1890ff, #722ed1);
    color: white;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.submit-button:hover {
    background: linear-gradient(135deg, #40a9ff, #8c51e4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button.disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 底部提示 */
.bottom-tip {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.bottom-tip a {
    color: #1890ff;
    text-decoration: none;
    font-weight: 500;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.confirm-btn {
    padding: 8px 24px;
    border: none;
    background: #1890ff;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-btn:hover {
    background: #40a9ff;
}

/* 动画 */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter, .fade-leave-to {
    opacity: 0;
}

.modal-enter-active, .modal-leave-active {
    transition: all 0.3s ease;
}

.modal-enter, .modal-leave-to {
    opacity: 0;
    transform: scale(0.9);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    .logo-area {
        padding: 20px;
    }

    .logo {
        width: 80px;
        height: 80px;
    }

    .divider {
        height: 60px;
    }

    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 16px;
    }

    .desc {
        font-size: 12px;
    }

    .inviter-section {
        padding: 20px;
    }

    .inviter-avatar {
        width: 56px;
        height: 56px;
    }

    .inviter-name {
        font-size: 18px;
    }

    .register-form {
        padding: 20px;
    }
}
