* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-overflow-scrolling: touch;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #3498db;
}

/* 移动端导航菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: #2c3e50;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu a {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.main-content {
    padding: 3rem 0;
}

.main-content .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.blog-card-content p {
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    color: #2980b9;
}

.sidebar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar a:hover {
    color: #3498db;
}

.footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    text-align: center;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer a.icp {
    color: #bdc3c7;
}

.footer a.icp:visited {
    color: #bdc3c7 !important;
}

/* 新版小麻麻样式 - 业界标准设计 */

/* 麻将头部 */
.mahjong-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.mahjong-header h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-status-bar {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.95rem;
    color: #555;
}

.game-status-bar span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* 麻将桌布局 - 业界标准 */
.mahjong-table-v2 {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 
        inset 0 0 50px rgba(0,0,0,0.3),
        0 10px 40px rgba(0,0,0,0.3);
    min-height: 500px;
    position: relative;
}

/* 玩家区域 */
.player-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-area.top {
    flex-direction: column;
    justify-content: flex-start;
}

.player-area.bottom {
    flex-direction: column-reverse;
    justify-content: flex-end;
}

.player-area.left {
    flex-direction: row;
    justify-content: flex-start;
}

.player-area.right {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* 玩家信息 */
.player-info-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    background: rgba(255,255,255,0.95);
    padding: 0.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-width: 60px;
}

.player-area.top .player-info-v2,
.player-area.bottom .player-info-v2 {
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
}

.avatar {
    font-size: 1.5rem;
}

.name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

.wind {
    font-size: 0.75rem;
    color: #e74c3c;
    font-weight: bold;
    background: #ffeaa7;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* 手牌区域 */
.hand-area {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* 牌背 */
.hand-back {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    max-width: 200px;
}

.hand-back .tile-back {
    width: 24px;
    height: 34px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 4px;
    border: 1px solid #654321;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    position: relative;
}

.hand-back .tile-back::after {
    content: '🀫';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    opacity: 0.5;
}

/* 中间游戏区域 */
.table-center {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

/* 中央牌桌 */
.center-table {
    position: relative;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* 牌墙 */
.wall-area {
    position: absolute;
    top: 10px;
    right: 10px;
}

.tile-wall {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tile-wall-row {
    display: flex;
    gap: 1px;
}

.tile-wall-piece {
    width: 12px;
    height: 18px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 2px;
    border: 1px solid #654321;
}

/* 弃牌区 */
.discard-area {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-width: 280px;
    max-height: 120px;
    overflow-y: auto;
    padding: 0.5rem;
}

.last-discard {
    position: absolute;
    bottom: 10px;
    font-size: 0.9rem;
    color: #ffd700;
    background: rgba(0,0,0,0.5);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

/* 游戏消息 */
.game-message-v2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10;
    display: none;
}

.game-message-v2.show {
    display: block;
    animation: messagePop 0.3s ease;
}

@keyframes messagePop {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* 倒计时 */
.countdown {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.countdown.warning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 吃碰杠区域 */
.meld-area {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 40px;
}

.meld-group {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.1);
    padding: 0.3rem;
    border-radius: 5px;
}

/* 玩家手牌 */
.player-hand-v2 {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

/* 麻将牌样式优化 */
.mahjong-card-v2 {
    width: 42px;
    height: 58px;
    background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mahjong-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 5px 15px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

/* 移动端触摸反馈 */
.mahjong-card-v2:active {
    transform: translateY(-2px) scale(0.95);
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.mahjong-card-v2.selected {
    transform: translateY(-10px);
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.4),
        0 0 0 3px #3498db,
        inset 0 1px 0 rgba(255,255,255,0.8);
}

.mahjong-card-v2.just-played {
    animation: playCard 0.3s ease;
}

@keyframes playCard {
    0% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.mahjong-card-v2 .suit {
    font-size: 0.75rem;
    font-weight: bold;
}

.mahjong-card-v2 .value {
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1;
}

/* 花色颜色 */
.mahjong-card-v2.wan { border-color: #e74c3c; }
.mahjong-card-v2.wan .suit { color: #e74c3c; }
.mahjong-card-v2.wan .value { color: #c0392b; }

.mahjong-card-v2.tong { border-color: #3498db; }
.mahjong-card-v2.tong .suit { color: #3498db; }
.mahjong-card-v2.tong .value { color: #2980b9; }

.mahjong-card-v2.tiao { border-color: #27ae60; }
.mahjong-card-v2.tiao .suit { color: #27ae60; }
.mahjong-card-v2.tiao .value { color: #1e8449; }

.mahjong-card-v2.wind { border-color: #f39c12; }
.mahjong-card-v2.wind .suit { color: #f39c12; }
.mahjong-card-v2.wind .value { color: #d68910; }

.mahjong-card-v2.dragon { border-color: #9b59b6; }
.mahjong-card-v2.dragon .suit { color: #9b59b6; }
.mahjong-card-v2.dragon .value { color: #8e44ad; }

/* 弃牌区的牌 */
.discard-area .mahjong-card-v2 {
    width: 32px;
    height: 44px;
    font-size: 0.8rem;
}

.discard-area .mahjong-card-v2 .value {
    font-size: 1rem;
}

.discard-area .mahjong-card-v2 .suit {
    font-size: 0.6rem;
}

/* 操作面板 */
.action-panel {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

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

.action-btn:not(:disabled):active {
    transform: translateY(-1px);
}

.action-btn .btn-icon {
    font-size: 1.5rem;
}

.action-btn .btn-text {
    font-size: 0.9rem;
}

/* 操作按钮颜色 */
.action-btn.chi {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.action-btn.peng {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: white;
}

.action-btn.gang {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
}

.action-btn.hu {
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
    color: white;
    animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 118, 117, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 118, 117, 0.8), 0 0 30px rgba(255, 118, 117, 0.5); }
}

.action-btn.pass {
    background: linear-gradient(135deg, #b2bec3 0%, #636e72 100%);
    color: white;
}

/* 游戏规则 */
.mahjong-instructions-v2 {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.mahjong-instructions-v2 h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.2rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rule-icon {
    font-size: 1.5rem;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* 当前玩家高亮 */
.player-area.active .player-info-v2 {
    box-shadow: 0 0 0 3px #ffd700, 0 2px 8px rgba(0,0,0,0.2);
    animation: activePlayer 2s ease-in-out infinite;
}

@keyframes activePlayer {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 胡牌特效 */
.hu-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    pointer-events: none;
}

.hu-text {
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 
        0 0 10px #ff6b6b,
        0 0 20px #ff6b6b,
        0 0 30px #ff6b6b;
    animation: huAnimation 2s ease-out forwards;
}

@keyframes huAnimation {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    30% {
        transform: scale(1.2) rotate(10deg);
        opacity: 1;
    }
    50% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg) translateY(-50px);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mahjong-table-v2 {
        min-height: 400px;
        padding: 0.5rem;
    }
    
    .mahjong-card-v2 {
        width: 36px;
        height: 50px;
    }
    
    .mahjong-card-v2 .value {
        font-size: 1.1rem;
    }
    
    .discard-area .mahjong-card-v2 {
        width: 28px;
        height: 38px;
    }
    
    .hand-back .tile-back {
        width: 18px;
        height: 26px;
    }
    
    .action-btn {
        padding: 0.6rem 1rem;
        min-width: 60px;
    }
    
    .action-btn .btn-icon {
        font-size: 1.2rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.8rem;
    }
    
    .player-info-v2 {
        min-width: 50px;
        padding: 0.3rem;
    }
    
    .avatar {
        font-size: 1.2rem;
    }
    
    .name {
        font-size: 0.7rem;
    }
    
    .game-status-bar {
        gap: 0.5rem;
    }
    
    .game-status-bar span {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .mahjong-card-v2 {
        width: 28px;
        height: 38px;
    }
    
    .mahjong-card-v2 .value {
        font-size: 0.9rem;
    }
    
    .mahjong-card-v2 .suit {
        font-size: 0.6rem;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .mahjong-table-v2 {
        min-height: 350px;
        padding: 0.3rem;
        gap: 0.3rem;
    }
    
    .player-hand-v2 {
        gap: 0.2rem;
    }
    
    .hand-back .tile-back {
        width: 14px;
        height: 20px;
    }
    
    .action-panel {
        gap: 0.3rem;
    }
    
    .action-btn {
        padding: 0.4rem 0.6rem;
        min-width: 50px;
    }
    
    .action-btn .btn-icon {
        font-size: 1rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.7rem;
    }
    
    .game-status-bar {
        flex-wrap: wrap;
        gap: 0.3rem;
        font-size: 0.8rem;
    }
    
    .game-status-bar span {
        padding: 0.2rem 0.4rem;
    }
}

/* 俄罗斯方块样式 */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 480px) {
    .game-container {
        padding: 1rem;
        gap: 1rem;
    }
}

@media (max-width: 360px) {
    .game-container {
        padding: 0.5rem;
        gap: 0.8rem;
    }
}

.board-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#tetris-board {
    width: 300px;
    height: 600px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(20, 1fr);
    gap: 1px;
    background-color: #1a1a2e;
    border: 3px solid #4a4a6a;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    touch-action: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.tetris-cell {
    background-color: #2a2a4a;
    border-radius: 2px;
    transition: background-color 0.1s ease;
}

.tetris-cell.I {
    background-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.tetris-cell.J {
    background-color: #0000ff;
    box-shadow: 0 0 10px rgba(0, 0, 255, 0.5);
}

.tetris-cell.L {
    background-color: #ff7f00;
    box-shadow: 0 0 10px rgba(255, 127, 0, 0.5);
}

.tetris-cell.O {
    background-color: #ffff00;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

.tetris-cell.S {
    background-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.tetris-cell.T {
    background-color: #800080;
    box-shadow: 0 0 10px rgba(128, 0, 128, 0.5);
}

.tetris-cell.Z {
    background-color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.game-status {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

@media (max-width: 480px) {
    .game-status {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
    }
}

@media (max-width: 360px) {
    .game-status {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    gap: 2rem;
}

.tetris-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.game-controls-top {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.game-controls-top button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.game-controls-top button:hover {
    background-color: #2980b9;
}

.tetris-controls button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.tetris-score {
    font-weight: 500;
    color: #2c3e50;
}

.game-instructions {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 600px;
}

.game-instructions h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.game-instructions ul {
    list-style: disc;
    padding-left: 2rem;
}

.game-instructions li {
    margin-bottom: 0.5rem;
    color: #555;
}

@media (max-width: 768px) {
    .game-instructions {
        margin-top: 1.5rem;
    }
    
    #tetris-board {
        width: 280px;
        height: 560px;
    }
}

@media (max-width: 480px) {
    #tetris-board {
        width: 240px;
        height: 480px;
        gap: 1px;
        padding: 3px;
        border-width: 2px;
    }
    
    .tetris-cell {
        border-radius: 1px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .tetris-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tetris-controls button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .game-instructions {
        padding: 1rem;
        margin: 1rem;
    }
    
    .game-instructions h4 {
        font-size: 1rem;
    }
    
    .game-instructions li {
        font-size: 0.85rem;
    }
    
    .mobile-controls {
        margin-top: 1rem;
        padding: 0.8rem;
    }
    
    .control-btn {
        width: 65px;
        height: 42px;
        font-size: 0.75rem;
        border-radius: 20px;
    }
    
    .control-row {
        gap: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .tab-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    #tetris-board {
        width: 200px;
        height: 400px;
        gap: 1px;
        padding: 2px;
    }
    
    .tetris-cell {
        border-radius: 1px;
    }
    
    .game-info {
        gap: 0.8rem;
    }
    
    .tetris-controls button {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .game-instructions {
        padding: 0.8rem;
        margin: 0.5rem;
    }
    
    .game-instructions li {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .mobile-controls {
        padding: 0.5rem;
        margin-top: 0.8rem;
    }
    
    .control-btn {
        width: 55px;
        height: 38px;
        font-size: 0.65rem;
        border-radius: 18px;
    }
    
    .control-row {
        gap: 0.6rem;
        margin-bottom: 0.6rem;
    }
    
    /* 麻将小屏幕适配 */
    .mahjong-card-v2 {
        width: 24px;
        height: 32px;
    }
    
    .mahjong-card-v2 .value {
        font-size: 0.8rem;
    }
    
    .mahjong-card-v2 .suit {
        font-size: 0.5rem;
    }
    
    .mahjong-table-v2 {
        min-height: 300px;
        padding: 0.2rem;
    }
    
    .player-info-v2 {
        min-width: 40px;
        padding: 0.2rem;
    }
    
    .player-info-v2 .avatar {
        font-size: 1rem;
    }
    
    .player-info-v2 .name {
        font-size: 0.6rem;
    }
    
    .player-info-v2 .wind {
        font-size: 0.6rem;
    }
    
    .action-btn {
        padding: 0.3rem 0.5rem;
        min-width: 45px;
    }
    
    .action-btn .btn-icon {
        font-size: 0.9rem;
    }
    
    .action-btn .btn-text {
        font-size: 0.6rem;
    }
    
    /* 防止页面滚动 */
    body {
        overflow-x: hidden;
    }
    
    .game-card {
        padding: 0.5rem;
    }
    
    .mahjong-header h3 {
        font-size: 1rem;
    }
}

/* 游戏中心样式 */
.games-section {
    margin-bottom: 3rem;
}

.games-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

.game-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    background-color: #f8f9fa;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tab-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 全屏按钮 */
.fullscreen-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.fullscreen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.5);
}

.fullscreen-btn:active {
    transform: translateY(0);
}

/* 游戏场景容器 */
.game-scene {
    position: relative;
}

/* 全屏模式样式 - 只针对游戏场景 */
.game-scene:fullscreen {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-scene:fullscreen .board-container,
.game-scene:fullscreen .mahjong-table-v2,
.game-scene:-webkit-full-screen .board-container,
.game-scene:-webkit-full-screen .mahjong-table-v2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.game-scene:fullscreen #tetris-board,
.game-scene:-webkit-full-screen #tetris-board {
    width: min(90vw, 350px);
    height: min(70vh, 700px);
}

.game-scene:fullscreen .mahjong-table-v2,
.game-scene:-webkit-full-screen .mahjong-table-v2 {
    width: 100%;
    height: 100%;
    min-height: auto;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.5rem;
}

.game-scene:fullscreen .mahjong-table-v2 .player-area,
.game-scene:-webkit-full-screen .mahjong-table-v2 .player-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.game-scene:fullscreen .mahjong-table-v2 .table-center,
.game-scene:-webkit-full-screen .mahjong-table-v2 .table-center {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    gap: 1.5rem;
    align-items: center;
}

.game-scene:fullscreen .mahjong-table-v2 .player-area.left,
.game-scene:fullscreen .mahjong-table-v2 .player-area.right,
.game-scene:-webkit-full-screen .mahjong-table-v2 .player-area.left,
.game-scene:-webkit-full-screen .mahjong-table-v2 .player-area.right {
    flex-direction: column;
    min-width: 100px;
}

.game-scene:fullscreen .mahjong-table-v2 .center-table,
.game-scene:-webkit-full-screen .mahjong-table-v2 .center-table {
    min-width: 200px;
}

/* 全屏控制按钮 - 默认隐藏 */
.fullscreen-controls {
    display: none;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1001;
    gap: 0.5rem;
}

.fs-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.fs-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.fs-btn:active {
    transform: scale(0.95);
}

/* 全屏时显示控制按钮 */
.game-scene:fullscreen .fullscreen-controls {
    display: flex;
}

.game-scene:-webkit-full-screen .fullscreen-controls {
    display: flex;
}

.game-scene:-moz-full-screen .fullscreen-controls {
    display: flex;
}

.game-scene:-ms-fullscreen .fullscreen-controls {
    display: flex;
}

/* 移动端全屏优化 */
@media (max-width: 768px) {
    .game-scene:fullscreen,
    .game-scene:-webkit-full-screen {
        padding: 0.5rem;
        padding-bottom: 120px;
        padding-top: 60px;
    }
    
    .game-scene:fullscreen #tetris-board,
    .game-scene:-webkit-full-screen #tetris-board {
        width: min(95vw, 300px);
        height: min(55vh, 450px);
    }
    
    .game-scene:fullscreen .mahjong-table-v2,
    .game-scene:-webkit-full-screen .mahjong-table-v2 {
        min-height: 75vh;
        width: 100%;
    }
    
    .game-scene:fullscreen .mahjong-card-v2,
    .game-scene:-webkit-full-screen .mahjong-card-v2 {
        width: 28px;
        height: 38px;
    }
    
    .game-scene:fullscreen .mahjong-table-v2 .table-center,
    .game-scene:-webkit-full-screen .mahjong-table-v2 .table-center {
        grid-template-columns: 80px 1fr 80px;
        gap: 0.8rem;
    }
    
    .game-scene:fullscreen .mahjong-table-v2 .player-area.left,
    .game-scene:fullscreen .mahjong-table-v2 .player-area.right,
    .game-scene:-webkit-full-screen .mahjong-table-v2 .player-area.left,
    .game-scene:-webkit-full-screen .mahjong-table-v2 .player-area.right {
        min-width: 70px;
    }
    
    .fs-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .fullscreen-controls {
        top: 0.3rem;
        left: 0.3rem;
    }
}

/* 俄罗斯方块全屏模式 - 显示虚拟按钮 */
.game-scene:fullscreen .mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: block;
    z-index: 1000;
}

.game-scene:fullscreen .control-btn {
    width: 65px;
    height: 50px;
    font-size: 0.85rem;
    border-radius: 25px;
}

.game-scene:fullscreen .control-row {
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

/* 非全屏时虚拟按钮样式 */
.game-scene .mobile-controls {
    margin-top: 1.5rem;
    position: relative;
    z-index: 10;
}

.game-scene .control-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.game-scene .control-btn {
    width: 70px;
    height: 50px;
    border-radius: 25px;
    border: 2px solid #3498db;
    background-color: white;
    color: #3498db;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.game-scene .control-btn:hover {
    background-color: #3498db;
    color: white;
    transform: scale(1.05);
}

.game-scene .control-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    background-color: #3498db;
    color: white;
}

.game-tab {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.game-tab.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.game-card {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.game-card h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .game-card {
        padding: 1.5rem;
    }
    
    .tab-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* 博客文章样式 */
.post-content {
    padding: 3rem 0;
}

.blog-post {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 1rem;
}

.post-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.post-meta {
    display: flex;
    gap: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 2rem 0 1rem;
}

.post-body h3 {
    font-size: 1.3rem;
    color: #34495e;
    margin: 1.5rem 0 1rem;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-body code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.post-body strong {
    color: #2c3e50;
}

.post-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.back-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: #2980b9;
}

@media (max-width: 768px) {
    .blog-post {
        padding: 1.5rem;
    }

    .post-header h1 {
        font-size: 1.5rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-body {
        font-size: 1rem;
    }
}

/* 联系页面样式 */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.contact-section h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* 游戏区域移动端优化 */
@media (max-width: 768px) {
    .contact-section {
        padding: 2rem 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
    
    .games-section {
        padding: 1rem 0.5rem;
    }
    
    .games-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .game-tabs {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .tab-btn, .fullscreen-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .game-card {
        padding: 1rem;
    }
    
    .game-card h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    /* 俄罗斯方块移动端优化 */
    #tetris-board {
        width: 260px;
        height: 520px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .tetris-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .tetris-controls button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .mobile-controls {
        margin-top: 1rem;
        padding: 0.8rem;
    }
    
    .control-btn {
        width: 70px;
        height: 45px;
        font-size: 0.8rem;
    }
    
    /* 麻将移动端优化 */
    .mahjong-table-v2 {
        min-height: 400px;
        padding: 0.5rem;
    }
    
    .mahjong-card-v2 {
        width: 32px;
        height: 44px;
    }
    
    .mahjong-card-v2 .value {
        font-size: 0.9rem;
    }
    
    .action-panel {
        gap: 0.5rem;
    }
    
    .action-btn {
        padding: 0.5rem 0.8rem;
        min-width: 60px;
    }
    
    .game-status-bar {
        flex-wrap: wrap;
        gap: 0.3rem;
        font-size: 0.8rem;
    }
}

/* 防止iOS双击缩放 */
@media (pointer: coarse) {
    button, .tab-btn, .fullscreen-btn, .control-btn, .action-btn {
        touch-action: manipulation;
    }
}

