/* 基础样式继承 */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #F0F0F0;
    color: #333;
    margin: 0;
    padding: 0;
    text-align: center;
}

.app-header {
    background-color: #8A2BE2; /* 紫罗兰色主题 */
    color: white;
    padding: 20px;
}

.app-header h1 {
    font-size: 36px;
    margin: 0;
}

.game-container {
    padding: 20px;
    max-width: 600px; /* 限制宽度，确保卡片尺寸足够大 */
    margin: 0 auto;
}

/* 状态信息 */
.game-status {
    font-size: 24px;
    font-weight: bold;
    padding: 10px 0;
    margin-bottom: 20px;
    color: #4B0082; /* 深紫色 */
}

/* 游戏网格 */
.game-grid {
    display: grid;
    /* 简单的 4x4 布局，确保卡片够大 */
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px;
    margin-bottom: 30px;
}

/* 核心：卡片样式 */
.card {
    background-color: #B0C4DE; /* 初始卡片背面颜色 */
    height: 120px; /* 确保卡片是大的可点击区域 */
    width: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px; /* 卡片内容（Emoji）字体大小 */
    color: white;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    user-select: none; /* 防止选中文字 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* 卡片翻转和配对状态 */
.card.flipped {
    background-color: white; /* 翻面后的卡片颜色 */
    color: #333;
}

.card.matched {
    background-color: #90EE90; /* 配对成功后的卡片颜色 */
    pointer-events: none; /* 配对后禁止点击 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
}

/* 控制按钮 */
.control-panel {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.control-btn {
    padding: 20px 30px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.back-btn {
    background-color: #DDA0DD;
    color: #333;
}

.control-btn:hover {
    opacity: 0.85;
}

/* 胜利弹窗样式 */
.modal-overlay {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* 半透明背景 */
}

.modal-content {
    background-color: #fff;
    margin: 15% auto; /* 居中显示 */
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h2 {
    font-size: 30px;
    color: #007bff;
}

.modal-content p {
    font-size: 20px;
    margin-bottom: 20px;
}