/* 基础重置和字体 */
:root {
    --primary-color: #3b82f6; /* 清爽的蓝色 */
    --secondary-color: #10b981; /* 辅助绿色 */
    --background-color: #f3f4f6;
    --card-background: #ffffff;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 40px 20px;
}

/* 头部样式 */
.app-header {
    text-align: center;
    margin-bottom: 40px;
}

.app-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.app-header p {
    color: #6b7280;
}

/* 主容器布局 (使用 Grid 实现两栏布局) */
.container {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* 输入区域窄，结果区域宽 */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 卡片基础样式 */
.card {
    background: var(--card-background);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.card h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* 通用输入和标题样式 */
label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #4b5563;
}

input[type="text"], textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

textarea {
    resize: vertical;
}

.section-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 15px;
    margin-top: 10px;
}

/* 科目选择样式 */
.subject-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.subject-tag {
    background: #e0f2fe;
    color: var(--primary-color);
    border: 1px solid #93c5fd;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.subject-tag:hover:not(.selected) {
    background: #bfdbfe;
}

.subject-tag.selected {
    background: var(--primary-color);
    color: var(--card-background);
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.selection-info {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 25px;
}

#selected-count {
    font-weight: 700;
    color: var(--primary-color);
}

/* 匹配模式样式 (Radio 按钮美化) */
.match-mode-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.match-mode-selection input[type="radio"] {
    display: none;
}

.mode-tag {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background-color: #f9fafb;
    transition: background-color 0.2s, border-color 0.2s;
    font-size: 0.9rem;
}

.match-mode-selection input[type="radio"]:checked + .mode-tag {
    background-color: var(--secondary-color);
    color: var(--card-background);
    border-color: var(--secondary-color);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.mode-tag:hover {
    background-color: #eff6ff;
    border-color: #93c5fd;
}


/* 按钮样式 */
.action-button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.action-button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.action-button i {
    margin-right: 8px;
}

/* 结果面板样式 */
.ai-result-content {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

.waiting-state {
    text-align: center;
    color: #6b7280;
}

.robot-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.waiting-state p {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.tip-text {
    font-size: 0.9rem;
    color: #9ca3af;
    max-width: 400px;
}

.suggestion-output {
    width: 100%;
    text-align: left;
}
.suggestion-output h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

/* 响应式调整 */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr; /* 小屏幕堆叠显示 */
    }
}