/* 格斗游戏招式在线练习平台 - 样式表 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-width: 1200px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* 网站标题栏 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 导航栏 */
.nav-bar {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-section label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.nav-section select {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 13px;
    min-width: 100px;
}

.nav-section input[type="checkbox"] {
    margin-right: 0.3rem;
}

/* 主副机切换按钮样式 */
.player-side-btn {
    padding: 0.5rem 1rem;
    border: 2px solid;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.player-side-btn.player-1p {
    border-color: #007bff;
    color: #007bff;
    background: #e3f2fd;
}

.player-side-btn.player-1p:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.player-side-btn.player-2p {
    border-color: #dc3545;
    color: #dc3545;
    background: #ffebee;
}

.player-side-btn.player-2p:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220,53,69,0.3);
}

.player-side-info {
    font-size: 12px;
    color: #666;
    margin-top: 0.3rem;
    text-align: center;
    font-style: italic;
}

/* 主要内容区域 - 倒品字型布局 */
.main-content {
    padding: 0.8rem 1.5rem 0;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 上层：左右分栏布局 */
.top-section {
    display: flex;
    gap: 1rem;
    flex: 1;
    /* ⭐ 左右两栏总高度设置 - 可修改此值调整整体高度 ⭐ */
    min-height: 400px;
    height: 400px;
}

/* 左侧招式表区域（角色框） */
.moves-section {
    /* ⭐ 左侧角色框宽度设置 - 调整为40% ⭐ */
    flex: 0 0 31%;
    background: white;
    border-radius: 8px;
    padding: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    /* ⭐ 左侧角色框高度设置 - 可修改此值调整左侧招式表高度 ⭐ */
    height: 420px;
    display: flex;
    flex-direction: column;
}

.character-info {
    margin-bottom: 0.8rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #eee;
}

.character-info h2 {
    color: #333;
    font-size: 1.3rem;
    font-weight: bold;
}

.moves-table-container {
    margin-bottom: 0.8rem;
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    /* ⭐ 招式表内容区域的最大高度 - 删除筛选后增加了高度 ⭐ */
    max-height: 380px;
}

.moves-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.moves-table th {
    background: #f8f9fa;
    padding: 0.8rem 0.6rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
}

.moves-table td {
    padding: 0.6rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.moves-table tr:hover {
    background-color: #f8f9fa;
}

.difficulty-stars {
    color: #ffc107;
    font-size: 14px;
}

.practice-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.practice-btn:hover {
    background: #218838;
}

.practice-btn.active {
    background: #dc3545;
}

.practice-btn.active:hover {
    background: #c82333;
}

/* 右侧练习反馈区域 */
.feedback-section {
    /* ⭐ 右侧指令输入框宽度设置 - 调整为60% ⭐ */
    flex: 0 0 68%;
    background: white;
    border-radius: 8px;
    padding: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    /* ⭐ 右侧反馈区域高度设置 - 可修改此值调整右侧练习区域高度 ⭐ */
    height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.input-status-panel, .stats-panel {
    flex: 0 0 auto;
    overflow-y: auto;
}

.input-status-panel {
    /* ⭐ 指令输入状态框高度设置 - 可修改这两个值调整状态框的高度范围 ⭐ */
    min-height: 300px;  /* 最小高度 */
    max-height: 400px;  /* 最大高度 */
    /* ⭐ 以上两个值决定了指令输入状态框的高度范围，调整时请保持min-height <= max-height ⭐ */
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 0.8rem;
    background: #fafafa;
}

.input-status-panel h4 {
    margin: -0.8rem -0.8rem 0.8rem -0.8rem;
    padding: 0.6rem 0.8rem;
    color: #333;
    font-size: 1rem;
    font-weight: bold;
    border-bottom: 2px solid #eee;
    background: white;
    border-radius: 6px 6px 0 0;
}

/* 当前招式显示 */
.current-move-display {
    background: #f8f9fa;
    padding: 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.8rem;
    border: 1px solid #eee;
}

.move-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 13px;
}

.move-name, .move-command, .current-time, .status {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.move-name span, .move-command span, .current-time span, .status span {
    font-weight: bold;
    color: #007bff;
    margin-left: 0.3rem;
}

/* 导航栏中的速度按钮样式 */
.nav-section .speed-buttons {
    display: flex;
    gap: 0.3rem;
}

.nav-section .speed-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.nav-section .speed-btn:hover {
    background: #f8f9fa;
}

.nav-section .speed-btn.active {
    background: #007bff;
    color: white;
}

/* 输入序列显示 */
.input-sequence-column {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.sequence-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.sequence-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    display: inline-block;
    min-width: 40px;
    flex-shrink: 0;
    margin-top: 0.3rem;
}

.sequence-item span:not(.sequence-label) {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #ddd;
    display: inline-block;
    margin: 0.1rem;
    font-size: 12px;
    flex: 1;
}

/* 实时统计网格 */
.input-status-panel .stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin: 1rem 0 0.8rem 0;
    padding-top: 0.8rem;
    border-top: 1px solid #ddd;
}

.stat-item {
    text-align: center;
    padding: 0.5rem 0.3rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #eee;
    min-width: 0;
}

.stat-label {
    display: block;
    font-size: 10px;
    color: #666;
    margin-bottom: 0.3rem;
    font-weight: 600;
    line-height: 1.2;
}

.stat-value {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    color: #007bff;
    line-height: 1.2;
    word-break: break-all;
}

.input-status-panel .recent-attempts {
    font-size: 13px;
    padding: 0.8rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-top: 0.5rem;
}

.input-status-panel .recent-attempts span {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 虚拟键盘区域 - 紧贴上面框体 */
.keyboard-section {
    background: white;
    padding: 0.8rem 1rem;
    border-top: 2px solid #ddd;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    height: 270px;
    overflow: hidden;
    flex-shrink: 0;
}

.keyboard-section h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1rem;
    text-align: center;
}

.keyboard-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    height: 160px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
}

.key {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 3px;
    padding: 0.25rem;
    min-width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 500;
    color: #333;
    cursor: default;
    transition: all 0.15s ease;
    user-select: none;
}

.key:hover {
    background: #e9ecef;
}

.key.pressed {
    background: #28a745 !important;
    color: white !important;
    border-color: #1e7e34 !important;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
    transform: translateY(1px);
}

.key.expected {
    border-color: #ffc107 !important;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
    animation: pulse 1s infinite;
}

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

/* 特殊按键样式 */
.function-key {
    min-width: 2rem;
    background: #e9ecef;
}

.wide-key {
    min-width: 4rem;
}

.extra-wide-key {
    min-width: 5.5rem;
}

.spacebar {
    min-width: 12rem;
}

/* 键盘信息 */
.keyboard-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    /* ⭐ 调整上边距避免与按钮重合 - 可修改此值调整提示文字位置 ⭐ */
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid #eee;
}

.info-item {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
}

/* 底部设置区域 */
.footer {
    background: white;
    padding: 1rem 2rem;
    border-top: 1px solid #ddd;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.settings-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.settings-section button {
    padding: 0.5rem 1rem;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.settings-section button:hover {
    background: #007bff;
    color: white;
}

/* 成就提示动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 响应式调整 */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.4rem;
    }
    
    .stat-item {
        padding: 0.4rem 0.2rem;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .stat-value {
        font-size: 0.9rem;
    }
    
    .keyboard-info {
        flex-direction: column;
        gap: 0.3rem;
        text-align: center;
    }
    
    /* 紧凑布局调整 */
    .move-info-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 1200px) {
    .top-section {
        flex-direction: column;
    }
    
    /* ⭐ 小屏幕下的高度设置 - 可修改以下设置调整小屏幕下的显示效果 ⭐ */
    .moves-section, .feedback-section {
        flex: none;        /* 取消固定高度，让内容自适应 */
        height: auto;      /* 高度自适应内容 */
    }
    
    .main-content {
        height: auto;      /* 主内容区域高度自适应 */
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
}

/* 状态指示样式 */
.status-success {
    color: #28a745 !important;
}

.status-error {
    color: #dc3545 !important;
}

.status-warning {
    color: #ffc107 !important;
}

.status-info {
    color: #17a2b8 !important;
}

/* 成功/失败历史记录样式 */
.attempt-success {
    color: #28a745;
    font-weight: bold;
}

.attempt-fail {
    color: #dc3545;
    font-weight: bold;
}