/* --- 通用样式 (General) --- */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2em;
}

main {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

footer {
    text-align: center;
    padding: 15px;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 0.9em;
}

/* --- 按钮 (Buttons) --- */
.button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1em;
    transition: background-color 0.3s ease;
    text-align: center;
    margin-top: 15px; /* 增加按钮和文字的间距 */
}

.primary {
    background-color: #28a745; 
    color: white;
}

.primary:hover {
    background-color: #218838;
}

.secondary {
    background-color: #6c757d; 
    color: white;
}

.secondary:hover {
    background-color: #5a6268;
}

/* --- 卡片 (Cards - for index.html) --- */
.card {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    flex: 1 1 250px; 
    max-width: 400px;
    border-left: 5px solid #007bff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h2 {
    color: #007bff;
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.test-card {
    border-left-color: #ffc107;
}
.correction-card {
    border-left-color: #dc3545;
}

/* --- 口诀卡片专属样式 (Mnemonic Card) --- */
.mnemonic-card {
    flex: 1 1 100%; /* 占据整行 */
    max-width: 900px;
    border-left-color: #007bff;
    text-align: center;
}

.mnemonic-card h2 {
    color: #dc3545; /* 强调重要性 */
    border-bottom-color: #dc3545;
}

.mnemonic-content {
    margin-top: 20px;
    padding: 15px 0;
    background-color: #fff3cd; /* 突出背景 */
    border-radius: 6px;
}

.mnemonic-line {
    font-size: 1.5em;
    font-weight: bold;
    color: #856404;
    line-height: 2;
    margin: 5px 0;
}

/* --- 练习区域 (Test Area - for test.html & correct_test.html) --- */
.test-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 30px auto;
}

#status-bar {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px dashed #ccc;
    font-weight: bold;
    color: #007bff;
}

#question-area {
    min-height: 150px;
}

.actions {
    margin-top: 30px;
    text-align: center;
}

.actions button {
    margin: 5px;
}

/* --- 不规则动词填空题表格样式 --- */
.verb-fill-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.verb-fill-table th, .verb-fill-table td {
    border: 1px solid #ddd;
    padding: 15px 10px;
    text-align: center;
}

.verb-fill-table th {
    background-color: #f8f8f8;
    color: #007bff;
}

.verb-fill-table input[type="text"] {
    width: 90%;
    padding: 8px;
    border: 2px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 1.1em;
}

/* --- 句子改错题样式 (correct_test.html) --- */
.sentence-display {
    font-size: 1.4em;
    line-height: 2;
    padding: 20px;
    border: 2px dashed #dc3545;
    border-radius: 8px;
    min-height: 100px;
    margin-bottom: 20px;
    text-align: left;
}
.sentence-display span {
    cursor: pointer;
    padding: 5px 8px;
    margin: 0 2px;
    border-radius: 4px;
    transition: background-color 0.2s;
    white-space: nowrap;
}
.sentence-display span:hover {
    background-color: #e9ecef;
}
.sentence-display span.error-selected {
    background-color: #ffc107;
    border: 2px solid #e0a800;
    font-weight: bold;
}

.correction-area {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
.correction-area input[type="text"] {
    padding: 10px;
    margin-top: 10px;
    width: 80%;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 1.1em;
}
.correction-area label {
    font-weight: bold;
    color: #343a40;
}

.hint-box {
    margin-top: 15px;
    padding: 15px;
    background-color: #e0f7fa;
    border-left: 5px solid #00bcd4;
    color: #005662;
    margin-bottom: 20px;
}

/* --- 答案状态反馈 --- */
.verb-fill-table input.correct,
.correction-status.correct-feedback {
    border-color: #28a745;
    background-color: #e6ffec;
}

.verb-fill-table input.incorrect,
.correction-status.incorrect-feedback {
    border-color: #dc3545;
    background-color: #ffe6e8;
}

.feedback, .correction-status {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    font-weight: bold;
}

.success-feedback {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    font-size: 1.2em;
}

.hidden {
    display: none;
}