* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary-color: #f72585;
    --secondary-light: #ff4d6d;
    --text-color: #2b2d42;
    --text-light: #8d99ae;
    --bg-color: #f8f9fa;
    --bg-light: #ffffff;
    --success-color: #06d6a0;
    --warning-color: #ffd166;
    --danger-color: #ef476f;
    --border-radius: 8px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

#inputArea {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    transition: var(--transition);
}

/* 选项卡样式 */
.input-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-btn:hover {
    color: var(--primary-light);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.tab-content.active {
    display: block;
}

/* 结构化表单样式 */
.structured-form {
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    flex: 1;
    min-width: 180px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: #f8f9fa;
}

.form-group select:focus,
.form-group input:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: #fff;
}

#addTaskBtn {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

#addTaskBtn:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

.task-list-container {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.task-list-container h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    padding-left: 15px;
}

.task-list-container h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 2px;
}

#taskList {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

#taskList li {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

#taskList li:hover {
    background-color: #f1f3f5;
}

#taskList li:last-child {
    border-bottom: none;
}

.task-info {
    flex: 1;
    font-size: 0.95rem;
}

.delete-task {
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 6px 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 600;
}

.delete-task:hover {
    background-color: #e5405e;
    transform: scale(1.05);
}

.ai-input-container {
    position: relative;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 140px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    resize: vertical;
    font-size: 16px;
    transition: var(--transition);
    background-color: #f8f9fa;
}

#aiInputText {
    height: 180px;
    margin-bottom: 20px;
}

textarea:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: #fff;
}

/* 美化AI辅助按钮 */
.ai-assist-btn {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    outline: none;
    z-index: 10;
    overflow: hidden;
}

.ai-assist-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.ai-assist-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 7px 20px rgba(67, 97, 238, 0.4);
}

.ai-assist-btn:hover::before {
    opacity: 1;
}

.ai-assist-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

.ai-assist-btn i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.ai-assist-btn:hover i {
    transform: scale(1.1);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 8% auto;
    padding: 35px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 700px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.4s;
    position: relative;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--danger-color);
    background-color: #f8f9fa;
    transform: rotate(90deg);
}

.modal h2 {
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-size: 1.8rem;
    font-weight: 700;
}

.modal p {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-end;
}

.modal-buttons button {
    min-width: 100px;
}

.ai-tips {
    background-color: rgba(67, 97, 238, 0.05);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid var(--primary-color);
}

.ai-loading {
    display: none;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(67, 97, 238, 0.05);
    border-radius: var(--border-radius);
}

.ai-loading p {
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 500;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid rgba(67, 97, 238, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.ai-result {
    display: none;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
}

#generateBtn {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: white;
    flex: 1;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

#generateBtn:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

#exportBtn {
    background: linear-gradient(to right, var(--success-color), #56e2c2);
    color: white;
    flex: 1;
    box-shadow: 0 4px 10px rgba(6, 214, 160, 0.2);
}

#exportBtn:hover {
    background: linear-gradient(to right, #05b384, var(--success-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(6, 214, 160, 0.3);
}

#clearBtn {
    background: linear-gradient(to right, var(--text-light), #b8c2cc);
    color: white;
    flex: 1;
    box-shadow: 0 4px 10px rgba(141, 153, 174, 0.2);
}

#clearBtn:hover {
    background: linear-gradient(to right, #7d8a9a, var(--text-light));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(141, 153, 174, 0.3);
}

#aiConvertBtn {
    background: linear-gradient(to right, var(--secondary-color), var(--secondary-light));
    color: white;
    box-shadow: 0 4px 10px rgba(247, 37, 133, 0.2);
}

#aiConvertBtn:hover {
    background: linear-gradient(to right, #d91a70, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(247, 37, 133, 0.3);
}

#aiCancelBtn {
    background-color: #f1f3f5;
    color: var(--text-color);
}

#aiCancelBtn:hover {
    background-color: #e9ecef;
}

button:hover {
    transform: translateY(-2px);
}

button:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#tableContainer {
    margin-bottom: 40px;
    animation: fadeIn 0.5s ease;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

th {
    background-color: var(--primary-color);
    color: white;
    text-align: left;
    padding: 15px;
    font-weight: 600;
    font-size: 1rem;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover td {
    background-color: #f1f3f5;
}

td[contenteditable="true"] {
    position: relative;
}

td[contenteditable="true"]:focus {
    outline: none;
    background-color: #e9f5ff;
    box-shadow: inset 0 0 0 2px var(--primary-light);
}

td[contenteditable="true"]::after {
    content: '✏️';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0;
    transition: var(--transition);
}

td[contenteditable="true"]:hover::after {
    opacity: 0.5;
}

.conflict {
    background-color: #fff5f7 !important;
    color: var(--danger-color);
    font-weight: 500;
}

.conflict td {
    border-left: 3px solid var(--danger-color);
}

#ganttContainer {
    height: 500px;
    margin-top: 40px;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    animation: fadeIn 0.5s ease;
}

.use-result-btn {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    margin-right: 10px;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

.use-result-btn:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }
    
    th, td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    .modal-content {
        width: 95%;
        padding: 25px;
        margin: 10% auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        width: 100%;
    }
    
    .input-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    #inputArea {
        padding: 20px;
    }
    
    .modal h2 {
        font-size: 1.5rem;
    }
    
    #ganttContainer {
        height: 400px;
    }
}

/* 新增样式 */
.card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
}

header {
    margin-bottom: 40px;
}

.subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 5px;
}

.input-tips {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid var(--warning-color);
}

.tip-header {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.tip-header i {
    margin-right: 8px;
    color: var(--warning-color);
}

.tip-list {
    list-style: none;
    padding-left: 10px;
}

.tip-list li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    position: relative;
    padding-left: 20px;
}

.tip-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--warning-color);
    font-size: 1.2rem;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 60px;
}

footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* 表格增强 */
th:first-child {
    border-top-left-radius: var(--border-radius);
}

th:last-child {
    border-top-right-radius: var(--border-radius);
}

tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius);
}

tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius);
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-light);
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* 通知提示 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1100;
    max-width: 350px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

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

.notification-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-success .notification-icon {
    background-color: rgba(6, 214, 160, 0.2);
    color: var(--success-color);
}

.notification-error .notification-icon {
    background-color: rgba(239, 71, 111, 0.2);
    color: var(--danger-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-light);
}

.notification-close {
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .card {
        padding: 20px;
    }
    
    .notification {
        max-width: calc(100% - 40px);
        top: 10px;
        right: 10px;
    }
}

/* 添加下载按钮样式 */
.download-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.download-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

/* 删除不再使用的AI结果容器样式 */
/* AI结果相关样式 */
.ai-result-container {
    display: none;
}

.ai-result-text {
    display: none;
}

.ai-result-buttons {
    display: none;
}

/* 修改AI结果区域的样式 */
.ai-result {
    display: none;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
}

/* 语言切换按钮 */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

.lang-btn:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

.lang-btn i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 操作按钮样式 */
.actions-cell {
    position: relative;
}

.actions-menu-btn {
    background: #eaecef;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.actions-menu-btn:hover {
    background: #d0d7de;
}

.actions-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
    min-width: 150px;
    display: none;
    z-index: 10;
    overflow: hidden;
}

.actions-menu.show {
    display: block;
    animation: fadeInUp 0.2s ease-out;
}

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

.action-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.action-item:hover {
    background-color: #f1f3f5;
}

.action-item i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.action-item.delete-action {
    color: var(--danger-color);
}

.action-item.delete-action:hover {
    background-color: #fff5f7;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .actions-menu-btn {
        width: 28px;
        height: 28px;
    }
    
    .actions-menu {
        min-width: 130px;
    }
    
    .action-item {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    th:last-child {
        width: 50px;
    }
}

th:last-child {
    width: 60px;
    text-align: center;
}

.task-actions {
    text-align: center;
} 