* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Arial', sans-serif; background-color: #1a532a; color: white; min-height: 100vh; display: flex; justify-content: center; align-items: center; } .game-container { width: 90vw; max-width: 1200px; min-height: 90vh; background-color: rgba(0, 0, 0, 0.3); border-radius: 20px; padding: 20px; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); } .game-header { text-align: center; margin-bottom: 20px; } .game-header h1 { font-size: 2.5em; color: #ffd700; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); } .game-info { display: flex; justify-content: center; gap: 20px; font-size: 1.2em; } .game-table { position: relative; width: 100%; min-height: 500px; background-color: rgba(255, 255, 255, 0.1); border-radius: 15px; padding: 20px; display: flex; flex-direction: column; gap: 20px; } /* 地主牌区域 */ .landlord-cards { text-align: center; margin-bottom: 20px; } #landlord-indicator { font-size: 1.2em; margin-bottom: 10px; color: #ffd700; } #landlord-cards-area { display: flex; justify-content: center; gap: 5px; } /* 玩家区域 */ .player { width: 100%; text-align: center; } .player-info { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 10px; font-size: 1.1em; } .player-name { font-weight: bold; } .cards-count { background-color: rgba(255, 255, 255, 0.2); padding: 5px 10px; border-radius: 10px; } .player-role { color: #ff6b6b; font-weight: bold; } .player-cards { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; } .last-play { display: flex; justify-content: center; gap: 5px; margin-top: 10px; opacity: 0.7; } /* 自己的玩家区域 */ .player-self { margin-top: 30px; } .player-self .player-cards { gap: 2px; } /* 卡片样式 */ .card { width: 80px; height: 120px; background-color: white; border-radius: 8px; display: flex; flex-direction: column; justify-content: space-between; padding: 5px; color: black; font-weight: bold; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); cursor: pointer; transition: all 0.2s ease; position: relative; border: 2px solid transparent; } .card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); } .card.selected { border-color: #ffd700; background-color: #fff9c4; } .card-back { background-color: #424242; background-image: radial-gradient(circle, #666 20%, transparent 20%), radial-gradient(circle, #666 20%, transparent 20%); background-size: 10px 10px; background-position: 0 0, 5px 5px; color: transparent; } .card .rank-top { font-size: 1.5em; align-self: flex-start; } .card .suit-middle { font-size: 2em; align-self: center; margin: 10px 0; } .card .rank-bottom { font-size: 1.5em; align-self: flex-end; transform: rotate(180deg); } /* 花色颜色 */ .card.spades, .card.clubs { color: black; } .card.hearts, .card.diamonds { color: red; } /* 大王小王 */ .card.joker-big .suit-middle, .card.joker-small .suit-middle { color: black; font-size: 1.5em; } /* 当前出牌区域 */ .current-play-area { text-align: center; margin: 20px 0; } #current-play-info { font-size: 1.2em; margin-bottom: 10px; color: #ffd700; } #current-play-cards { display: flex; justify-content: center; gap: 5px; } /* 游戏控制按钮 */ .game-controls { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 20px; flex-wrap: wrap; } button { padding: 12px 24px; font-size: 1.1em; background-color: #4CAF50; color: white; border: none; border-radius: 8px; cursor: pointer; transition: background-color 0.3s ease; font-weight: bold; } button:hover { background-color: #45a049; } button:active { transform: translateY(1px); } button:disabled { background-color: #cccccc; cursor: not-allowed; transform: none; } /* 叫地主按钮区域 */ .landlord-buttons { display: flex; gap: 15px; } #call-landlord { background-color: #ff9800; } #call-landlord:hover { background-color: #f57c00; } #no-call { background-color: #f44336; } #no-call:hover { background-color: #da190b; } /* 出牌按钮区域 */ .play-buttons { display: flex; gap: 15px; } #play-cards { background-color: #2196F3; } #play-cards:hover { background-color: #0b7dda; } #pass { background-color: #9e9e9e; } #pass:hover { background-color: #757575; } /* 游戏统计 */ .game-stats { margin-left: 30px; font-size: 1.2em; color: #ffd700; } /* 响应式设计 */ @media (max-width: 768px) { .game-container { width: 98vw; padding: 10px; } .game-header h1 { font-size: 2em; } .card { width: 60px; height: 90px; font-size: 0.9em; } .player-info { font-size: 1em; gap: 10px; } .game-controls { gap: 10px; } button { padding: 10px 20px; font-size: 1em; } } @media (max-width: 480px) { .card { width: 50px; height: 75px; font-size: 0.8em; } .game-info { flex-direction: column; gap: 5px; } .game-controls { flex-direction: column; } }