﻿:root {
    /* 繧ｫ繝ｩ繝ｼ繝代Ξ繝・ヨ - LOL繝・・繝・*/
    --color-primary: #0ac8b9;
    --color-primary-dark: #078a7f;
    --color-secondary: #c89b3c;
    --color-secondary-dark: #9d7a2e;
    --color-accent-blue: #0397ab;
    --color-accent-red: #d13639;
    --color-danger: #bf3a42;
    --color-danger-dark: #9e2b32;

    /* 閭梧勹濶ｲ */
    --color-bg-primary: #010a13;
    --color-bg-secondary: #0a1428;
    --color-bg-card: rgba(10, 20, 40, 0.6);
    --color-bg-hover: rgba(10, 172, 185, 0.1);

    /* 繝・く繧ｹ繝郁牡 */
    --color-text-primary: #f0e6d2;
    --color-text-secondary: #a09b8c;
    --color-text-muted: #5b5a56;

    /* 繧ｰ繝ｩ繝・・繧ｷ繝ｧ繝ｳ */
    --gradient-primary: linear-gradient(135deg, #0ac8b9 0%, #0397ab 100%);
    --gradient-secondary: linear-gradient(135deg, #c89b3c 0%, #9d7a2e 100%);
    --gradient-bg: linear-gradient(135deg, #010a13 0%, #0a1428 100%);

    /* 繧ｷ繝｣繝峨え */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(10, 200, 185, 0.3);

    /* 繧ｹ繝壹・繧ｷ繝ｳ繧ｰ */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* 繝懊・繝繝ｼ蜊雁ｾ・*/
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* 繝医Λ繝ｳ繧ｸ繧ｷ繝ｧ繝ｳ */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gradient-bg);
    color: var(--color-text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(10, 200, 185, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(200, 155, 60, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

/* 繝倥ャ繝繝ｼ */
.header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    animation: fadeInDown 0.6s ease;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.title-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(10, 200, 185, 0.5));
}

.subtitle {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

/* 繧ｫ繝ｼ繝・*/
.card {
    background: var(--color-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(10, 200, 185, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.6s ease;
}



.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* 蜈･蜉帙げ繝ｫ繝ｼ繝・*/
.input-group {
    display: flex;
    gap: var(--spacing-md);
    /* 髢馴囈繧貞ｰ代＠蠎・￡繧・*/
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    /* 阮・＞閭梧勹繧貞・繧後※繧ｰ繝ｫ繝ｼ繝玲─繧貞・縺・*/
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.input-field {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(10, 200, 185, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(10, 200, 185, 0.1);
}

.input-field::placeholder {
    color: var(--color-text-muted);
}

.input-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230ac8b9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
}

.input-select option {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

.lane-select-group {
    display: flex;
    gap: var(--spacing-xs);
    flex: 1;
    flex-wrap: wrap;
    min-width: 140px;
}

.lane-group-label {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-right: var(--spacing-xs);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.input-lane {
    min-width: 60px;
}

/* 繝懊ち繝ｳ */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-icon {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.btn span:not(.btn-icon) {
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    border: 1px solid rgba(10, 200, 185, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-primary);
}

.btn-accent {
    background: var(--gradient-secondary);
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background: var(--color-danger-dark);
}

/* 繝・・繧ｿ繧ｳ繝ｳ繝医Ο繝ｼ繝ｫ */
.data-controls {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    /* 霑ｽ蜉: 逋ｻ骭ｲ繧ｨ繝ｪ繧｢縺ｨ縺ｮ蛻・屬 */
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    justify-content: flex-end;
    /* 蜿ｳ蟇・○縺ｫ縺励※逋ｻ骭ｲ繝懊ち繝ｳ(騾壼ｸｸ蟾ｦ縲應ｸｭ螟ｮ)縺ｨ陲ｫ繧峨↑縺・ｈ縺・↓縺吶ｋ */
}

/* 繝励Ξ繧､繝､繝ｼ繝ｪ繧ｹ繝・*/
/* 繝ｪ繧ｹ繝医さ繝ｳ繝・リ蜈ｱ騾夊ｨｭ螳夲ｼ・蛻苓｡ｨ遉ｺ逕ｨ・・*/
.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
}

/* 希望レーン設定画面のグリッド（1列10行固定） */
.lane-settings-list,
#laneSettingsList {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 4px !important;
    padding: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
}

.lane-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(10, 200, 185, 0.2);
    border-radius: var(--radius-md);
    padding: 0.2rem 0.6rem;
    /* 極限まで圧縮 */
    transition: all var(--transition-fast);
}

.lane-card:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
}

.lane-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.player-info-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.player-main-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.player-main-info .player-name {
    font-weight: 700;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-sub-info {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.lane-select-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.input-lane-compact {
    width: 120px !important;
    padding: 0.4rem 2rem 0.4rem 0.6rem !important;
    font-size: 0.9rem !important;
    height: 32px;
}

.badge-confirmed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(10, 200, 185, 0.2);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.badge-confirmed.hidden {
    display: none;
}

/* スマホ表示時は1列にする */
@media (max-width: 800px) {
    .lane-settings-list {
        grid-template-columns: 1fr;
    }

    .lane-card-inner {
        flex-wrap: wrap;
    }
}

/* 逕ｻ髱｢蟷・00px莉･荳翫〒蠑ｷ蛻ｶ逧・↓3蛻苓｡ｨ遉ｺ・・lexbox迚茨ｼ・*/
@media (min-width: 600px) {

    .player-list .player-item,
    .lane-settings-list .player-item {
        /* 螳牙・繝槭・繧ｸ繝ｳ繧貞叙縺｣縺ｦ蟆代＠蟆上＆繧√↓險ｭ螳・*/
        width: 31%;
        flex: 0 0 31%;
        min-width: 0;
        /* 繧ｳ繝ｳ繝・Φ繝・ｹ・↓繧医ｋ蠑ｷ蛻ｶ諡｡蠑ｵ繧帝亟豁｢ */
    }
}

.player-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(10, 200, 185, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-xs);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* 邵ｦ遨阪∩縺ｫ螟画峩 */
    align-items: flex-start;
    /* 蟾ｦ蟇・○ */
    transition: all var(--transition-fast);
    animation: slideIn 0.3s ease;
    cursor: pointer;
}

.player-item:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
    /* ホバー時に少し浮く */
    box-shadow: var(--shadow-sm);
}

/* 繝倥ャ繝繝ｼ蜀・・繝√ぉ繝・け繝懊ャ繧ｯ繧ｹ隱ｿ謨ｴ・・S縺ｧ繧ｹ繧ｿ繧､繝ｫ謖・ｮ壹＠縺ｦ縺・ｋ縺悟ｿｵ縺ｮ縺溘ａ・・*/
.player-item .player-header input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-name {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 1.1rem;
}

.player-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    /* 少したたむ */
    font-size: 0.85rem;
    margin-top: 0.25rem;
    align-items: center;
}

/* 繝ｪ繧ｹ繝亥・縺ｮ繝ｬ繝ｼ繝ｳ繝舌ャ繧ｸ縺ｯ蟆上＆縺上☆繧・*/
.player-details .badge-lane {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.badge-tier {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 繝・ぅ繧｢蛻･繧ｫ繝ｩ繝ｼ */
.tier-unranked {
    color: #a09b8c;
    border-color: #a09b8c;
    background: rgba(160, 155, 140, 0.1);
}

.tier-iron {
    color: #574d4f;
    border-color: #574d4f;
    background: rgba(87, 77, 79, 0.1);
}

.tier-bronze {
    color: #8c513a;
    border-color: #8c513a;
    background: rgba(140, 81, 58, 0.1);
}

.tier-silver {
    color: #80989d;
    border-color: #80989d;
    background: rgba(128, 152, 157, 0.1);
}

.tier-gold {
    color: #cdfa7e;
    border-color: #cdfa7e;
    background: rgba(205, 250, 126, 0.1);
    text-shadow: 0 0 5px rgba(205, 250, 126, 0.3);
}

.tier-platinum {
    color: #4effce;
    border-color: #4effce;
    background: rgba(78, 255, 206, 0.1);
    text-shadow: 0 0 5px rgba(78, 255, 206, 0.3);
}

.tier-emerald {
    color: #00d16d;
    border-color: #00d16d;
    background: rgba(0, 209, 109, 0.1);
    text-shadow: 0 0 5px rgba(0, 209, 109, 0.3);
}

.tier-diamond {
    color: #576bce;
    border-color: #576bce;
    background: rgba(87, 107, 206, 0.1);
    text-shadow: 0 0 8px rgba(87, 107, 206, 0.5);
}

.tier-master {
    color: #eb4cce;
    border-color: #eb4cce;
    background: rgba(235, 76, 206, 0.1);
    box-shadow: 0 0 10px rgba(235, 76, 206, 0.2);
}

.tier-grandmaster {
    color: #ff2d31;
    border-color: #ff2d31;
    background: rgba(255, 45, 49, 0.1);
    box-shadow: 0 0 12px rgba(255, 45, 49, 0.3);
}

.tier-challenger {
    color: #f4c875;
    border-color: #f4c875;
    background: rgba(244, 200, 117, 0.1);
    box-shadow: 0 0 15px rgba(244, 200, 117, 0.4);
    border-width: 2px;
}

.badge-lane {
    background: rgba(10, 200, 185, 0.2);
    color: var(--color-primary);
    border: 1px solid rgba(10, 200, 185, 0.3);
}

.lane-icon {
    margin-right: 0.2rem;
}

.player-rating-hidden {
    display: none;
}

.player-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* 繝√・繝謖ｯ繧雁・縺代さ繝ｳ繝医Ο繝ｼ繝ｫ */
.divider-controls {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* 繝√・繝陦ｨ遉ｺ */
.teams-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.team {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 2px solid transparent;
    transition: all var(--transition-normal);
}

.team-blue {
    border-color: var(--color-accent-blue);
}

.team-red {
    border-color: var(--color-accent-red);
}

.team-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid currentColor;
}

.team-blue .team-title {
    color: var(--color-accent-blue);
}

.team-red .team-title {
    color: var(--color-accent-red);
}

.team-icon {
    font-size: 1.5rem;
}

/* 蜿､縺・ｨｭ螳壼炎髯､ */

.team-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}


.team-member {
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
    gap: var(--spacing-sm);
}

.team-member-name {
    font-weight: 500;
    flex: 1;
    /* 蟾ｦ蛛ｴ繧ｹ繝壹・繧ｹ遒ｺ菫・*/
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-member-role {
    flex: 1;
    text-align: center;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(10, 200, 185, 0.3);
}

.team-member-info {
    flex: 1;
    text-align: right;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.team-member-rating {
    /* 蜑企勁縺ｾ縺溘・菴ｿ逕ｨ縺励↑縺・◆繧∝ｮ夂ｾｩ縺ｮ縺ｿ谿九☆縺句炎髯､ */
    color: var(--color-secondary);
    font-weight: 600;
}

/* --- 蟇ｾ髱｢蠖｢蠑上・繝・メ繧｢繝・・繝懊・繝・--- */
.matchup-board {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

#appBody .matchup-header {
    display: grid;
    grid-template-columns: 1fr 90px 1fr;
    gap: var(--spacing-sm);
    text-align: center;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.team-header.blue-header {
    color: var(--color-blue-team);
}

.team-header.red-header {
    color: var(--color-red-team);
}

.team-rating {
    font-size: 0.9em;
    opacity: 0.8;
    margin-left: 0.5rem;
}

.matchup-rows {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

#appBody .matchup-row {
    display: grid;
    grid-template-columns: 1fr 90px 1fr;
    gap: var(--spacing-sm);
    align-items: center;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

/* ストリークバッジスタイル */
.badge-streak-win {
    background: rgba(76, 217, 100, 0.2) !important;
    color: #4cd964 !important;
    border: 1px solid rgba(76, 217, 100, 0.4) !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 0.85em !important;
    font-weight: bold !important;
}

.badge-streak-loss {
    background: rgba(255, 59, 48, 0.2) !important;
    color: #ff3b30 !important;
    border: 1px solid rgba(255, 59, 48, 0.4) !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 0.85em !important;
    font-weight: bold !important;
}

.matchup-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lane-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lane-label {
    font-weight: 700;
    color: var(--color-primary);
    text-shadow: 0 0 5px rgba(10, 200, 185, 0.5);
    font-size: 1.2rem !important;
}

.player-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.player-cell.blue {
    align-items: flex-end;
    /* 髱偵メ繝ｼ繝・亥ｷｦ・峨□縺代←譁・ｭ励・蜿ｳ蟇・○・溘＞繧・∝ｯｾ髱｢縺ｪ繧我ｸｭ螟ｮ縺ｫ蜷代°縺｣縺ｦ蟇・○縺溘⊇縺・′縺九▲縺薙＞縺・ｼ・
    VS蠖｢蠑上・蝣ｴ蜷・
    [Blue Name  ] [Lane] [  Red Name]
    竊・
    驟咲ｽｮ逧・↓縲。lue縺ｯ蜿ｳ蟇・○(繝ｬ繝ｼ繝ｳ蛛ｴ)縲ヽed縺ｯ蟾ｦ蟇・○(繝ｬ繝ｼ繝ｳ蛛ｴ)縺ｫ縺吶ｋ縺ｮ縺御ｸ闊ｬ逧・°縲・
    縺ゅｋ縺・・荳｡譁ｹ荳ｭ螟ｮ縲√∪縺溘・荳｡譁ｹ螟門・縲・
    縺薙％縺ｧ縺ｯ縲沓lue繧貞承蟇・○縲ヽed繧貞ｷｦ蟇・○縲阪↓縺励※縲√Ξ繝ｼ繝ｳ蜷阪ｒ謖溘・蠖｢縺ｫ縺吶ｋ縲・
    */
    align-items: flex-end;
    text-align: right;
}

.player-cell.red {
    align-items: flex-start;
    text-align: left;
}

#appBody .matchup-row .player-name {
    font-weight: 700;
    font-size: 1.15rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-tier {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

/* 蜍晄風繧ｳ繝ｳ繝医Ο繝ｼ繝ｫ */
.win-controls {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-win {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    /* 繝懊ち繝ｳ繧ょｰ代＠蝗幄ｧ偵￥縺励※繝懊・繝峨→蜷医ｏ縺帙ｋ */
}

/* Blue繝懊ち繝ｳ縺ｯ蟾ｦ(1蛻礼岼) */
.blue-win-btn {
    grid-column: 1;
    border-color: var(--color-blue-team);
    color: var(--color-blue-team);
}

/* Red繝懊ち繝ｳ縺ｯ蜿ｳ(3蛻礼岼) */
.red-win-btn {
    grid-column: 3;
    border-color: var(--color-red-team);
    color: var(--color-red-team);
}

.blue-win-btn:hover:not(:disabled) {
    background: rgba(44, 144, 250, 0.2);
}

.red-win-btn:hover:not(:disabled) {
    background: rgba(250, 44, 44, 0.2);
}


/* 繝輔ャ繧ｿ繝ｼ */
.footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* 繝医・繧ｹ繝磯夂衍 */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform var(--transition-normal);
    z-index: 1000;
    font-weight: 600;
}

.toast.show {
    transform: translateX(0);
}

/* 繧ｹ繧ｯ繝ｭ繝ｼ繝ｫ繝舌・ */
.player-list::-webkit-scrollbar {
    width: 8px;
}

.player-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.player-list::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-sm);
}

.player-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* 繧｢繝九Γ繝ｼ繧ｷ繝ｧ繝ｳ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 繝ｬ繧ｹ繝昴Φ繧ｷ繝悶ョ繧ｶ繧､繝ｳ */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }

    .title {
        font-size: 1.8rem;
    }

    .input-group {
        flex-direction: column;
    }

    .input-field,
    .input-rating {
        width: 100%;
        min-width: 100%;
    }

    .data-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* 繝ｪ繧ｹ繝医・繧ｰ繝ｪ繝・ラ縺ｮauto-fill縺ｫ莉ｻ縺帙ｋ縺溘ａ縲∝ｼｷ蛻ｶ1繧ｫ繝ｩ繝謖・ｮ壹ｒ蜑企勁 */
    /* .player-list { grid-template-columns: 1fr; } */

    .teams-display {
        grid-template-columns: 1fr;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        transform: translateY(200px);
    }

    .toast.show {
        transform: translateY(0);
    }
}

/* 逕ｻ髱｢驕ｷ遘ｻ繝ｦ繝ｼ繝・ぅ繝ｪ繝・ぅ */
.hidden {
    display: none !important;
}

/* 驕ｸ謚槭さ繝ｳ繝医Ο繝ｼ繝ｫ */
.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding: 0 var(--spacing-xs);
}

.selection-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
}

.search-box {
    flex: 1;
    max-width: 200px;
    margin-left: auto;
}

.input-search {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-search:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--color-primary);
}

.count-badge {
    background: rgba(10, 200, 185, 0.1);
    color: var(--color-primary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.sort-box {
    margin-right: var(--spacing-sm);
}

.input-sort {
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 140px;
    background-position: right 0.5rem center;
}

.input-sort:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--color-primary);
}

/* 繝励Ξ繧､繝､繝ｼ繧｢繧､繝・Β・医メ繧ｧ繝・け繝懊ャ繧ｯ繧ｹ蟇ｾ蠢懶ｼ・*/
.player-item {
    cursor: pointer;
    position: relative;
    padding-left: 3rem;
    /* 繝√ぉ繝・け繝懊ャ繧ｯ繧ｹ縺ｮ繧ｹ繝壹・繧ｹ */
}

/* 繧ｫ繧ｹ繧ｿ繝繝√ぉ繝・け繝懊ャ繧ｯ繧ｹ */
.player-checkbox {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    accent-color: var(--color-primary);
    z-index: 2;
}

.player-item.selected {
    background: rgba(10, 200, 185, 0.1);
    border-color: rgba(10, 200, 185, 0.5);
}

/* 謖ｯ繧雁・縺大ｮ溯｡後・繧ｿ繝ｳ */
.btn-large {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    width: 100%;
}

.mode-select {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

.mode-select label {
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* 邨先棡逕ｻ髱｢ */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.btn-win {
    width: 100%;
    margin-top: var(--spacing-md);
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
}

.blue-win-btn {
    background: rgba(3, 151, 171, 0.2);
    color: var(--color-accent-blue);
    border-color: var(--color-accent-blue);
}

.blue-win-btn:hover {
    background: var(--color-accent-blue);
    color: white;
    box-shadow: 0 0 20px rgba(3, 151, 171, 0.5);
}

.red-win-btn {
    background: rgba(209, 54, 57, 0.2);
    color: var(--color-accent-red);
    border-color: var(--color-accent-red);
}

.red-win-btn:hover {
    background: var(--color-accent-red);
    color: white;
    box-shadow: 0 0 20px rgba(209, 54, 57, 0.5);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 繝ｬ繝ｼ繝・ぅ繝ｳ繧ｰ螟牙虚繧｢繝九Γ繝ｼ繧ｷ繝ｧ繝ｳ逕ｨ */
.rating-change {
    font-weight: bold;
    margin-left: 0.5rem;
    animation: popIn 0.5s ease;
}

.rating-up {
    color: #4cd964;
}

.rating-down {
    color: #ff3b30;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 繝ｬ繝ｼ繝ｳ驕ｸ謚樒判髱｢縺ｮ繧ｹ繧ｿ繧､繝ｫ */
/* 繝ｬ繝ｼ繝ｳ驕ｸ謚樒判髱｢縺ｮ繧ｹ繧ｿ繧､繝ｫ */
/* .lane-settings-list 縺ｯ #laneSettingsList 縺ｧ荳頑嶌縺榊ｮ夂ｾｩ貂医∩ */



/* 繝ｬ繝ｼ繝ｳ險ｭ螳夂判髱｢蟆ら畑繧ｫ繝ｼ繝・(Fix for layout issues) */
.lane-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(10, 200, 185, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    /* 蟶ｸ縺ｫ邵ｦ遨阪∩ */
    gap: var(--spacing-sm);
    cursor: default;
    transition: all var(--transition-fast);
}

.lane-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: var(--color-bg-tertiary);
}

.lane-card .player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.lane-card .player-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text-primary);
}

.lane-card .player-details {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.lane-card .lane-select-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.lane-card .lane-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.lane-card .lane-number {
    font-weight: 700;
    color: var(--color-primary);
    width: 1.2rem;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.lane-card .input-lane {
    flex: 1;
    width: auto;
    min-width: 0;
    max-width: none;
}


.lane-setting-item .player-header {
    justify-content: space-between;
    width: 100%;
}

.lane-setting-item .player-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.lane-setting-item .badge-tier {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
}

.lane-setting-item .player-details {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xs);
}

.lane-setting-item .lane-select-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    width: 100%;
    margin-top: auto;
    /* 荳九↓蟇・○繧・*/
}

.lane-setting-item .input-lane {
    width: 100%;
    height: 3.5rem;
    /* 鬮倥＆繧貞､ｧ縺阪￥ */
    font-size: 1.1rem;
    /* 譁・ｭ励し繧､繧ｺ繧貞､ｧ縺阪￥ */
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: var(--radius-md);
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lane-setting-item .input-lane:hover,
.lane-setting-item .input-lane:focus {
    border-color: var(--color-primary);
    background-color: rgba(0, 0, 0, 0.5);
    outline: none;
}

/* --- 霑ｽ蜉繧ｹ繧ｿ繧､繝ｫ: 繝槭ャ繝√い繝・・逕ｻ髱｢縺ｮ隕冶ｪ肴ｧ蜷台ｸ・--- */

/* 1. 繝ｬ繝ｼ繝ｳ繧ｻ繝ｫ・育ｸｦ荳ｦ縺ｳ・・*/
.lane-cell {
    flex-direction: column;
    gap: 0.2rem;
}

/* 2. 繝・ぅ繧｢蛻･繝舌ャ繧ｸ繧ｹ繧ｿ繧､繝ｫ */
.badge-tier {
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.tier-unranked {
    color: #a0a0a0;
    background: rgba(160, 160, 160, 0.1);
    border-color: #a0a0a0;
}

.tier-iron {
    color: #8d8d8d;
    background: rgba(141, 141, 141, 0.1);
    border-color: #8d8d8d;
}

.tier-bronze {
    color: #cd7f32;
    background: rgba(205, 127, 50, 0.1);
    border-color: #cd7f32;
}

.tier-silver {
    color: #c0c0c0;
    background: rgba(192, 192, 192, 0.1);
    border-color: #c0c0c0;
}

.tier-gold {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
    border-color: #f1c40f;
}

.tier-platinum {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    border-color: #2ecc71;
}

.tier-emerald {
    color: #10ac84;
    background: rgba(16, 172, 132, 0.1);
    border-color: #10ac84;
}

.tier-diamond {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.tier-master {
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.1);
    border-color: #9b59b6;
}

.tier-grandmaster {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
}

.tier-challenger {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.2);
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.4);
}


/* 3. 繝√・繝繝倥ャ繝繝ｼ蠑ｷ隱ｿ */
.team-header {
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    /* 荳頑嶌縺・*/
    justify-content: flex-end;
    /* 繝励Ξ繧､繝､繝ｼ蜷阪↓蜷医ｏ縺帙※荳ｭ螟ｮ・医Ξ繝ｼ繝ｳ蛛ｴ・峨↓蟇・○繧・*/
    align-items: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    gap: 1rem;
}

.team-rating {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    /* 騾乗・蛹冶ｧ｣髯､ */
    background: rgba(0, 0, 0, 0.6);
    /* 閭梧勹繧偵ｈ繧頑ｿ・￥ */
    background-clip: border-box !important;
    /* text clip隗｣髯､ */
    -webkit-background-clip: border-box !important;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-sm);
    box-shadow: none;
    text-shadow: none;
    letter-spacing: 0.5px;
    margin-left: 0;
    z-index: 10;
    white-space: nowrap;
    /* 謚倥ｊ霑斐＠髦ｲ豁｢ */
}

/* Blue: 縺昴・縺ｾ縺ｾ蜿ｳ蟇・○・・lex-end・・*/
.blue-header {
    background: linear-gradient(90deg, rgba(3, 151, 171, 0.5) 0%, rgba(3, 151, 171, 0.2) 100%);
    border-left: 4px solid var(--color-accent-blue);
    color: #fff !important;
}

/* Red: row-reverse縺ｪ縺ｮ縺ｧflex-end縺ｯ蟾ｦ蛛ｴ縺ｫ縺ｪ繧・*/
.red-header {
    background: linear-gradient(90deg, rgba(209, 54, 57, 0.2) 0%, rgba(209, 54, 57, 0.5) 100%);
    border-right: 4px solid var(--color-accent-red);
    color: #fff !important;
    flex-direction: row-reverse;
}


/* 4. 繝ｬ繝ｼ繝亥ｷｮ陦ｨ遉ｺ */
.lane-diff {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
    height: 1.5rem;
    /* 鬮倥＆遒ｺ菫・*/
}

.diff-value {
    color: #fff;
    padding: 0;
    background: none;
    border-radius: 0;
}

.diff-mark {
    width: 4px;
    height: 100%;
    background-color: transparent;
    border-radius: 2px;
}

/* Blue譛牙茜: 蟾ｦ蛛ｴ縺ｫ髱偵＞邱・*/
.favored-blue .diff-mark.left {
    background-color: var(--color-accent-blue);
    box-shadow: 0 0 8px var(--color-accent-blue);
}

/* Red譛牙茜: 蜿ｳ蛛ｴ縺ｫ襍､縺・ｷ・*/
.favored-red .diff-mark.right {
    background-color: var(--color-accent-red);
    box-shadow: 0 0 8px var(--color-accent-red);
}

/* 5. 繝励Ξ繧､繝､繝ｼ陦後・繝ｬ繧､繧｢繧ｦ繝茨ｼ医ヵ繝ｩ繝・ヨ蛹悶・繧ｫ繝ｩ繝謨ｴ蛻暦ｼ・*/
.player-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    /* 蟆代＠蠎・ａ縺ｫ */
}

/* 蜷榊燕: 蜿ｯ螟牙ｹ・*/
.player-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
    font-weight: 500;
}

/* 繝ｩ繝ｳ繧ｯ: 蝗ｺ螳壼ｹ・*/
.badge-tier {
    width: 7.5rem;
    /* 蟷・ｒ蠎・￡縺ｦ縺ｯ縺ｿ蜃ｺ縺鈴亟豁｢ */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    height: 1.6rem;
    font-size: 0.8rem;
    /* 蟆代＠蟆上＆縺・*/
    white-space: nowrap;
    overflow: hidden;
}

/* 繝ｬ繝ｼ繝・ 蝗ｺ螳壼ｹ・*/
/* 繝ｬ繝ｼ繝・ 蝗ｺ螳壼ｹ・*/
.player-rating-val {
    width: 3.5rem;
    /* 蟷・崋螳壹〒邵ｦ繧呈純縺医ｋ */
    text-align: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    height: 1.6rem;
    /* 繝ｩ繝ｳ繧ｯ繝舌ャ繧ｸ縺ｨ鬮倥＆繧貞粋繧上○繧・*/
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Blue繝√・繝: [Name] [Rank] [Rate] */
.player-cell.blue {
    flex-direction: row;
    text-align: left;
}

.player-cell.blue .player-name {
    text-align: left;
}

/* Red繝√・繝: [Name] [Rank] [Rate] --(row-reverse)--> [Rate] [Rank] [Name] */
.player-cell.red {
    flex-direction: row-reverse;
    text-align: right;
}

.player-cell.red .player-name {
    text-align: right;
}

/* 6. 蟷ｳ蝮・Ξ繝ｼ繝郁｡ｨ遉ｺ縺ｮ隱ｿ謨ｴ */
.match-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge-lane {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.5rem;
    /* 鬮倥＆繧堤｢ｺ菫晢ｼ医Λ繝ｳ繧ｯ繝舌ャ繧ｸ縺御ｽ呵｣輔ｒ謖√▲縺ｦ蜈･繧九ｈ縺・↓・・*/
    padding: 0 1rem;
    font-size: 1.1rem;
    /* 譁・ｭ励し繧､繧ｺ蟆代＠繧｢繝・・ */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
}

/* 蟷ｳ蝮・Ξ繝ｼ繝亥・縺ｮ繝ｩ繝ｳ繧ｯ繝舌ャ繧ｸ隱ｿ謨ｴ */
.match-info .badge-tier {
    height: 1.8rem;
    /* 鬮倥＆繧貞粋繧上○繧・*/
    margin-left: 0 !important;
    font-size: 0.85rem;
    transform: none;
    /* 繧ゅ＠縺ゅｌ縺ｰ繝ｪ繧ｻ繝・ヨ */
}

/* 戦績画面スタイル */
.stats-view {
    max-width: 1000px;
    margin: 0 auto;
}

.stats-table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    white-space: nowrap;
}

.stats-table th,
.stats-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-table th {
    background-color: rgba(0, 0, 0, 0.4);
    color: var(--color-text-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
    user-select: none;
}

.stats-table th:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.stats-table tbody tr:not(.stats-detail-row):hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.stats-win-rate {
    font-family: monospace;
    font-weight: bold;
}

.stats-win-rate.high {
    color: var(--color-accent);
    text-shadow: 0 0 5px rgba(10, 200, 185, 0.3);
}

.stats-win-rate.low {
    color: var(--color-danger);
}

/* 隧ｳ邏ｰ陦鯉ｼ医Ξ繝ｼ繝ｳ蛻･・・*/
.stats-detail-row {
    background-color: rgba(0, 0, 0, 0.3);
    display: none;
}

.stats-detail-row.expanded {
    display: table-row;
}

.stats-detail-content {
    padding: 1rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.1) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stats-lane-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.stats-lane-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-fast);
}

.stats-lane-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* 一括登録ビュー */
.bulk-register {
    max-width: 900px;
    margin: 0 auto;
}

.bulk-form-row {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideIn 0.3s ease;
}

.bulk-form-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(10, 200, 185, 0.2);
}

.bulk-name-input {
    flex: 2;
    min-width: 150px;
}

.bulk-tier-input {
    flex: 1.5;
    min-width: 120px;
}

.bulk-lane-input {
    flex: 1;
    min-width: 100px;
}

.bulk-remove-btn {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

.bulk-remove-btn:hover {
    color: var(--color-danger);
}

.stats-lane-name {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 蜍晄風陦ｨ遉ｺ繝舌ャ繧ｸ */
.win-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-weight: 800;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #fff;
    vertical-align: middle;
}

.team-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
}

/* 蜆ｪ蜈域ｨｩ繝舌ャ繧ｸ */
.priority-badge {
    margin-left: 0.5rem;
    font-size: 0.9em;
    cursor: help;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.8));
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* 繝励Ξ繧､繝､繝ｼ繝ｪ繧ｹ繝医・繝ｬ繧､繧｢繧ｦ繝郁ｪｿ謨ｴ */
.player-list {
    display: flex;
    flex-direction: column;
}

.player-item {
    padding: 0.5rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: background-color 0.2s;
}

.player-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.player-item.selected {
    background-color: rgba(10, 200, 185, 0.05);
    border-color: rgba(10, 200, 185, 0.2);
}

.player-item .player-checkbox {
    margin: 0;
    cursor: pointer;
}

/* 繧ｰ繝ｪ繝・ラ繝ｬ繧､繧｢繧ｦ繝・*/
.player-list.grid-view {
    display: grid;
    gap: 0;
}

.player-list.grid-view .player-item {
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.player-list.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.player-list.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.player-list.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 蛻玲焚蛻・ｊ譖ｿ縺医・繧ｿ繝ｳ */
.btn-icon-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    width: 36px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

.btn-icon-toggle.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}



/* 蟶梧悍繝ｬ繝ｼ繝ｳ髮・ｨ郁｡ｨ遉ｺ */
.lane-summary-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.lane-summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.lane-icon-svg {
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    margin-right: 0.2rem;
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
}



.lane-summary-item.over-capacity {
    background: rgba(255, 82, 82, 0.15);
    border-color: rgba(255, 82, 82, 0.4);
    color: #ff8080;
}

.lane-summary-item.filled-capacity {
    background: rgba(100, 255, 218, 0.15);
    border-color: rgba(100, 255, 218, 0.4);
    color: #a7ffeb;
}

.lane-name-sm {
    font-weight: 600;
    color: var(--color-text-secondary);
}

.lane-summary-item.over-capacity .lane-name-sm {
    color: #ffcfcf;
}

.lane-summary-item.filled-capacity .lane-name-sm {
    color: #cffff7;
}

.lane-counts {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-family: monospace;
    font-weight: bold;
}

.count-sep {
    color: var(--color-text-muted);
    font-size: 0.8em;
}

.count-main {
    color: var(--color-text-primary);
}

.count-sub {
    color: var(--color-text-secondary);
}

/* 蟶梧悍繝ｬ繝ｼ繝ｳ驕ｸ謚樒判髱｢縺ｮ讓ｪ繧ｹ繧ｯ繝ｭ繝ｼ繝ｫ蛹厄ｼ・陦鯉ｼ・*/
#laneSettingsList {
    display: grid !important;
    grid-template-rows: repeat(2, auto) !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 280px !important;
    overflow-x: auto !important;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) rgba(255, 255, 255, 0.05);
    width: 100%;
}

#laneSettingsList::-webkit-scrollbar {
    height: 8px;
}

#laneSettingsList::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#laneSettingsList::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

/* レーンカードのデザイン調整 */
.lane-card:hover,
.player-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.lane-card {
    flex: 0 0 280px;
    /* 横並び時の固定幅 */
    width: 280px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: background-color 0.2s;
    /* モバイルなどの狭い画面でも縮まないように */
}



.lane-card .player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lane-card .player-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.lane-card .lane-select-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: nowrap;
}

.lane-card .lane-input-row {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lane-card .lane-number {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: bold;
    min-width: 1rem;
    text-align: center;
}

.lane-card .input-select {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* --- 蠕ｩ蜈・ 繧ｰ繝ｪ繝・ラ繝ｬ繧､繧｢繧ｦ繝・--- */
.player-list.grid-view {
    display: grid;
    gap: 0.5rem;
}

.player-list.grid-view .player-item {
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.player-list.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.player-list.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.player-list.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 蛻玲焚蛻・ｊ譖ｿ縺医・繧ｿ繝ｳ */
.btn-icon-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    width: 36px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}


.btn-icon-toggle.active {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--color-primary);
}

/* Lane Highlight Animations */
@keyframes highlight-pulse-primary {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

@keyframes highlight-pulse-secondary {
    0% {
        box-shadow: 0 0 0 0 rgba(192, 192, 192, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(192, 192, 192, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(192, 192, 192, 0);
    }
}

.highlight-lane-primary {
    animation: highlight-pulse-primary 1.5s infinite;
    border: 2px solid #ffd700 !important;
    z-index: 10;
}

.highlight-lane-secondary {
    animation: highlight-pulse-secondary 1.5s infinite;
    border: 2px solid #c0c0c0 !important;
    z-index: 10;
}

/* Confirmed Badge */
.badge-confirmed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid rgba(46, 204, 113, 0.4);
    color: #2ecc71;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.badge-confirmed::before {
    content: '';
}

.badge-confirmed.hidden {
    display: none !important;
}

/* Matchup Lane Icon */
.lane-icon-matchup {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* マッチアップ画面専用のアイコンサイズ強制(セレクタを#appBodyからにして優先度を最大化) */
#appBody .lane-icon-matchup .lane-icon-svg {
    width: 40px !important;
    height: 40px !important;
}

.matchup-row .lane-cell {
    display: flex;
    flex-direction: column;
    /* アイコンとラベルを縦に並べる */
    align-items: center;
    justify-content: center;
}

/* Lane Just Right (Green) */
.lane-just-right {
    border: 2px solid #2ecc71 !important;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

/* Button Large */
.btn-lg {
    min-width: 120px;
    font-size: 1.1rem !important;
    padding: 0.8rem 1.5rem !important;
}


.lane-card .player-name-large {
    font-size: 1.25rem;
    font-weight: 800;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-primary);
}

.lane-card .player-status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    flex-wrap: nowrap;
    overflow: hidden;
}