* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);    min-height: 100vh;    padding: 20px;    /* 移动设备优化 */    -webkit-text-size-adjust: 100%;    -webkit-tap-highlight-color: transparent;    touch-action: manipulation;}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3em;
    color: #4a90e2;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: bounce 2s infinite;
}

.header p {
    font-size: 1.4em;
    color: #666;
    font-weight: 500;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 单词学习页面新增样式 */
.word-count {
    color: #666;
    font-size: 16px;
    font-weight: normal;
    margin-left: 10px;
}

/* 单词卡片样式 */
.word-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 10px;
}

.word-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}

.word-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #4a90e2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.word-english {
    font-size: 32px;
    font-weight: 700;
    color: #4a90e2;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.word-phonetic {
    font-size: 18px;
    color: #6c757d;
    font-family: 'Times New Roman', serif;
    text-align: center;
    padding: 4px 0;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 0;
}

.word-chinese {
    font-size: 22px;
    color: #ff6b6b;
    padding: 12px 0;
    border-bottom: 1px dashed #e9ecef;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.word-example {
    font-size: 16px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.word-status-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.status-learning {
    background: #fff3cd;
    color: #856404;
}

.status-learned {
    background: #d4edda;
    color: #155724;
}

.speak-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4a90e2;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.speak-btn:hover {
    background: #357abd;
    transform: scale(1.1);
}

.speak-btn-small {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

/* 测验样式 */
.quiz-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.quiz-progress {
    margin-bottom: 20px;
}

.quiz-progress .progress-bar {
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.quiz-translation {
    font-size: 24px;
    color: #ff6b6b;
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.quiz-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.quiz-word {
    font-size: 28px;
    font-weight: 700;
    color: #4a90e2;
}

.quiz-hint {
    font-size: 18px;
    color: #28a745;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
}

.quiz-input-section {
    margin-bottom: 20px;
}

.quiz-input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

#quiz-answer {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

#quiz-answer:focus {
    outline: none;
    border-color: #4a90e2;
}

.quiz-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.quiz-result {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.quiz-result.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.quiz-result.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.quiz-controls {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* 练习模式样式 */
.practice-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.practice-word {
    text-align: center;
    margin-bottom: 30px;
}

.word-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.practice-word-text {
    font-size: 48px;
    font-weight: 700;
    color: #4a90e2;
    letter-spacing: -1px;
}

.word-phonetic-display {
    text-align: center;
    margin-bottom: 15px;
}

.practice-phonetic-text {
    font-size: 24px;
    color: #6c757d;
    font-family: 'Times New Roman', serif;
    font-style: italic;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
}

.word-translation {
    font-size: 24px;
    color: #ff6b6b;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.practice-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.practice-progress {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.practice-exit {
    text-align: center;
}

/* 按钮变体 */
button {    background: #4a90e2;    color: white;    border: none;    padding: 12px 24px;    border-radius: 8px;    cursor: pointer;    transition: all 0.3s ease;    font-weight: 600;    font-size: 15px;    display: inline-flex;    align-items: center;    gap: 8px;    /* 移动设备触摸优化 */    -webkit-tap-highlight-color: transparent;    touch-action: manipulation;    min-height: 44px;    min-width: 44px;}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: #333;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-header h2 {
    font-size: 32px;
    color: #4a90e2;
    margin: 0;
}

.detail-phonetic {
    text-align: center;
    margin-bottom: 20px;
}

.phonetic-text {
    font-size: 20px;
    color: #6c757d;
    font-family: 'Times New Roman', serif;
    font-style: italic;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
}

.detail-translation {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-translation p {
    font-size: 20px;
    color: #ff6b6b;
    margin: 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    flex: 1;
}

.detail-example {
    margin-bottom: 20px;
}

.example-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.example-content p {
    margin: 0;
    flex: 1;
    font-style: italic;
    color: #666;
}

.word-status {
    margin-bottom: 20px;
}

.word-status label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.word-status select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-message i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ccc;
}

.empty-message p {
    font-size: 18px;
    margin: 0;
}

.hidden {
    display: none;
}

/* 选择器样式 */
.textbook-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.textbook-selector select {
    min-width: 200px;
    flex: 1;
    max-width: 300px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.controls {    display: flex;    flex-wrap: wrap;    gap: 15px;    justify-content: center;    align-items: center;}.controls select {    min-width: 150px;}

/* 移动设备优化 */@media (max-width: 768px) {    body {        padding: 10px;        font-size: 16px;    }        .container {        padding: 15px;        border-radius: 15px;    }        .header h1 {        font-size: 2.2em;        margin-bottom: 8px;    }        .header p {        font-size: 1.1em;    }        .word-list {        grid-template-columns: 1fr;        gap: 16px;        padding: 5px;    }        .word-card {        border-radius: 12px;    }        .card-content {        padding: 15px;        gap: 12px;    }        .word-english {        font-size: 28px;    }        .word-phonetic {        font-size: 16px;        padding: 6px;    }        .word-chinese {        font-size: 20px;        padding: 10px 0;    }        .word-example {        font-size: 14px;        padding: 10px;        flex-direction: column;        gap: 8px;    }        .practice-word-text {        font-size: 36px;    }        .practice-phonetic-text {        font-size: 20px;    }        .word-translation {        font-size: 24px;    }        .practice-controls {        flex-direction: column;        gap: 10px;        align-items: stretch;    }        .practice-controls button {        width: 100%;        padding: 12px;        font-size: 16px;        min-height: 44px;    }        .word-display {        padding: 20px;        flex-direction: column;        gap: 15px;    }        .quiz-buttons {        flex-direction: column;        gap: 10px;        align-items: stretch;    }        .quiz-buttons button {        width: 100%;        padding: 12px;        font-size: 16px;        min-height: 44px;    }        .modal-content {        width: 95%;        margin: 5% auto;        padding: 15px;        border-radius: 12px;    }        .detail-header {        padding: 15px;        flex-direction: column;        text-align: center;    }        .example-content {        padding: 15px;        flex-direction: column;        gap: 10px;    }        .phonetic-text {        font-size: 20px;    }        .controls {        flex-direction: column;        gap: 10px;        align-items: stretch;    }        .controls select {        width: 100%;        min-width: auto;        padding: 12px;        font-size: 16px;        min-height: 44px;    }        .textbook-selector select {        width: 100%;        padding: 12px;        font-size: 16px;        min-height: 44px;    }        .speak-btn {        width: 40px;        height: 40px;        font-size: 18px;    }        .speak-btn-small {        width: 32px;        height: 32px;        font-size: 16px;    }        /* 音标卡片移动端优化 */    .phonetic-grid {        grid-template-columns: 1fr;        gap: 15px;        padding: 5px;    }        .phonetic-card {        padding: 15px;        border-radius: 12px;    }        .phonetic-symbol {        font-size: 1.8em;        margin-bottom: 12px;    }        .examples {        grid-template-columns: 1fr;        gap: 8px;        margin-bottom: 12px;    }        .example {        font-size: 1em;        padding: 10px;        flex-direction: row;        justify-content: space-between;        align-items: center;    }        .example .word {        font-size: 1.1em;    }        .example .phonetic {        font-size: 0.9em;    }        .play-btn {        width: 44px;        height: 44px;        font-size: 20px;    }        .category-title {        font-size: 1.6em;        margin-bottom: 15px;    }        .subsection h3 {        font-size: 1.3em;        margin-bottom: 15px;    }        .game-buttons {        flex-direction: column;        gap: 10px;    }        .game-btn {        width: 100%;        padding: 12px;        font-size: 16px;        min-height: 44px;    }}/* 小屏幕手机优化 */@media (max-width: 480px) {    body {        padding: 5px;    }        .container {        padding: 10px;        border-radius: 10px;    }        .header h1 {        font-size: 1.8em;        margin-bottom: 5px;    }        .header p {        font-size: 1em;    }        .word-list {        gap: 12px;    }        .card-content {        padding: 12px;        gap: 10px;    }        .word-english {        font-size: 24px;    }        .word-phonetic {        font-size: 14px;        padding: 4px;    }        .word-chinese {        font-size: 18px;        padding: 8px 0;    }        .word-example {        font-size: 13px;        padding: 8px;    }        .practice-word-text {        font-size: 30px;    }        .practice-phonetic-text {        font-size: 18px;    }        .word-translation {        font-size: 20px;    }        .modal-content {        width: 98%;        margin: 2% auto;        padding: 12px;    }        .phonetic-text {        font-size: 18px;    }        button {        padding: 10px 16px;        font-size: 14px;        min-height: 44px; /* iOS 推荐的最小触摸目标 */    }        .speak-btn {        width: 44px;        height: 44px;        font-size: 20px;    }        .speak-btn-small {        width: 36px;        height: 36px;        font-size: 18px;    }        .phonetic-card {        padding: 12px;    }        .phonetic-symbol {        font-size: 1.6em;        margin-bottom: 10px;    }        .examples {        gap: 6px;        margin-bottom: 10px;    }        .example {        font-size: 0.9em;        padding: 8px;    }        .category-title {        font-size: 1.4em;        margin-bottom: 12px;    }        .subsection h3 {        font-size: 1.2em;        margin-bottom: 12px;    }}

/* 音标卡片样式 */
.phonetic-sections {
    margin-bottom: 40px;
}

.phonetic-category {
    margin-bottom: 40px;
}

.category-title {
    font-size: 2em;
    color: #4a90e2;
    margin-bottom: 20px;
    text-align: center;
}

.subsection {
    margin-bottom: 30px;
}

.subsection h3 {
    font-size: 1.5em;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.phonetic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px;
}

.phonetic-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.phonetic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.phonetic-symbol {
    font-size: 2em;
    color: #4a90e2;
    font-family: 'Times New Roman', serif;
    margin-bottom: 15px;
}

.examples {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.example {
    font-size: 1.1em;
    color: #666;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.example .word {
    font-weight: 600;
    color: #4a90e2;
}

.example .phonetic {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: #6c757d;
    font-size: 0.9em;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4a90e2;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.play-btn:hover {
    background: #357abd;
    transform: scale(1.1);
}

/* 练习部分样式 */
.practice-section {
    text-align: center;
    margin-bottom: 40px;
}

.practice-section h2 {
    font-size: 2em;
    color: #4a90e2;
    margin-bottom: 20px;
}

.game-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.game-btn {
    padding: 12px 24px;
    font-size: 1.1em;
}

/* 进度部分样式 */
.progress-section {
    text-align: center;
    margin-bottom: 40px;
}

.progress-section h3 {
    font-size: 1.5em;
    color: #666;
    margin-bottom: 15px;
}

#progressText {    font-size: 1.1em;    color: #666;    margin-top: 10px;}/* 移动设备专用样式 */.mobile-device .phonetic-card {    user-select: none;    -webkit-user-select: none;    -webkit-touch-callout: none;}.mobile-device .phonetic-card.long-pressed {    transform: scale(0.98);    background: #f0f8ff;    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);}/* 使用CSS变量解决移动浏览器视口问题 */.container {    min-height: calc(var(--vh, 1vh) * 100 - 40px);}/* 移动设备横屏优化 */@media screen and (orientation: landscape) and (max-height: 500px) {    .header h1 {        font-size: 1.5em;        margin-bottom: 5px;    }        .header p {        font-size: 0.9em;        margin-bottom: 15px;    }        .container {        padding: 10px;    }        .phonetic-card {        padding: 10px;    }        .phonetic-symbol {        font-size: 1.4em;        margin-bottom: 8px;    }        .examples {        gap: 4px;        margin-bottom: 8px;    }}/* 高分辨率屏幕优化 */@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {    .phonetic-symbol {        -webkit-font-smoothing: antialiased;        -moz-osx-font-smoothing: grayscale;    }        button {        -webkit-font-smoothing: antialiased;        -moz-osx-font-smoothing: grayscale;    }} 