body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 0;
    position: relative;
    z-index: 1;
}

.auth-box {
    background: var(--white);
    padding: 2rem 2.5rem;
    border-radius: 16px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}



.auth-box:hover {
    transform: translateY(-2px);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.15);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.logo {
    margin-bottom: 1rem;
    stroke: #667eea;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

.auth-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-header p {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 1.2rem;
    position: relative;
}

.form-group.terms-agreement-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group.terms-agreement-group input[type="checkbox"] {
    width: auto;
    margin-bottom: 0;
}

.form-group.terms-agreement-group label {
    display: inline;
    margin-bottom: 0;
    white-space: nowrap;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
    letter-spacing: -0.01em;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: var(--white);
    box-shadow:
        0 0 0 4px rgba(102, 126, 234, 0.1),
        0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.submit-btn {
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    box-shadow: none;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.auth-switch a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.auth-switch a:hover {
    color: #5a67d8;
    transform: translateY(-1px);
}

.auth-switch a:hover::after {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--light-text-color);
    font-size: 0.8rem;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}

/* 邮箱验证码样式 */
.verification-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.verification-input-group input {
    flex: 1;
    min-width: 0;
}

.send-code-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-width: 110px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.send-code-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-code-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.send-code-btn.countdown {
    background: #95a5a6;
}

/* 验证码输入框特殊样式 */
#verificationCode {
    text-align: center;
    letter-spacing: 2px;
    font-size: 1.1rem;
    font-weight: bold;
}

/* 成功消息样式 */
.success-message {
    color: #27ae60;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    min-height: 20px;
}

/* 拖动验证样式 */
.drag-verification-container {
    width: 100%;
    margin: 10px 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.drag-puzzle-container {
    position: relative;
    width: 100%;
    height: 0; /* 设置高度为0，通过padding-bottom来控制高度 */
    padding-bottom: 50%; /* 400x200 图片的宽高比是 2:1，所以高度是宽度的 50% */
    overflow: hidden;
    background-color: #e9ecef;
    border-radius: 4px;
    box-sizing: border-box;
    margin: 0;
    line-height: 0;
}

.puzzle-image {
    position: absolute; /* 绝对定位以填充容器 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    vertical-align: top;
}

.puzzle-piece {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: move;
    /* top: 0; */ /* 移除这里的top，让JS控制 */
    left: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    margin: 0;
    padding: 0;
    transform-origin: center center;
    image-rendering: -webkit-optimize-contrast; /* 提高图像清晰度 */
    image-rendering: crisp-edges;
    will-change: transform; /* 优化性能 */
    backface-visibility: hidden; /* 防止模糊 */
    -webkit-backface-visibility: hidden;
}

.drag-slider-container {
    padding: 15px;
    position: relative;
}

.drag-slider-track {
    position: relative;
    height: 36px;
    background-color: #e9ecef;
    border-radius: 18px;
}

.drag-slider-thumb {
    position: absolute;
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.2s;
}

.drag-slider-thumb:hover {
    background-color: #1764CC;
}

.drag-slider-progress {
    position: absolute;
    height: 36px;
    background-color: rgba(26, 115, 232, 0.2);
    border-radius: 18px;
    width: 0;
}

.drag-slider-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--light-text-color);
}

.verification-success {
    margin-top: 10px;
    color: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.verification-success i {
    margin-right: 5px;
}

.refresh-verification-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 10px;
    padding: 0;
}

.refresh-verification-btn:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .auth-container {
        max-width: 100%;
        padding: 0;
    }

    .auth-box {
        padding: 1.8rem 1.5rem;
        border-radius: 14px;
        margin: 0;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .form-group input {
        padding: 0.9rem 1.1rem;
        font-size: 16px; /* 防止iOS缩放 */
    }

    .submit-btn {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }

    .auth-header {
        margin-bottom: 1.5rem;
    }

    .auth-header h2 {
        font-size: 1.4rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }
}
