/* リセット & 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Zen Old Mincho', 'Noto Serif JP', 'Yu Mincho', '游明朝', 'YuMincho', serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 画面管理 */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* タイトル画面 */
#title-screen {
    background-image: url('../images/title-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

#title-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.title-container {
    text-align: center;
    animation: fadeIn 1s ease-in;
    position: relative;
    z-index: 1;
    background: rgba(22, 33, 62, 0.85);
    padding: 60px 80px;
    border-radius: 30px;
    border: 4px solid #f39c12;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

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

.game-title {
    font-size: 5rem;
    font-weight: 900;
    font-family: 'Zen Old Mincho', 'Noto Serif JP', 'Yu Mincho', serif;
    color: #f39c12;
    text-shadow: 
        3px 3px 0px #c0392b,
        6px 6px 0px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(243, 156, 18, 0.8);
    margin-bottom: 60px;
    letter-spacing: 0.3em;
    position: relative;
}



.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.menu-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 3px solid #f39c12;
    color: white;
    padding: 20px 50px;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 350px;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    letter-spacing: 0.1em;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.6);
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.menu-btn.small {
    padding: 10px 20px;
    font-size: 1rem;
    min-width: auto;
}



/* 画面共通コンテナ */
.screen-container {
    max-width: 1200px;
    width: 100%;
    background: rgba(22, 33, 62, 0.9);
    border-radius: 20px;
    padding: 40px;
    border: 2px solid #f39c12;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.screen-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    color: #f39c12;
    border-bottom: 3px solid #e74c3c;
    padding-bottom: 15px;
}

.back-btn {
    background: #34495e;
    border: 2px solid #7f8c8d;
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto 0;
}

.back-btn:hover {
    background: #2c3e50;
    transform: translateY(-2px);
}

.skip-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: 3px solid #f1c40f;
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.skip-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.6);
}

/* キャラクター選択 */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.character-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 3px solid #7f8c8d;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.character-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 4px solid #f39c12;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-card:hover {
    transform: translateY(-5px);
    border-color: #f39c12;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
}

.character-card.selected {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.character-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #f39c12;
}

.character-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.stat-label {
    font-weight: 700;
    color: #ecf0f1;
}

.stat-value {
    color: #f39c12;
    font-weight: 700;
}

/* マップ画面 */
#map-screen.active {
    display: block;
}

.game-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    background: rgba(22, 33, 62, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #f39c12;
}

.player-info, .turn-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.turn-info {
    align-items: flex-end;
}

.player-info h3 {
    color: #f39c12;
    font-size: 1.2rem;
}

.game-status {
    display: flex;
    align-items: center;
    justify-content: center;
}

.territory-count {
    font-size: 2rem;
    font-weight: 900;
    color: #ecf0f1;
    text-align: center;
}

.map-container {
    position: relative;
    background: rgba(22, 33, 62, 0.8);
    border: 3px solid #f39c12;
    border-radius: 15px;
    padding: 30px;
    min-height: 600px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.castle {
    width: 120px;
    height: 140px;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: 3px solid #7f8c8d;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px;
}

.castle:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.5);
}

.castle.player {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-color: #3498db;
}

.castle.enemy {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #e74c3c;
}

.castle.neutral {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    border-color: #bdc3c7;
}

.castle-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.castle-name {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
    color: #ecf0f1;
}

.castle-owner {
    font-size: 0.75rem;
    color: #bdc3c7;
    text-align: center;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    background: rgba(22, 33, 62, 0.9);
    padding: 15px;
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 2px solid #fff;
}

.legend-color.player {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.legend-color.enemy {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.legend-color.neutral {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
}

/* 戦闘画面 */
#battle-screen.active {
    display: block;
}

.battle-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(22, 33, 62, 0.95);
    border-radius: 20px;
    padding: 40px;
    border: 3px solid #f39c12;
}

.battle-title {
    text-align: center;
    font-size: 2.5rem;
    color: #f39c12;
    margin-bottom: 30px;
    text-shadow: 2px 2px 10px rgba(243, 156, 18, 0.5);
}

.battle-info {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: center;
}

.general-card {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: 3px solid #7f8c8d;
    border-radius: 15px;
    padding: 20px;
}

.general-card.player-side {
    border-color: #3498db;
}

.general-card.enemy-side {
    border-color: #e74c3c;
}

.general-name {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    color: #f39c12;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.general-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.vs-text {
    font-size: 3rem;
    font-weight: 900;
    color: #e74c3c;
    text-shadow: 2px 2px 10px rgba(231, 76, 60, 0.5);
}

.hp-bar {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    height: 30px;
    position: relative;
    overflow: hidden;
    border: 2px solid #7f8c8d;
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
    transition: width 0.5s ease;
    border-radius: 8px;
}

.hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* じゃんけん選択 */
.janken-choices {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.janken-btn {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border: 3px solid #f39c12;
    color: white;
    padding: 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.janken-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.6);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.janken-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.janken-icon {
    font-size: 3rem;
}

/* 戦闘ログ */
.battle-log {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #7f8c8d;
    border-radius: 10px;
    padding: 20px;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
}

.log-entry {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    animation: slideIn 0.3s ease;
}

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

.log-entry.player-action {
    background: rgba(52, 152, 219, 0.3);
    border-left: 3px solid #3498db;
}

.log-entry.enemy-action {
    background: rgba(231, 76, 60, 0.3);
    border-left: 3px solid #e74c3c;
}

.log-entry.result {
    background: rgba(243, 156, 18, 0.3);
    border-left: 3px solid #f39c12;
    font-weight: 700;
}

/* 武将管理画面 */
.management-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.management-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #7f8c8d;
    border-radius: 10px;
    padding: 20px;
    display: grid;
    grid-template-columns: 250px 1fr auto;
    gap: 20px;
    align-items: center;
}

.management-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f39c12;
}

.management-params {
    display: flex;
    gap: 20px;
}

.param-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.param-input label {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.param-input input {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #7f8c8d;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 1rem;
    width: 100px;
}

.param-input input:focus {
    outline: none;
    border-color: #f39c12;
}

.save-btn {
    background: #27ae60;
    border: 2px solid #2ecc71;
    color: white;
    padding: 10px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: #2ecc71;
    transform: translateY(-2px);
}

/* 遊び方画面 */
.howto-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 30px;
}

.howto-content section {
    margin-bottom: 30px;
}

.howto-content h3 {
    color: #f39c12;
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.howto-content p, .howto-content li {
    line-height: 1.8;
    color: #ecf0f1;
    font-size: 1.1rem;
}

.howto-content ul, .howto-content ol {
    margin-left: 30px;
}

.howto-content li {
    margin-bottom: 10px;
}

/* 結果画面 */
.result-container {
    text-align: center;
    max-width: 600px;
    background: rgba(22, 33, 62, 0.95);
    border-radius: 20px;
    padding: 50px;
    border: 3px solid #f39c12;
}

.result-title {
    font-size: 3rem;
    margin-bottom: 20px;
}

.result-title.victory {
    color: #f39c12;
    text-shadow: 2px 2px 15px rgba(243, 156, 18, 0.6);
}

.result-title.defeat {
    color: #7f8c8d;
    text-shadow: 2px 2px 15px rgba(127, 140, 141, 0.6);
}

.result-message {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #ecf0f1;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .game-subtitle {
        font-size: 1rem;
    }
    
    .menu-btn {
        min-width: 250px;
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    
    .character-grid {
        grid-template-columns: 1fr;
    }
    
    .battle-info {
        grid-template-columns: 1fr;
    }
    
    .vs-text {
        font-size: 2rem;
        text-align: center;
    }
    
    .janken-choices {
        flex-direction: column;
        gap: 15px;
    }
    
    .janken-btn {
        width: 100%;
    }
    
    .management-card {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        grid-template-columns: 1fr;
    }
}

/* 全国モード */
.nationwide-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.config-management, .general-selector {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #7f8c8d;
}

.config-management h3, .general-selector h3 {
    color: #f39c12;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.saved-configs {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.config-item {
    background: rgba(52, 73, 94, 0.8);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 2px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.config-item:hover {
    border-color: #f39c12;
    transform: translateX(5px);
}

.config-info {
    flex: 1;
}

.config-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ecf0f1;
    margin-bottom: 5px;
}

.config-date {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.config-actions {
    display: flex;
    gap: 10px;
}

.config-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.config-btn.load {
    background: #3498db;
    color: white;
}

.config-btn.load:hover {
    background: #2980b9;
}

.config-btn.delete {
    background: #e74c3c;
    color: white;
}

.config-btn.delete:hover {
    background: #c0392b;
}

.config-buttons {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.action-btn {
    background: #27ae60;
    border: 2px solid #2ecc71;
    color: white;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #2ecc71;
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: #95a5a6;
    border-color: #7f8c8d;
}

.action-btn.secondary:hover {
    background: #7f8c8d;
}

.general-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.general-select-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 3px solid #7f8c8d;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.general-select-card:hover {
    transform: scale(1.05);
    border-color: #f39c12;
}

.general-select-card.selected {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.6);
}

.general-select-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid #f39c12;
}

.general-select-card .name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ecf0f1;
}

.instruction-text {
    color: #f39c12;
    font-size: 0.95rem;
    text-align: center;
    margin-top: 10px;
    font-weight: 700;
}

.japan-map-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #7f8c8d;
    margin-bottom: 20px;
}

.japan-map-container h3 {
    color: #f39c12;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
}

.map-display-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 600px;
}

.image-map-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #34495e;
    position: relative;
}

#japan-map-image {
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

#map-overlay-canvas {
    position: absolute;
    top: 20px;
    left: 20px;
    pointer-events: none;
    opacity: 0.6;
}

.provinces-detail {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #7f8c8d;
    overflow-y: auto;
}

.provinces-detail h4 {
    color: #f39c12;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-align: center;
}

.selected-info {
    background: rgba(243, 156, 18, 0.2);
    border: 2px solid #f39c12;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.selected-info .province-name-large {
    font-size: 1.5rem;
    font-weight: 900;
    color: #f39c12;
    margin-bottom: 10px;
}

.selected-info .general-assigned {
    font-size: 1.1rem;
    color: #ecf0f1;
}

.provinces-scroll-list {
    max-height: 400px;
    overflow-y: auto;
}

.provinces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 10px;
}

.province-cell {
    background: #ffffff;
    border: 2px solid #34495e;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.province-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.5);
    border-color: #f39c12;
}

.province-cell.assigned {
    border-width: 3px;
}

.province-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.province-general {
    font-size: 0.75rem;
    color: #ecf0f1;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 3px;
    margin-top: 5px;
}

.action-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

#start-nationwide-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .nationwide-controls {
        grid-template-columns: 1fr;
    }
    
    .general-select-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .provinces-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .map-display-wrapper {
        grid-template-columns: 1fr;
    }
    
    .image-map-container {
        max-height: 400px;
    }
    
    .provinces-scroll-list {
        max-height: 300px;
    }
}

/* トーナメントシステム */
.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tournament-card {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 3px solid #7f8c8d;
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tournament-card:hover {
    transform: translateY(-5px);
    border-color: #f39c12;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.4);
}

.tournament-card .tournament-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: #f39c12;
    margin-bottom: 10px;
}

.tournament-card .tournament-area {
    font-size: 1.2rem;
    color: #ecf0f1;
    margin-bottom: 20px;
}

.tournament-card .participants {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tournament-card .participant {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1rem;
    color: #ecf0f1;
}

/* グランドトーナメントカード */
.tournament-card.grand-tournament {
    background: linear-gradient(135deg, rgba(192, 57, 43, 0.9), rgba(142, 68, 173, 0.9));
    border: 3px solid #f39c12;
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.4);
    grid-column: 1 / -1;
}

.tournament-card.grand-tournament:hover {
    box-shadow: 0 0 50px rgba(243, 156, 18, 0.6);
    transform: translateY(-8px) scale(1.01);
}

/* 地域トーナメントカード */
.regional-tournament-card {
    transition: all 0.3s ease;
}

.regional-tournament-card:hover {
    transform: scale(1.02);
}

/* 大名選択グリッド */
.general-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto 30px;
}

.general-selection-card {
    background: linear-gradient(135deg, rgba(52, 73, 94, 0.8), rgba(44, 62, 80, 0.9));
    border: 3px solid #34495e;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.general-selection-card:hover {
    transform: translateY(-5px);
    border-color: #f39c12;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
}

.general-selection-card.selected {
    border-color: #f39c12;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.3), rgba(230, 126, 34, 0.3));
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.5);
}

.general-selection-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #7f8c8d;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.general-selection-card.selected img {
    border-color: #f39c12;
}

.general-selection-card .general-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ecf0f1;
    margin-bottom: 10px;
}

.general-selection-card .general-stats {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.general-selection-card .selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f39c12;
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* 家紋スタイル */
.kamon-symbol {
    display: inline-block;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    vertical-align: middle;
    margin-right: 5px;
}

.general-image-wrapper {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
}

.general-image-wrapper img {
    position: relative;
    z-index: 1;
}

.kamon-background {
    user-select: none;
}

/* トーナメント設定 */
.tournament-settings-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #7f8c8d;
    margin-bottom: 20px;
}

.tournament-settings-item h3 {
    color: #f39c12;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.participant-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.participant-slot {
    background: rgba(52, 73, 94, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #34495e;
}

.participant-slot label {
    display: block;
    color: #ecf0f1;
    font-weight: 700;
    margin-bottom: 8px;
}

.participant-slot select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid #7f8c8d;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1rem;
}

.participant-slot select:focus {
    outline: none;
    border-color: #f39c12;
}

/* トーナメント表 */
.tournament-bracket {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #7f8c8d;
    margin-bottom: 30px;
    overflow-x: auto;
}

.bracket-round {
    margin-bottom: 30px;
}

.bracket-round h3 {
    color: #f39c12;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.bracket-matches {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bracket-match {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #7f8c8d;
    border-radius: 10px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.bracket-match.completed {
    border-color: #27ae60;
}

.bracket-match.current {
    border-color: #f39c12;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
}

.bracket-general {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.bracket-general.winner {
    background: rgba(39, 174, 96, 0.3);
    border: 2px solid #27ae60;
}

.bracket-general.loser {
    opacity: 0.5;
}

.bracket-general .general-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ecf0f1;
    margin-bottom: 8px;
}

.bracket-general .general-stats {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.bracket-vs {
    font-size: 2rem;
    font-weight: 900;
    color: #e74c3c;
}

/* 現在の対戦情報 */
.current-match-info {
    background: rgba(243, 156, 18, 0.2);
    border: 3px solid #f39c12;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.current-match-info h3 {
    color: #f39c12;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.current-match-info .match-participants {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
}

.current-match-info .participant-info {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
}

.current-match-info .participant-info img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #f39c12;
}

.current-match-info .participant-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: #f39c12;
}

.match-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* レスポンシブ - トーナメント */
@media (max-width: 768px) {
    .tournament-grid {
        grid-template-columns: 1fr;
    }
    
    .participant-selector {
        grid-template-columns: 1fr;
    }
    
    .bracket-match {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .bracket-vs {
        font-size: 1.5rem;
    }
    
    .current-match-info .match-participants {
        grid-template-columns: 1fr;
    }
}
