/* 基础样式 - 默认（亮色主题） */
.wpmg-game-container {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    color: #333;
}

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

.wpmg-game-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.wpmg-game-info div {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

.wpmg-game-info span {
    color: #e74c3c;
}

.wpmg-game-controls {
    display: flex;
    gap: 10px;
}

.wpmg-game-board {
    background-color: #fff;
    border-radius: 8px;
    padding: 10px;
    margin: 0 auto 20px;
    max-width: 100%;
    width: fit-content;
}

.wpmg-row {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
}

.wpmg-cell {
    width: 60px;
    height: 60px;
    margin: 5px;
    background-color: #ecf0f1;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.wpmg-cell i {
    font-size: 24px;
    color: #2c3e50;
}

.wpmg-cell.selected {
    background-color: #bdc3c7;
    transform: scale(0.95);
}

.wpmg-cell.matched {
    background-color: #2ecc71;
}

.wpmg-cell.matched i {
    color: white;
}

.wpmg-cell.new-tile {
    animation: fadeIn 0.5s ease;
}

.wpmg-game-footer {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    color: #2c3e50;
}
.wpmg-highscore-form button {
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
/* 按钮样式 */
.wpmg-restart,
.wpmg-sound-toggle,
.wpmg-show-highscores,
.wpmg-modal-close,
.wpmg-submit-score,
.wpmg-next-level,
.wpmg-resume {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.wpmg-restart:hover,
.wpmg-sound-toggle:hover,
.wpmg-show-highscores:hover,
.wpmg-modal-close:hover,
.wpmg-submit-score:hover,
.wpmg-next-level:hover,
.wpmg-resume:hover {
    background-color: #2980b9;
}

.wpmg-sound-toggle.muted {
    background-color: #95a5a6;
}

/* 模态框样式 */
.wpmg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.wpmg-modal {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    width: 500px;
    color: #333;
}

.wpmg-modal-content {
    margin-bottom: 20px;
}

.wpmg-modal-actions {
    text-align: right;
}

.wpmg-game-result {
    text-align: center;
}

.wpmg-game-result h2 {
    color: #2c3e50;
    margin-top: 0;
}

.wpmg-final-score {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0;
    color: #e74c3c;
}

.wpmg-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.wpmg-highscore-form {
    margin: 20px 0;
}

.wpmg-highscore-form input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    width: 200px;
    color: #333;
}

/* 高分榜样式 */
.wpmg-highscores {
    max-width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #333;
}

.wpmg-highscores h3 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
}

.wpmg-highscores table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.wpmg-highscores th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

.wpmg-highscores td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
}

.wpmg-highscores tr:nth-child(even) {
    background-color: #f8f9fa;
}

.wpmg-highscores tr:hover {
    background-color: #e9ecef;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pointsFade {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-30px); }
}

.wpmg-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1001;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; top: 0; }
    10% { opacity: 1; top: 20px; }
    90% { opacity: 1; top: 20px; }
    100% { opacity: 0; top: 0; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wpmg-game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .wpmg-game-info {
        justify-content: center;
    }
    
    .wpmg-game-controls {
        justify-content: center;
    }
    
    .wpmg-cell {
        width: 50px;
        height: 50px;
        margin: 4px;
    }
    
    .wpmg-cell i {
        font-size: 20px;
    }
    
    .wpmg-modal {
        width: 90%;
        padding: 15px;
    }
    
    .wpmg-highscore-form input {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .wpmg-cell {
        width: 40px;
        height: 40px;
        margin: 3px;
    }
    
    .wpmg-cell i {
        font-size: 16px;
    }
    
    .wpmg-game-info div {
        font-size: 14px;
    }
    
    .wpmg-highscores th, 
    .wpmg-highscores td {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* 黑暗主题适配 */
@media (prefers-color-scheme: dark) {
    .wpmg-game-container {
        background-color: #1a1a1a;
        color: #ffffff;
    }

    .wpmg-game-info div {
        color: #ffffff;
    }

    .wpmg-game-info span {
        color: #ff6b6b;
    }

    .wpmg-game-board {
        background-color: #2d2d2d;
    }

    .wpmg-cell {
        background-color: #3d3d3d;
    }

    .wpmg-cell i {
        color: #ffffff;
    }

    .wpmg-cell.selected {
        background-color: #5a5a5a;
    }

    .wpmg-cell.matched {
        background-color: #2ecc71;
    }

    .wpmg-modal {
        background-color: #2d2d2d;
        color: #ffffff;
    }

    .wpmg-game-result h2 {
        color: #ffffff;
    }

    .wpmg-highscores {
        background-color: #2d2d2d;
        color: #ffffff;
    }

    .wpmg-highscores th {
        background-color: #3d3d3d;
        color: #ffffff;
    }

    .wpmg-highscores td {
        color: #e0e0e0;
    }

    .wpmg-highscores tr:nth-child(even) {
        background-color: #3d3d3d;
    }

    .wpmg-highscores tr:hover {
        background-color: #4d4d4d;
    }

    .wpmg-highscore-form input {
        background-color: #3d3d3d;
        color: #ffffff;
        border: 1px solid #5a5a5a;
    }
}
/* 分数提交区域 */
.wpmg-score-submission {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.wpmg-score-submission h3 {
    margin-top: 0;
    color: #2c3e50;
}

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

.wpmg-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.wpmg-player-name {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.button-primary {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.button-primary:hover {
    background-color: #2980b9;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .wpmg-score-submission {
        padding: 15px;
    }
    
    .wpmg-player-name {
        max-width: 100%;
    }
}
.wpmg-login-prompt {
    background-color: #f8f9fa;
    border-left: 4px solid #4CAF50;
    padding: 12px;
    margin: 15px 0;
    border-radius: 4px;
}

.wpmg-login-button {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 8px;
    transition: background-color 0.3s;
}

.wpmg-login-button:hover {
    background-color: #3e8e41;
}
/* 添加登录提示样式 */
.wpmg-login-notice {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

/* 用户分数高亮 */
.wpmg-highscores tr.current-user {
    background-color: #e7f5fe !important;
    font-weight: bold;
}

/* 高分榜表格样式 */
.wpmg-highscores table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.wpmg-highscores th {
    background-color: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

.wpmg-highscores td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
}

.wpmg-highscores tr:nth-child(even) {
    background-color: #f8f9fa;
}

.wpmg-highscores tr:hover {
    background-color: #e9ecef;
}

/* 当前用户高亮 */
.wpmg-highscores tr.current-user {
    background-color: #e7f5fe !important;
    font-weight: bold;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .wpmg-highscores table {
        font-size: 12px;
    }
    
    .wpmg-highscores th, 
    .wpmg-highscores td {
        padding: 8px 10px;
    }
}