/* Fighting Game Features Styles */

/* テンプレート選択モーダル */
.template-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.template-modal-content {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 0;
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.template-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #444;
}

.template-modal-header h3 {
    color: #fff;
    margin: 0;
    font-size: 24px;
}

.close-modal {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #fff;
}

.template-categories {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.category-section {
    margin-bottom: 40px;
}

.category-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.template-card {
    background: #3a3a3a;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.template-card:hover {
    border-color: #4a9eff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
    background: #404040;
}

.template-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: #4a9eff;
}

.template-card h5 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.template-card p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.template-warning {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 6px;
    padding: 15px 20px;
    margin: 0 30px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ff6b6b;
    font-size: 14px;
}

.template-warning i {
    font-size: 18px;
}

/* コンボ記法スタイル */
.combo-notation {
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    color: #4a9eff;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin: 0 2px;
}

/* 方向入力アイコン */
.direction-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin: 0 2px;
}

/* フレームデータテーブル */
.frame-data-table {
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.frame-data-table table {
    width: 100%;
    border-collapse: collapse;
}

.frame-data-table th,
.frame-data-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #444;
}

.frame-data-table th {
    background: #333;
    color: #4a9eff;
    font-weight: bold;
}

.frame-data-table tr:hover {
    background: #333;
}

/* ダメージ値表示 */
.damage-value {
    color: #ff6b6b;
    font-weight: bold;
}

/* スタン値表示 */
.stun-value {
    color: #ffd93d;
    font-weight: bold;
}

/* 有利フレーム */
.frame-advantage {
    color: #51cf66;
    font-weight: bold;
}

/* 不利フレーム */
.frame-disadvantage {
    color: #ff6b6b;
    font-weight: bold;
}

/* キャラクターアイコン */
.character-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    border: 2px solid #4a9eff;
}

/* 難易度表示 */
.difficulty-stars {
    color: #ffd93d;
    font-size: 18px;
}

/* タグ表示 */
.fighting-game-tag {
    display: inline-block;
    background: #4a9eff;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin: 2px;
}

.fighting-game-tag.character {
    background: #ff6b6b;
}

.fighting-game-tag.game-title {
    background: #51cf66;
}

/* テンプレートボタン */
.template-button {
    background: #4a9eff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: background 0.3s ease;
}

.template-button:hover {
    background: #357abd;
}

.template-button i {
    margin-right: 5px;
}

/* 動画埋め込みコンテナ */
.video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 10px 0;
    border-radius: 8px;
}

.video-embed-container iframe,
.video-embed-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* GIF表示 */
.combo-gif {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

/* コンボ記法ヘルプ */
.combo-notation-help {
    padding: 20px;
    color: #fff;
}

.combo-notation-help h3 {
    color: #4a9eff;
    margin-bottom: 20px;
}

.combo-notation-help h4 {
    color: #4a9eff;
    margin-bottom: 10px;
    font-size: 16px;
}

.notation-section {
    margin-bottom: 20px;
}

.notation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-family: monospace;
    font-size: 16px;
}

.notation-grid div {
    padding: 10px;
    background: #2a2a2a;
    border-radius: 4px;
    border: 1px solid #444;
}

.notation-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notation-section li {
    padding: 8px 15px;
    background: #2a2a2a;
    border-radius: 4px;
    margin-bottom: 5px;
    font-family: monospace;
}

/* フォーマット済みコンボ表示 */
.formatted-combo {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.8;
}

.formatted-combo .direction {
    color: #4a9eff;
    font-size: 20px;
    vertical-align: middle;
}

.formatted-combo .button {
    color: #ff6b6b;
    font-weight: bold;
}

.formatted-combo .cancel {
    color: #ffd93d;
    margin: 0 5px;
}

/* コンボフォーマットボタン */
#comboFormatBtn {
    color: #4a9eff;
}

#comboFormatBtn:hover {
    background: rgba(74, 158, 255, 0.2);
}