/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.system-title {
    color: #ff0000;
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.user-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.user-name, .current-time, .current-score {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: bold;
}

.user-name i, .current-time i, .current-score i {
    font-size: 1.3rem;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: #555;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.logout-btn {
    background: #dc3545 !important;
    color: white !important;
    flex: 0.5;
}

/* 内容区域 */
.content-area {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.training-section {
    display: none;
}

.training-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-info {
    display: flex;
    gap: 20px;
    font-weight: bold;
    color: #6c757d;
}

/* 基础学练样式 */
.category-selector, .exercise-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-btn, .exercise-btn {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.category-btn:hover, .exercise-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.category-btn.active, .exercise-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.training-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.current-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.item-content {
    margin-bottom: 25px;
}

.english-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.chinese-text {
    font-size: 1.2rem;
    color: #6c757d;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.audio-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.audio-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.audio-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.audio-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.record-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.audio-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.recording-status {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    border: 2px dashed #dee2e6;
}

.score-feedback {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
}

.nav-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #6c757d;
    color: white;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.next-btn {
    background: #28a745;
}

.next-btn:hover:not(:disabled) {
    background: #218838;
}

/* 项目列表样式 */
.item-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.item-list h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#itemListContainer {
    max-height: 400px;
    overflow-y: auto;
}

.item-list-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #dee2e6;
}

.item-list-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.item-list-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left-color: #4a5bd3;
}

.item-list-item.completed {
    border-left-color: #28a745;
    background: #d4edda;
}

/* 提升学练样式 */
.exercise-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.reading-passage {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.passage-text {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #2c3e50;
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.questions-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.question-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #dee2e6;
}

.question-item:last-child {
    border-bottom: none;
}

.question-text {
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.option-label:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.option-label.selected {
    background: #d4edda;
    border-color: #28a745;
}

.option-label.wrong {
    background: #f8d7da;
    border-color: #dc3545;
}

.option-input {
    display: none;
}

.exercise-controls {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.submit-btn, .reset-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.reset-btn {
    background: #6c757d;
    color: white;
}

.reset-btn:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.results-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.result-item {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-item.correct {
    background: #d4edda;
    color: #155724;
}

.result-item.incorrect {
    background: #f8d7da;
    color: #721c24;
}

.result-score {
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 8px;
}

/* 祝贺特效 */
.celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.celebration-message {
    background: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    animation: pulse 2s infinite;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}

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

.celebration-message h1 {
    font-size: 4rem;
    color: #ff0000;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.celebration-message p {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
}

.close-celebration {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-celebration:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 花朵飘落特效 */
.flower {
    position: fixed;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23ff0000" d="M50,20 C55,10 65,10 70,20 C75,30 65,40 50,50 C35,40 25,30 30,20 C35,10 45,10 50,20 Z"/></svg>');
    animation: fall linear infinite;
    pointer-events: none;
    z-index: 999;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 登录页面样式 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.login-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-box h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #495057;
    font-weight: bold;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.login-hint {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.login-hint p {
    margin-bottom: 8px;
}

.login-hint strong {
    color: #2c3e50;
}

.login-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.login-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.8;
}

/* 管理员页面样式 */
.admin-page {
    background: #f5f7fa;
    min-height: 100vh;
}

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.admin-header h1 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-nav {
    display: flex;
    gap: 10px;
    background: white;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.admin-nav-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.admin-nav-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.admin-nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.section-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.add-form, .import-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px dashed #dee2e6;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.save-btn {
    padding: 12px 25px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cancel-btn {
    padding: 12px 25px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.import-method {
    margin-bottom: 25px;
}

.import-method h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

#importSection textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-family: monospace;
    resize: vertical;
}

#importSection input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    margin-bottom: 15px;
}

.data-table-container {
    margin-top: 30px;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: bold;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

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

.data-table .actions {
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.edit-btn {
    background: #ffc107;
    color: #212529;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 5px solid #667eea;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-info p {
    color: #6c757d;
}

.data-management {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.data-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-top: 5px solid #28a745;
}

.data-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.data-card.warning {
    border-top-color: #ffc107;
}

.data-card.danger {
    border-top-color: #dc3545;
}

.data-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.data-card.warning .data-icon {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.data-card.danger .data-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.data-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.data-card p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.data-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.data-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.warning-btn {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.danger-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.system-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 6px;
}

.info-label {
    font-weight: bold;
    color: #495057;
}

.info-value {
    color: #6c757d;
}

/* 确认对话框 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.dialog-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.dialog-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.confirm-btn, .cancel-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    min-width: 100px;
}

.confirm-btn {
    background: #dc3545;
    color: white;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

/* 消息提示 */
.message-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
    z-index: 1002;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .training-content,
    .exercise-content {
        grid-template-columns: 1fr;
    }
    
    .data-management {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container, .admin-container {
        padding: 10px;
    }
    
    .system-title {
        font-size: 1.8rem;
    }
    
    .user-info-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 0 calc(50% - 10px);
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .progress-info {
        justify-content: center;
    }
    
    .audio-controls {
        justify-content: center;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .admin-nav {
        flex-wrap: wrap;
    }
    
    .admin-nav-btn {
        flex: 1 0 calc(50% - 10px);
    }
    
    .section-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .table-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .data-management {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .celebration-message h1 {
        font-size: 2.5rem;
    }
    
    .celebration-message {
        padding: 30px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .tab-btn, .admin-nav-btn {
        flex: 1 0 100%;
    }
    
    .category-selector, .exercise-selector {
        flex-direction: column;
    }
    
    .category-btn, .exercise-btn {
        width: 100%;
    }
    
    .audio-controls {
        flex-direction: column;
    }
    
    .audio-btn {
        width: 100%;
        justify-content: center;
    }
    
    .stat-card, .data-card {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        min-width: 100%;
    }
}

/* 打印样式 */
@media print {
    .nav-tabs, .audio-controls, .exercise-controls,
    .section-controls, .action-btn, .logout-btn,
    .celebration-container, .confirm-dialog, .message-toast {
        display: none !important;
    }
    
    .container, .admin-container {
        padding: 0;
    }
    
    body {
        background: white;
    }
    
    .header, .content-area, .admin-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* 添加到 style.css 中 */

/* 警告提示样式 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error,
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* 简答题文本区域样式 */
.short-answer {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Microsoft YaHei', sans-serif;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.short-answer:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 结果项样式改进 */
.result-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateX(5px);
}

.result-item.correct {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 5px solid #28a745;
}

.result-item.incorrect {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.result-item i {
    font-size: 1.5rem;
    margin-top: 2px;
}

/* 语音按钮状态样式 */
.audio-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 录音状态动画 */
@keyframes recording {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.recording {
    animation: recording 1s infinite;
}

/* 响应式改进 */
@media (max-width: 768px) {
    .training-content,
    .exercise-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .current-item {
        padding: 20px;
    }
    
    .english-text {
        font-size: 1.4rem;
    }
    
    .chinese-text {
        font-size: 1rem;
    }
    
    .audio-controls {
        flex-direction: column;
    }
    
    .audio-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 打印样式 */
@media print {
    .audio-controls,
    .nav-tabs,
    .user-info-bar,
    .logout-btn {
        display: none !important;
    }
}
