/* 银河牌局 - 样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a1a 100%);
    min-height: 100vh;
    color: #fff;
}

/* 星空背景 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* 游戏容器 */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* 头部信息 */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-size: 2.5em;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.game-subtitle {
    color: #888;
    font-size: 1em;
}

/* 玩家区域 */
.players-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.player-box {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s;
}

.player-box.active {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.player-box.ai {
    background: rgba(255, 0, 100, 0.05);
}

.player-name {
    font-size: 1.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-name .badge {
    background: #ff00ff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
}

.player-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-icon {
    font-size: 1.2em;
}

.stat-value {
    color: #00ffff;
    font-weight: bold;
}

/* 文明等级条 */
.civ-level-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 15px;
}

.civ-level-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000);
    border-radius: 10px;
    transition: width 0.5s;
}

.civ-level-text {
    text-align: center;
    font-size: 0.8em;
    margin-top: 5px;
    color: #aaa;
}

/* 暴露状态 */
.exposed-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    margin-bottom: 10px;
}

.exposed-status.safe {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
}

.exposed-status.danger {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
}

/* 手牌区域 */
.hand-area {
    margin-top: 15px;
}

.hand-label {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 10px;
}

.hand-cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 100px;
}

/* 卡牌样式 */
.card {
    width: 80px;
    height: 120px;
    border-radius: 10px;
    background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
    border: 2px solid #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.card.selected {
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: translateY(-15px);
}

.card.hidden-card {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border-color: #555;
}

.card.hidden-card .card-icon {
    font-size: 2em;
}

/* 卡牌花色颜色 */
.card-spade { border-color: #4a90d9; }
.card-heart { border-color: #ff4a6a; }
.card-diamond { border-color: #ffaa00; }
.card-club { border-color: #00aa88; }

.card-icon {
    font-size: 2.5em;
}

.card-name {
    font-size: 0.7em;
    text-align: center;
    margin-top: 5px;
    padding: 0 5px;
}

.card-rank {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.8em;
    font-weight: bold;
}

.card-suit {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8em;
}

/* 行动面板 */
.action-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.action-title {
    font-size: 1em;
    margin-bottom: 15px;
    color: #00ffff;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn.draw {
    background: linear-gradient(135deg, #00aa88, #008866);
    color: #fff;
}

.action-btn.upgrade {
    background: linear-gradient(135deg, #4a90d9, #3a70b9);
    color: #fff;
}

.action-btn.attack {
    background: linear-gradient(135deg, #ff4a6a, #cc3a5a);
    color: #fff;
}

.action-btn.hide {
    background: linear-gradient(135deg, #666, #444);
    color: #fff;
}

.action-btn.end-turn {
    background: linear-gradient(135deg, #ffaa00, #dd8800);
    color: #000;
}

.action-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 日志区域 */
.log-area {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.log-title {
    font-size: 0.9em;
    margin-bottom: 10px;
    color: #888;
}

.log-entry {
    font-size: 0.85em;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-entry .time {
    color: #666;
    margin-right: 10px;
}

.log-entry.player {
    color: #00ffff;
}

.log-entry.ai {
    color: #ff00ff;
}

.log-entry.system {
    color: #ffaa00;
}

/* 胜利弹窗 */
.victory-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.victory-content {
    background: linear-gradient(135deg, #1a1a3a, #2a2a4a);
    border: 3px solid #00ffff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    animation: popIn 0.5s;
}

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.victory-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.victory-title {
    font-size: 2em;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.victory-message {
    color: #888;
    margin-bottom: 20px;
}

/* 回合提示 */
.turn-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 255, 255, 0.9);
    color: #000;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 1.5em;
    font-weight: bold;
    z-index: 50;
    animation: slideIn 0.5s, fadeOut 0.5s 1.5s forwards;
}

@keyframes slideIn {
    from { transform: translate(-50%, -200%); }
    to { transform: translate(-50%, -50%); }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* 智能提示 */
.smart-tip {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 140, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    color: #ffd700;
    font-size: 14px;
    text-align: center;
    animation: tipGlow 2s infinite;
}

@keyframes tipGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
}

/* 响应式 */
@media (max-width: 768px) {
    .players-area {
        grid-template-columns: 1fr;
    }
    
    .card {
        width: 60px;
        height: 90px;
    }
    
    .card-icon {
        font-size: 1.8em;
    }
    
    .action-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }
}
