/* 基础容器样式 */
.dictation-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* 标题样式 */
.dictation-header h1 {
    color: #1a73e8;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-weight: 600;
}

/* 标签页样式 */
.dictation-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    gap: 2px;
}

.dictation-tab {
    background: #f8f9fa;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #5f6368;
}

.dictation-tab:hover {
    background: #f1f3f4;
    color: #1a73e8;
}

.dictation-tab.active {
    border-bottom-color: #1a73e8;
    color: #1a73e8;
    background: #fff;
    font-weight: 600;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #3c4043;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* 按钮通用样式 */
.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 8px;
    height: 40px;
}

/* 主要按钮 */
.button-primary,
input[type="submit"].button-primary {
    background-color: #1a73e8;
    color: white;
}

.button-primary:hover,
input[type="submit"].button-primary:hover {
    background-color: #1765cc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.button-primary:active {
    background-color: #165dba;
}

/* 次要按钮 */
.button,
button:not(.button-primary) {
    background-color: #f8f9fa;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.button:hover,
button:not(.button-primary):hover {
    background-color: #f1f3f4;
    border-color: #d2d6dc;
}

/* 危险按钮 */
.button-danger {
    background-color: #ea4335;
    color: white;
}

.button-danger:hover {
    background-color: #d93025;
}

/* 禁用状态 */
button:disabled,
.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f1f3f4 !important;
    color: #5f6368 !important;
    border-color: #dadce0 !important;
}

/* 表格样式 */
.templates-list {
    margin-bottom: 40px;
}

.templates-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.templates-table th,
.templates-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.templates-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #5f6368;
}

.templates-table tr:hover {
    background-color: #f8f9fa;
}

/* 筛选器样式 */
.template-filters {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.template-filters select {
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    min-width: 180px;
    background-color: white;
}

/* 默写练习区域 */
.dictation-practice-area {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.dictation-controls {
    margin-bottom: 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 默写项目样式 */
.dictation-items {
    margin-bottom: 30px;
}

.dictation-item {
    margin-bottom: 15px;
}

.dictation-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #3c4043;
}

.dictation-item input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 16px;
}

.dictation-submit {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 通知样式 */
.dictation-notice {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dictation-notice.success {
    background-color: #e6f4ea;
    color: #137333;
    border: 1px solid #b7e1cd;
}

.dictation-login-message {
    padding: 20px;
    background-color: #fef7e0;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #854d0e;
    text-align: center;
    font-size: 16px;
    margin: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dictation-container {
        padding: 15px;
    }
    
    .template-filters {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .template-filters select {
        width: 100%;
        min-width: auto;
    }
    
    .templates-table th:nth-child(2),
    .templates-table td:nth-child(2),
    .templates-table th:nth-child(3),
    .templates-table td:nth-child(3) {
        display: none;
    }
    
    .dictation-controls {
        flex-direction: column;
    }
    
    .dictation-tab {
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        text-align: center;
    }
    
    .button,
    button,
    input[type="submit"] {
        width: 100%;
    }
}

/*公共默写本折叠*/
.template-section {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.template-section-header {
    background-color: #f5f5f5;
    padding: 12px 15px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.template-section-header:hover {
    background-color: #e9e9e9;
}

.template-section-content {
    padding: 15px;
    border-top: 1px solid #ddd;
}

.toggle-icon {
    font-size: 12px;
}

/* 朗读实时词语显示 */
.current-word-container {
    margin-left: 20px;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    min-width: 200px;
}

#current-word-display {
    font-weight: bold;
    color: #0073aa;
    margin-left: 5px;
    font-size: 16px;
}
