/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    padding: 20px;
}

#game-container {
    text-align: center;
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.game-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 10px;
    margin: 20px auto;
    max-width: 600px;
}

.tile {
    aspect-ratio: 1;
    background-color: #4CAF50;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
}

.tile:hover {
    transform: scale(1.05);
    background-color: #3e8e41;
}

.selected {
    background-color: #ff9800;
    transform: scale(1.1);
}

#score {
    font-size: 24px;
    margin: 20px 0;
    color: #2c3e50;
}

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

.back-btn, .home-btn, #restart-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.back-btn:hover, .home-btn:hover, #restart-btn:hover {
    background-color: #2980b9;
}

#restart-btn {
    background-color: #e74c3c;
}

#restart-btn:hover {
    background-color: #c0392b;
}

/* 响应式设计 */
@media (max-width: 600px) {
    #game-board {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .tile {
        font-size: 14px;
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 标题样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

header::after {
    content: '';
    display: block;
    width: 80%;
    height: 3px;
    background: linear-gradient(to right, transparent, #4a6fa5, transparent);
    margin: 15px auto 0;
}

h1 {
    font-size: 46px;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    font-weight: 700;
}

.subtitle {
    font-size: 24px;
    color: #5d6d7e;
    font-style: italic;
}

h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

h3 {
    font-size: 28px;
    color: #34495e;
    margin-bottom: 15px;
    font-weight: 600;
}

/* 游戏信息区域 */
.game-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(to right, #f1f8ff, #e3f2fd);
    border-radius: 10px;
    font-size: 24px;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e3f2fd;
}

.score-container, .timer-container {
    padding: 10px 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.score-container.score-up {
    animation: scoreUp 0.5s ease;
}

@keyframes scoreUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background-color: #d4ffea; }
    100% { transform: scale(1); }
}

.level-container {
    padding: 10px;
}

#level-select {
    font-size: 22px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #bdc3c7;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

#level-select:hover {
    border-color: #3498db;
}

/* 控制面板 */
.control-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    font-size: 22px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ecf0f1;
    color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:hover::after {
    animation: ripple 1s ease-out;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.primary-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.primary-btn:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.sound-toggle {
    font-size: 20px;
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sound-toggle input {
    width: 20px;
    height: 20px;
    margin-left: 10px;
    cursor: pointer;
}

/* 游戏板和单词库布局 */
.game-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

/* 游戏板 */
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 0 auto;
    perspective: 1000px;
    flex: 3;
}

/* 单词库 */
.word-library {
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-left: 20px;
    width: 320px;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.word-library h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 26px;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.word-library-controls {
    display: flex;
    margin-bottom: 15px;
    gap: 8px;
}

.word-search-container {
    position: relative;
    flex-grow: 1;
}

.word-search-container input {
    width: 100%;
    padding: 10px 30px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.word-search-container::after {
    content: '🔍';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.word-library-controls button {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.word-library-controls button:hover {
    background-color: #e0e0e0;
}

#word-list {
    overflow-y: auto;
    flex-grow: 1;
}

.word-item-empty {
    color: #777;
    text-align: center;
    padding: 20px;
    font-style: italic;
    font-size: 18px;
}

.word-category {
    background-color: #e9f7fe;
    color: #2980b9;
    padding: 10px 15px;
    margin: 12px 0 8px 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 1;
}

.word-item {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.word-item.highlight {
    animation: highlight 1.5s ease;
}

@keyframes highlight {
    0%, 100% { background-color: white; }
    50% { background-color: #fffde7; }
}

.word-english {
    padding: 12px 15px;
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
}

.word-actions {
    display: flex;
    gap: 8px;
}

.word-actions button {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
    transition: color 0.2s;
}

.word-actions button:hover {
    color: #3498db;
}

.word-pronunciation {
    padding: 10px 15px;
    color: #666;
    font-style: italic;
    border-bottom: 1px dashed #eee;
    font-size: 16px;
}

.word-chinese {
    padding: 10px 15px;
    color: #333;
    font-size: 18px;
}

.word-item.collapsed .word-pronunciation,
.word-item.collapsed .word-chinese {
    display: none;
}

/* 卡片样式增强 */
.card {
    height: 130px;
    position: relative;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    user-select: none;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 15px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

.card.selected {
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #3498db, 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
    z-index: 5;
    filter: brightness(1.2);
}

.card.matched {
    cursor: default;
}

.card.wrong {
    animation: shake 0.5s ease;
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
}

/* 添加消失动画类 */
.card.disappearing {
    animation: matchedAndDisappear 0.8s forwards;
    pointer-events: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes matchedAndDisappear {
    0% { 
        transform: scale(1); 
        opacity: 1;
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
        opacity: 1;
    }
    100% { 
        transform: scale(0); 
        opacity: 0;
        visibility: hidden;
    }
}

/* 级别指示器 */
.level-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.level-dot {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
}

.level-dot:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.level-dot.active {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
}

.level-dot.completed {
    background-color: #ddd;
    position: relative;
}

.level-dot.completed::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

/* 为每个级别点设置不同的颜色 */
.level-dot:nth-child(1) { background-color: var(--level-1); }
.level-dot:nth-child(2) { background-color: var(--level-2); }
.level-dot:nth-child(3) { background-color: var(--level-3); }
.level-dot:nth-child(4) { background-color: var(--level-4); }
.level-dot:nth-child(5) { background-color: var(--level-5); }
.level-dot:nth-child(6) { background-color: var(--level-6); }
.level-dot:nth-child(7) { background-color: var(--level-7); }
.level-dot:nth-child(8) { background-color: var(--level-8); }
.level-dot:nth-child(9) { background-color: var(--level-9); }
.level-dot:nth-child(10) { background-color: var(--level-10); }

/* 级别提示 */
.level-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-bottom: 5px;
}

.level-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.level-dot:hover .level-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 进度条 */
.progress-container {
    width: 100%;
    height: 10px;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--level-1), var(--level-7));
    width: 0%;
    transition: width 0.3s ease;
}

/* 成就徽章 */
.achievements {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f1f1f1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: #7f8c8d;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.badge.unlocked {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: white;
    animation: unlocked 1s ease;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.achievements-summary .badge {
    width: 50px;
    height: 50px;
    font-size: 24px;
}

@keyframes unlocked {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); box-shadow: 0 0 20px rgba(243, 156, 18, 0.5); }
    100% { transform: scale(1); }
}

/* 消息框 */
.message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.98);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    max-width: 90%;
    width: 500px;
    text-align: center;
    animation: fadeIn 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.message-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#message-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #2c3e50;
}

#message-text {
    font-size: 24px;
    margin-bottom: 25px;
    color: #34495e;
    line-height: 1.5;
}

/* 覆盖层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.overlay-content {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 90%;
    width: 600px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.overlay-content ul {
    text-align: left;
    margin: 0 auto 30px;
    max-width: 500px;
}

.overlay-content li {
    font-size: 22px;
    margin-bottom: 15px;
    list-style-position: inside;
}

/* 工具类 */
.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        font-size: 18px;
        padding: 10px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-board {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .card {
        height: 90px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .game-board {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card {
        height: 80px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 18px;
    }
}

/* 响应式设计增强 */
@media (max-width: 1200px) {
    .game-container {
        flex-direction: column;
    }
    
    .word-library {
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
        max-height: 300px;
    }
}

/* 临时消息样式 */
.temp-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px 35px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    animation: fadeIn 0.3s ease;
    border: 2px solid #4CAF50;
    max-width: 90%;
    width: auto;
    transition: opacity 0.5s ease;
}

.temp-message-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.temp-message h3 {
    color: #4CAF50;
    font-size: 32px;
    margin-bottom: 5px;
    font-weight: 700;
}

.temp-message p {
    margin: 5px 0;
    font-size: 26px;
}

.temp-message .pronunciation {
    color: #666;
    font-style: italic;
    font-size: 20px;
}

.temp-message .definition {
    color: #333;
    font-weight: 600;
    font-size: 22px;
}

.temp-fail-message {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    color: #e74c3c;
    border-radius: 12px;
    padding: 18px 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    animation: fadeIn 0.3s ease;
    border: 2px solid #e74c3c;
    font-size: 24px;
    font-weight: 600;
    transition: opacity 0.5s ease;
}

.fade-out {
    opacity: 0;
}

/* 多巴胺色系 - 更新级别颜色 */
:root {
    --level-1: #FF5252; /* 红色 */
    --level-2: #FF7043; /* 橙红色 */
    --level-3: #FFAB40; /* 橙色 */
    --level-4: #FFD740; /* 琥珀色 */
    --level-5: #FFEB3B; /* 黄色 */
    --level-6: #C0CA33; /* 酸橙色 */
    --level-7: #66BB6A; /* 绿色 */
    --level-8: #26A69A; /* 蓝绿色 */
    --level-9: #42A5F5; /* 蓝色 */
    --level-10: #7E57C2; /* 紫色 */
}

/* 添加一些有趣的动画效果 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}

.badge.unlocked:hover {
    animation: bounce 1s ease;
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .temp-message {
        padding: 15px;
    }
    
    .temp-message h3 {
        font-size: 22px;
    }
    
    .temp-message p {
        font-size: 18px;
    }
}

/* 增强移动端响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
    max-width: 100%;
  }
  
  h1 {
    font-size: 32px;
  }
  
  .subtitle {
    font-size: 18px;
  }
  
  .game-info {
    flex-direction: column;
    gap: 15px;
  }
  
  .score-container, .timer-container, .level-container {
    width: 100%;
    text-align: center;
  }
  
  #level-select {
    width: 100%;
    font-size: 18px;
  }
  
  .game-board {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .card {
    height: 90px;
    font-size: 16px;
  }
  
  .control-panel {
    flex-direction: column;
    gap: 15px;
  }
  
  .btn {
    width: 100%;
    padding: 12px 15px;
    font-size: 18px;
  }
  
  .word-library {
    max-height: 250px;
  }
  
  .overlay-content {
    padding: 20px;
    width: 90%;
  }
  
  .overlay-content h2 {
    font-size: 28px;
  }
  
  .overlay-content li {
    font-size: 16px;
  }
  
  /* 改进触摸体验 */
  .card, .btn, select, input[type="checkbox"] {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  
  /* 增加触摸目标大小 */
  .word-actions button, 
  #collapse-all, 
  #expand-all,
  #message-close,
  #close-help,
  #next-level-btn,
  #replay-level-btn,
  #restart-btn,
  #home-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* 优化字体大小 */
  .word-item {
    font-size: 16px;
  }
  
  /* 优化滚动体验 */
  .word-library {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  
  .game-board {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .card {
    height: 80px;
    font-size: 14px;
  }
  
  .achievements {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .badge {
    width: 70px;
    height: 70px;
  }
  
  /* 优化消息框 */
  .message-box {
    width: 90%;
  }
  
  #message-title {
    font-size: 24px;
  }
  
  #message-text {
    font-size: 16px;
  }
  
  /* 优化临时消息 */
  .temp-message h3 {
    font-size: 20px;
  }
  
  .temp-message p {
    font-size: 16px;
  }
}

/* 添加触摸设备检测和优化 */
@media (hover: none) {
  /* 触摸设备上的悬停效果替代 */
  .card:active {
    transform: scale(0.98);
  }
  
  .btn:active {
    transform: translateY(2px);
  }
}

/* 优化加载性能 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 添加暗黑模式支持 */
@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #2c3e50;
    --background: #1a2530;
    --text-color: #ecf0f1;
    --light-text: #bdc3c7;
  }
  
  .card {
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .message-box, .overlay-content {
    background-color: #2c3e50;
    color: #ecf0f1;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
} 