/* lab2-13.css - 极限与连续大师挑战样式 */

body {
    font-family: 'Noto Serif SC', system-ui, serif;
    background: #ffffff;
    color: #1e293b;
    overflow: hidden;
    user-select: none;
}

/* Game Grid */
.game-grid {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Tiles */
.tile {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 80px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tile:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.tile.selected {
    background: #eef2ff;
    border-color: #6366f1;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    transform: scale(1.02);
}

.tile.matched {
    animation: dissolve 0.6s ease-out forwards;
    pointer-events: none;
}

.tile.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    background: #fef2f2;
    border-color: #f87171;
}

/* MathJax styling within tiles */
mjx-container {
    font-size: 1.1em !important;
    color: #1e293b;
}

/* Tile content wrapper */
.tile-content {
    width: 100%;
    text-align: center;
    pointer-events: none;
    padding: 0.5rem;
}

/* Animations */
@keyframes dissolve {
    0% { opacity: 1; transform: scale(1); filter: brightness(1.2); }
    100% { opacity: 0; transform: scale(0.5); filter: blur(10px); }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Glass Panel - 白色主题 */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Overlays */
.overlay {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overlay.active .modal {
    transform: scale(1);
}

/* Scrollbar hiding */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 返回首页面板 */
.return-home-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.return-home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.return-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* Header 样式调整 */
.header-panel {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 统计数字颜色 */
.stat-indigo { color: #6366f1; }
.stat-emerald { color: #10b981; }
.stat-amber { color: #f59e0b; }

