/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 复制成功提示区域样式 */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.copy-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.copy-notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f6fa;
    background-image: 
        radial-gradient(#e74c3c 0.5px, transparent 0.5px),
        radial-gradient(#e74c3c 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    background-attachment: fixed;
}

/* 为共享导航菜单设置特殊样式，确保在所有页面上显示一致 */
#shared-navigation-container {
    margin-bottom: 0 !important;
}

/* 确保容器与导航栏之间有适当的间距 */
.container {
    max-width: 1200px;
    margin: 25px auto 0 auto;
    padding: 0 20px;
    position: relative;
}

/* 页面标题样式 */
h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 20px 0;
}

h2 {
    color: #34495e;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: #3498db;
    border-radius: 2px;
}

/* 列布局样式 */
.left-column {
    width: 65%;
    float: left;
    margin-right: 5%;
}

.right-column {
    width: 30%;
    float: left;
}

/* 输入区域样式 */
.input-section {
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.input-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.input-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #3498db, #2980b9);
}

.input-section label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.1rem;
}

.input-section input,
.input-section textarea,
.input-section select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 45px;
}

.input-section input:focus,
.input-section textarea:focus,
.input-section select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 按钮样式 */
.input-section button,
.output-section button,
.link-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.input-section button:hover,
.output-section button:hover,
.link-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.input-section button:active,
.output-section button:active,
.link-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

/* 输出区域样式 */
.output-section {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.output-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #9b59b6, #8e44ad);
}

.output-section label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.1rem;
}

.output-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #f8f9fa;
    resize: vertical;
    min-height: 100px;
    font-family: 'Courier New', monospace;
}

.link-btn {
    margin-left: 10px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 10px rgba(155, 89, 182, 0.3);
}

.link-btn:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    box-shadow: 0 6px 15px rgba(155, 89, 182, 0.4);
}

/* 分隔线样式 */
hr {
    border: none;
    border-top: 1px solid #e1e8ed;
    margin: 30px 0;
    position: relative;
}

hr::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 3px;
    background-color: #3498db;
    border-radius: 1.5px;
}

/* 模板管理器样式 */
.template-manager {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    position: sticky;
    top: 90px;
}

.template-manager h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e8ed;
}

/* 模板网格容器 */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* 模板卡片样式 */
.template-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #e1e8ed;
}

.template-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    border-color: #3498db;
}

/* 模板内容样式 */
.template-content {
    color: #34495e;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制显示的行数 */
    -webkit-box-orient: vertical;
    margin-bottom: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 模板标题 */
.template-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 模板操作按钮区域 */
.template-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #e1e8ed;
}

.edit-template-btn,
.delete-template-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.edit-template-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 2px 5px rgba(243, 156, 18, 0.2);
}

.edit-template-btn:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
}

.edit-template-btn:active {
    transform: translateY(0);
}

.delete-template-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.2);
}

.delete-template-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.delete-template-btn:active {
    transform: translateY(0);
}

/* 预设提示词库样式 */
.preset-prompts {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 90px;
}

.preset-item {
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.preset-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.preset-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #3498db, #2980b9);
}

.preset-item:last-child {
    margin-bottom: 0;
}

.preset-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
}

.preset-content {
    color: #34495e;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.copy-preset-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.copy-preset-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.copy-preset-btn:active {
    transform: translateY(0);
}

.preset-prompt-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.preset-prompt-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preset-prompt-item:last-child {
    margin-bottom: 0;
}

.preset-prompt-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.preset-prompt-content {
    color: #34495e;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e1e8ed;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .left-column,
    .right-column {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-bottom: 30px;
    }
    
    .template-manager,
    .preset-prompts {
        position: static;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .input-section,
    .output-section,
    .template-manager,
    .preset-prompts {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .input-section button,
    .output-section button,
    .link-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 模板管理样式 */
.template-management {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.saved-templates {
    margin-top: 20px;
}

.saved-templates h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.templates-grid {
    display: grid;
    gap: 15px;
}

.template-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #3498db;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.template-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.template-content {
    color: #34495e;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e1e8ed;
    max-height: 100px;
    overflow-y: auto;
}

.template-actions {
    display: flex;
    gap: 10px;
}

.edit-template-btn,
.delete-template-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.edit-template-btn {
    background-color: #f39c12;
    color: white;
}

.edit-template-btn:hover {
    background-color: #e67e22;
    transform: translateY(-1px);
}

.delete-template-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-template-btn:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
}

.edit-template-btn:active,
.delete-template-btn:active {
    transform: translateY(0);
}