/* ========== 网络对战样式 ========== */

/* 连接状态指示器 */
.connection-status {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 1000;
    transition: opacity 0.3s;
}

.connection-status.connected {
    background: #4caf50;
    color: white;
}

.connection-status.connecting {
    background: #ff9800;
    color: white;
}

.connection-status.disconnected {
    background: #f44336;
    color: white;
}

/* 对手信息 */
.opponent-info {
    text-align: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #666;
}

/* 等待对手遮罩层 */
.waiting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 100;
    border-radius: 6px;
}

.waiting-overlay .room-id {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 5px;
    margin: 15px 0;
}

.waiting-overlay .copy-btn {
    padding: 8px 20px;
    background: #2b5797;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.waiting-overlay .copy-btn:hover {
    background: #1e3f6f;
}

/* 回合指示器 */
.turn-indicator {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 5px;
    text-align: center;
}

.turn-indicator.my-turn {
    background: #4caf50;
    color: white;
}

.turn-indicator.opponent-turn {
    background: #ff9800;
    color: white;
}

/* 临时消息 */
.temp-message {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #f44336;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    animation: fadeInOut 3s ease;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* 单机模式隐藏网络元素 */
.mode-local .connection-status,
.mode-local .waiting-overlay,
.mode-local .opponent-info,
.mode-local .turn-indicator {
    display: none !important;
}
