/* =========================================
 * 游戏远程控制系统 - 样式文件
 * ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 标题 */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.header p {
    color: #8892b0;
    font-size: 0.9rem;
}

/* 状态指示器 */
.status-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s infinite;
}

.status-dot.pending {
    background: #fbbf24;
}

.status-dot.idle {
    background: #6b7280;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 按钮容器 */
.button-group {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

/* 命令按钮 */
.cmd-btn {
    flex: 1;
    padding: 25px 20px;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cmd-btn.surrender {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.cmd-btn.match {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.cmd-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cmd-btn:active:not(:disabled) {
    transform: translateY(0);
}

.cmd-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cmd-btn .icon {
    font-size: 2rem;
}

.cmd-btn .sub-text {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 统计卡片 */
.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stats-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

.stats-card h3 {
    font-size: 0.9rem;
    color: #8892b0;
    margin-bottom: 10px;
    text-align: center;
}

.stats-card.surrender {
    border-left: 4px solid #e74c3c;
}

.stats-card.match {
    border-left: 4px solid #3498db;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.stat-label {
    color: #8892b0;
}

.stat-value {
    font-weight: 600;
}

.stat-value.total {
    color: #fff;
}

.stat-value.success {
    color: #4ade80;
}

.stat-value.pending {
    color: #fbbf24;
}

/* 日志区域 */
.log-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.log-title {
    font-size: 0.9rem;
    color: #8892b0;
    margin-bottom: 10px;
}

.log-entry {
    font-size: 0.85rem;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
}

.log-time {
    color: #6b7280;
    flex-shrink: 0;
}

.log-message {
    color: #d1d5db;
}

.log-message.success {
    color: #4ade80;
}

.log-message.error {
    color: #f87171;
}

.log-message.pending {
    color: #fbbf24;
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #4ade80;
}

.toast.error {
    border-left: 4px solid #f87171;
}

/* 底部信息 */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #6b7280;
    font-size: 0.8rem;
}

/* 响应式 */
@media (max-width: 480px) {
    .button-group {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
}
