/* 服务条款弹窗样式 */
:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --secondary-color: #f72585;
    --text-color: #2b2d42;
    --light-bg: #f8f9fa;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 基础按钮样式（可选，用于页面中的其他按钮保持风格一致） */
.show-terms-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.show-terms-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

/* 弹窗遮罩 */
.terms-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

/* 弹窗主体 */
.terms-modal {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

/* 弹窗头部 */
.terms-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 20px 25px;
    position: relative;
}

.terms-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.terms-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
}

.terms-close:hover {
    opacity: 1;
    transform: translateY(-50%) rotate(90deg);
}

/* 弹窗内容区 */
.terms-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex-grow: 1;
}

/* 自定义滚动条 */
.terms-body::-webkit-scrollbar {
    width: 8px;
}

.terms-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.terms-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.terms-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 按钮区域 */
.terms-actions {
    padding: 15px 25px;
    background-color: var(--light-bg);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
}

/* 按钮基础样式 */
.terms-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 同意按钮 */
.terms-btn-agree {
    background-color: var(--primary-color);
    color: white;
}

.terms-btn-agree:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

/* 不同意按钮 */
.terms-btn-disagree {
    background-color: white;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.terms-btn-disagree:hover {
    background-color: rgba(247, 37, 133, 0.05);
}

/* 查看完整版按钮 */
.terms-btn-full {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    margin-right: auto;
}

.terms-btn-full:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* 返回简版按钮 */
.terms-btn-back {
    background-color: white;
    color: #666;
    border: 1px solid #ccc;
    margin-right: auto;
}

.terms-btn-back:hover {
    background-color: #f5f5f5;
}

/* 加载中和错误状态 */
.loading, .error {
    text-align: center;
    padding: 20px;
    color: #666;
}

.error {
    color: var(--secondary-color);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .terms-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .terms-header {
        padding: 15px 20px;
    }
    
    .terms-header h2 {
        font-size: 1.3rem;
    }
    
    .terms-body {
        padding: 15px 20px;
    }
    
    .terms-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .terms-btn {
        width: 100%;
        margin-right: 0 !important;
    }
}