/* 基础重置与字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 主容器 */
.container {
    width: 100%;
    max-width: 800px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    padding: 40px;
}

/* 头部 */
header {
    text-align: center;
    margin-bottom: 40px;
}
header h1 {
    color: #2d3436;
    font-size: 2.5rem;
    margin-bottom: 10px;
}
header .subtitle {
    color: #636e72;
    font-size: 1.1rem;
    font-weight: 500;
}

/* 输入区域 */
.input-area {
    margin-bottom: 40px;
}
.input-area textarea {
    width: 100%;
    height: 150px;
    padding: 20px;
    border: 2px solid #dfe6e9;
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}
.input-area textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

/* 课程提示 */
.course-hint {
    background-color: #e3f2fd;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 10px;
}
.course-hint i {
    font-size: 1.2rem;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 15px;
}
button {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-primary {
    background: linear-gradient(to right, #6c5ce7, #a29bfe);
    color: white;
    flex-grow: 2;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(108, 92, 231, 0.3);
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-secondary {
    background-color: #f1f2f6;
    color: #636e72;
    flex-grow: 1;
}
.btn-secondary:hover {
    background-color: #dfe4ea;
}
.btn-outline {
    background-color: transparent;
    border: 2px solid #00b894;
    color: #00b894;
    flex-grow: 1;
}
.btn-outline:hover {
    background-color: rgba(0, 184, 148, 0.1);
}

/* 回复区域 */
.response-area {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}
.response-area h3 {
    color: #2d3436;
    margin-bottom: 20px;
    font-size: 1.5rem;
}
#answerDisplay {
    min-height: 150px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border-left: 5px solid #6c5ce7;
    margin-bottom: 20px;
}
.placeholder-text {
    color: #b2bec3;
    font-style: italic;
    text-align: center;
    padding: 20px;
}
.ai-answer {
    color: #2d3436;
    line-height: 1.7;
    white-space: pre-wrap;
}
.ai-answer ul, .ai-answer ol {
    margin-left: 20px;
    margin-bottom: 15px;
}
.ai-answer li {
    margin-bottom: 8px;
}
.ai-answer strong {
    color: #6c5ce7;
    font-weight: 600;
}
.ai-answer .course-warning {
    color: #e74c3c;
    font-weight: 600;
    padding: 10px;
    border-left: 3px solid #e74c3c;
    background-color: #ffeaea;
    border-radius: 5px;
}

/* 状态栏 */
.status-bar {
    font-size: 0.9rem;
    color: #636e72;
    padding: 10px;
    text-align: center;
    border-top: 1px solid #dfe6e9;
    font-weight: 500;
}

/* 页脚 */
footer {
    margin-top: 40px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}
.footer-note {
    font-size: 0.8rem;
    margin-top: 5px;
    color: #aaa;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.modal-header h3 {
    color: #2d3436;
    margin: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #636e72;
    line-height: 1;
}
.modal-close:hover {
    color: #2d3436;
}
.modal-body {
    line-height: 1.6;
    color: #2d3436;
}
.outline-section {
    margin-bottom: 20px;
}
.outline-section h4 {
    color: #6c5ce7;
    margin-bottom: 8px;
    font-size: 1.2rem;
}
.outline-section ul {
    margin-left: 20px;
    color: #555;
}
.outline-section li {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }
    header h1 {
        font-size: 2rem;
    }
    .button-group {
        flex-direction: column;
    }
    .modal-content {
        padding: 20px;
        width: 95%;
    }
}