:root {
    --background-color: #fff7ed;
    --accent-color: #f97316;
    --button-color: #fb923c;
    --highlight-color: #fed7aa;
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --text-color: #4b5563;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    background-color: var(--background-color);
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, var(--accent-color), #c2410c);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
}

header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#rating-display {
    display: flex;
    align-items: center;
}

#rating-label {
    margin-right: 15px;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
}

main {
    display: flex;
    gap: 25px;
}

.left-panel {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-list {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.section-list h2 {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--accent-color);
    position: relative;
    padding-bottom: 8px;
}

.section-list h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

#sections-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
    font-family: inherit;
    transition: var(--transition);
}

#sections-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.button-group {
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--button-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-family: inherit;
}

button:hover {
    background-color: #ea580c;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.accent-btn {
    background: linear-gradient(to right, var(--accent-color), #c2410c);
    font-weight: bold;
    padding: 12px 20px;
    letter-spacing: 0.5px;
}

.accent-btn:hover {
    background: linear-gradient(to right, #c2410c, var(--accent-color));
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#test-info {
    background-color: rgba(249, 115, 22, 0.1);
    padding: 12px;
    border-radius: var(--border-radius);
    font-size: 14px;
    border-left: 4px solid var(--accent-color);
}

.question-frame, .result-frame {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
}

.question-frame h2, .result-frame h2 {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 20px;
    position: relative;
    padding-bottom: 10px;
}

.question-frame h2::after, .result-frame h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.progress-frame {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    color: var(--accent-color);
    font-weight: bold;
    background-color: rgba(74, 111, 165, 0.1);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
}

.question-label {
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    text-align: center;
    color: var(--accent-color);
    background-color: rgba(74, 111, 165, 0.05);
    padding: 15px;
    border-radius: var(--border-radius);
}

.hint-label {
    background-color: #fff9c4;
    color: #856404;
    padding: 10px;
    margin: 15px 0;
    text-align: center;
    min-height: 40px;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.attempts-label {
    background-color: #ffecb3;
    color: #856404;
    padding: 10px;
    margin: 15px 0;
    text-align: center;
    min-height: 40px;
    border-radius: var(--border-radius);
    font-weight: 500;
}

#answer-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    margin: 15px 0;
    transition: var(--transition);
    font-family: inherit;
}

#answer-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.feedback-label {
    min-height: 40px;
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
    font-size: 18px;
    padding: 10px;
    border-radius: var(--border-radius);
}

.btn-frame {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 8% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: var(--transition);
}

.close:hover {
    color: var(--accent-color);
}

#modal-title {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 22px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

/* 结果显示区域 */
.result-details {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.result-column {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
    background-color: #fafafa;
}

.result-column h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

#result-content {
    line-height: 1.8;
}

#result-content p {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
}

#result-content h3 {
    color: var(--accent-color);
    margin: 15px 0 10px;
}

#result-content ul {
    list-style-position: inside;
    padding-left: 10px;
}

#result-content li {
    margin-bottom: 5px;
    padding: 5px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    
    .left-panel {
        flex: none;
        width: 100%;
    }
    
    .result-details {
        flex-direction: column;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .button-group {
        flex-direction: column;
    }
}

/* 加载动画样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s;
}

.loading-overlay.fade-out {
    opacity: 0;
}

.spinner {
    width: 70px;
    text-align: center;
}

.spinner > div {
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 100%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1.0);
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
    color: white;
    font-weight: 500;
    max-width: 300px;
    z-index: 2500;
    transform: translateX(110%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.info {
    background-color: #2196F3;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.warning {
    background-color: var(--warning-color);
}

.notification.error {
    background-color: var(--error-color);
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s;
}

.fade-out {
    animation: fadeOut 0.5s;
}

.shake {
    animation: shake 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 表单错误样式 */
input.error {
    border-color: var(--error-color) !important;
    animation: shake 0.5s;
}

/* 答案反馈样式 */
.feedback-label.success {
    color: var(--success-color);
}

.feedback-label.warning {
    color: var(--warning-color);
}

.feedback-label.error {
    color: var(--error-color);
}

/* 测试结果样式 */
.test-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 10px;
    min-width: 80px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-value.good {
    color: var(--success-color);
}

.stat-value.medium {
    color: var(--warning-color);
}

.stat-value.bad {
    color: var(--error-color);
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.wrong-words-list {
    list-style-type: none;
    padding: 0;
}

.wrong-words-list li {
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: rgba(244, 67, 54, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--error-color);
}

.wrong-words-list .chinese {
    font-weight: bold;
}

.wrong-words-list .english {
    color: var(--accent-color);
}

/* 答案输入反馈 */
#answer-input.correct {
    border-color: var(--success-color);
    background-color: rgba(76, 175, 80, 0.1);
}

#answer-input.error {
    border-color: var(--error-color);
    background-color: rgba(244, 67, 54, 0.1);
}

/* 测试活动状态 */
.question-frame.test-active {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 10px rgba(74, 111, 165, 0.3);
}

/* 错误统计表格 */
.mistakes-table {
    width: 100%;
    border-collapse: collapse;
}

.mistakes-header {
    display: flex;
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
}

.mistakes-row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.mistakes-row:nth-child(even) {
    background-color: #f9f9f9;
}

.mistakes-table .col {
    flex: 1;
    padding: 10px;
    text-align: center;
}

.error-count {
    font-weight: bold;
    color: var(--error-color);
}

/* 删除确认列表 */
.delete-list {
    margin: 15px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.delete-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* 单词列表样式 */
.word-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.word-item {
    padding: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.word-item:hover {
    background-color: #f0f0f0;
}

.word-item input {
    margin-right: 10px;
}

/* 危险按钮 */
.danger-btn {
    background-color: var(--error-color);
}

.danger-btn:hover {
    background-color: #d32f2f;
} 