/* 变量定义 */
:root {
    --main-bg-color: #f5f7fa;
    --container-bg-color: #fff;
    --primary-color: #667eea;  /* 修改主色调 */
    --primary-gradient: linear-gradient(145deg, #667eea 0%, #764ba2 100%);  /* 添加渐变色变量 */
    --primary-gradient-hover: linear-gradient(145deg, #7687ed 0%, #8159b5 100%);  /* 添加悬停渐变色变量 */
    --primary-gradient-active: linear-gradient(145deg, #5a6fd6 0%, #6a4492 100%);  /* 添加激活渐变色变量 */
    --text-color: #2c3e50;
    --border-color: #e8e8e8;
    --shadow-color: rgba(102, 126, 234, 0.1);
}

/* 加载动画 */
.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 30px 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-width: 200px;
}

.loading-text {
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* 大纲内容区域样式 */
#outlineContent {
    display: none;
    margin-top: 8px; /* 减小顶部间距 */
}

#outlineContent.active {
    display: block;
}

#outlineContent textarea {
    width: 100%;
    min-height: 100px; /* 稍微减小最小高度 */
    padding: 10px 14px; /* 减小内边距 */
    margin-top: 6px; /* 减小顶部间距 */
    border: 1px solid #e9ecef;
    border-radius: 10px;
    resize: vertical;
    font-size: 15px;
    line-height: 1.6;
    color: #2d3436;
    background: #ffffff;
    transition: all 0.3s ease;
}

#outlineContent textarea:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(108,92,231,0.1);
}

/* 修改大纲内容表单组的布局 */
.form-group#outlineContentWrapper {
    display: flex;
    flex-direction: column;  /* 改为纵向排列 */
    gap: 12px;
    width: 100%;  /* 确保宽度不超过父元素 */
    box-sizing: border-box;  /* 添加这行确保padding不会导致宽度溢出 */
}

/* 分页按钮样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination-container button {
    padding: 8px 16px;
    border: 1px solid #667eea;
    background-color: #fff;
    color: #667eea;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.pagination-container button:hover {
    background-color: #667eea;
    color: #fff;
}

.pagination-container button:disabled {
    background-color: #f0f0f0;
    color: #ccc;
    border-color: #f0f0f0;
    cursor: not-allowed;
}

.pagination-container button:disabled:hover {
    background-color: #f0f0f0;
    color: #ccc;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .toggle-switch {
        border-bottom-color: #333333;
    }

    .toggle-text {
        color: #e0e0e0;
    }

    .toggle-slider {
        background-color: #444444;
    }

    input:checked + .toggle-slider {
        background-color: #7687ed;
    }

    .form-group input[type="text"],
    .form-group input[type="number"],
    .form-group textarea,
    .form-group select {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .form-group input[type="text"]::placeholder,
    .form-group textarea::placeholder {
        color: #718096;
    }

    .form-group input[type="text"]:focus,
    .form-group input[type="number"]:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: #7687ed;
        box-shadow: 0 0 0 3px rgba(118, 135, 237, 0.2);
    }

    .form-group label {
        color: #e2e8f0;
    }

    .char-count {
        color: #a0aec0;
    }
}

/* 通用提示框样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    width: auto;
}

.toast {
    position: relative;
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: toast-in-right 0.7s;
    overflow: hidden;
    transition: all 0.3s ease;
}

.toast.hiding {
    transform: translateX(110%);
    opacity: 0;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-icon {
    margin-right: 12px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-content {
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    padding-right: 10px;
}

.toast-close {
    cursor: pointer;
    background: transparent;
    border: none;
    opacity: 0.5;
    font-size: 18px;
    line-height: 0;
    color: #666;
    padding: 0;
    margin: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

/* 成功提示框样式 */
.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-success .toast-icon {
    color: #fff;
    background-color: #4CAF50;
}

.toast-success::before {
    background-color: #4CAF50;
}

/* 错误提示框样式 */
.toast-error {
    border-left: 4px solid #ff4d4f;
}

.toast-error .toast-icon {
    color: #fff;
    background-color: #ff4d4f;
}

.toast-error::before {
    background-color: #ff4d4f;
}

/* 警告提示框样式 */
.toast-warning {
    border-left: 4px solid #ffba00;
}

.toast-warning .toast-icon {
    color: #fff;
    background-color: #ffba00;
}

.toast-warning::before {
    background-color: #ffba00;
}

/* 信息提示框样式 */
.toast-info {
    border-left: 4px solid #667eea;
}

.toast-info .toast-icon {
    color: #fff;
    background-color: #667eea;
}

.toast-info::before {
    background-color: #667eea;
}

/* 加载中提示框样式 */
.toast-loading {
    border-left: 4px solid #8a63d2;
}

.toast-loading .toast-icon {
    color: #fff;
    background-color: #8a63d2;
}

.toast-loading::before {
    background-color: #8a63d2;
}

.toast-loading .toast-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* 提示框动画 */
@keyframes toast-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式适配 */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        padding: 12px 15px;
        margin-bottom: 8px;
    }
} 