body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #f5f5f5;
}

#app {
    width: 100%;
    max-width: 800px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    cursor: pointer;
    padding: 10px;
    margin: 5px 0;
    background-color: #f0f0f0;
    border-radius: 5px;
    transition: background-color 0.3s;
}

li:hover {
    background-color: #e0e0e0;
}

button {
    padding: 10px 20px;
    margin: 5px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.option {
    margin: 10px 0;
}

.result {
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.wrong-question {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #ffe6e6;
    border-radius: 5px;
}

.quiz-progress {
    margin-bottom: 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

p {
    margin-bottom: 10px;
}

.question-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
    gap: 5px;
    margin-bottom: 20px;
}

.question-status {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    font-weight: bold;
}

.question-status.unanswered {
    background-color: #e0e0e0;
    color: #000;
}

.question-status.correct {
    background-color: #4CAF50;
    color: white;
}

.question-status.incorrect {
    background-color: #f44336;
    color: white;
}

.status-legend {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.status-legend span {
    padding: 5px 10px;
    border-radius: 5px;
}

.status-legend .unanswered {
    background-color: #e0e0e0;
}

.status-legend .correct {
    background-color: #4CAF50;
    color: white;
}

.status-legend .incorrect {
    background-color: #f44336;
    color: white;
}

.correct {
    background-color: #4CAF50;
    color: white;
}

.incorrect {
    background-color: #f44336;
    color: white;
}

.correct-answer {
    color: #4CAF50;
    font-weight: bold;
}

.incorrect-answer {
    color: #f44336;
    font-weight: bold;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    opacity: 1;
}

.clear-progress-btn {
    background-color: #f44336;
}

.clear-progress-btn:hover {
    background-color: #d32f2f;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

.login-form {
    width: 100%;
    max-width: 300px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
    box-sizing: border-box;
}

.button-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.login-btn, .reset-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn {
    background-color: #4CAF50;
    color: white;
}

.login-btn:hover {
    background-color: #45a049;
}

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

.reset-btn:hover {
    background-color: #d32f2f;
}

.error-message {
    color: #f44336;
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    #app {
        padding: 15px;
    }
    
    .login-form {
        width: 100%;
    }
}

/* 保留之前的 CSS，并修改或添加以下内容 */

.quiz-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.quiz-controls button {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 5px;
    font-size: 14px;
    min-height: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quiz-controls {
        grid-template-columns: repeat(3, 1fr);
    }

    .quiz-controls button {
        font-size: 12px;
        padding: 8px 5px;
    }
}

/* 登出按钮样式 */
.logout-btn {
    background-color: #f44336;
    color: white;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.logout-btn:hover {
    background-color: #d32f2f;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logout-btn:active {
    background-color: #b71c1c;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 其他按钮样式 */
.quiz-controls button:not(.logout-btn) {
    background-color: #2196F3;
    color: white;
}

.quiz-controls button:not(.logout-btn):hover {
    background-color: #1976D2;
}

/* 调整 app 容器样式 */
#app {
    width: 100%;
    max-width: 800px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    box-sizing: border-box;
}

@media (max-width: 840px) {
    #app {
        margin: 10px;
        padding: 15px;
    }
}

body {
    padding: 0;
    background-color: #f5f5f5;
}
.quiz-total {
    font-weight: bold;
    margin-bottom: 15px;
    color: #2196F3;
}

.quiz-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background-color: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.quiz-list li:hover {
    background-color: #e0e0e0;
}

.quiz-count {
    font-size: 0.9em;
    color: #666;
}

.directory-navigation {
    margin-bottom: 15px;
}

.current-path {
    margin-left: 10px;
    font-style: italic;
}

.directory-list, .quiz-list {
    list-style-type: none;
    padding: 0;
}

.directory-item, .quiz-item {
    cursor: pointer;
    padding: 10px;
    margin: 5px 0;
    background-color: #f0f0f0;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.directory-item:hover, .quiz-item:hover {
    background-color: #e0e0e0;
}

.directory-item::before {
    content: '📁';
    margin-right: 5px;
}

.quiz-item::before {
    content: '📄';
    margin-right: 5px;
}
.question-image {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}