/**
 * WP Brawl Stars X プラグイン用ショートコードスタイル (ダークモード)
 */

/* 共通スタイル */
.wpbsx-battle-stats,
.wpbsx-mode-stats,
.wpbsx-map-stats,
.wpbsx-ranking {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #e1e1e1;
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.wpbsx-battle-stats h3,
.wpbsx-mode-stats h3,
.wpbsx-map-stats h3,
.wpbsx-ranking h3 {
    margin-bottom: 15px;
    font-size: 1.4em;
    color: #00a8ff;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

/* テーブルスタイル */
.wpbsx-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #252525;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.wpbsx-stats-table th, 
.wpbsx-stats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.wpbsx-stats-table th {
    background-color: #333;
    color: #00a8ff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
}

.wpbsx-stats-table tbody tr:hover {
    background-color: #2a2a2a;
}

.wpbsx-stats-table tbody tr:last-child td {
    border-bottom: none;
}

/* 勝率バー */
.wpbsx-win-rate-bar {
    position: relative;
    height: 25px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 15px;
}

.wpbsx-win-rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #005eff, #00a8ff);
    border-radius: 4px 0 0 4px;
}

.wpbsx-win-rate-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* 通知スタイル */
.wpbsx-error, 
.wpbsx-notice {
    padding: 12px 15px;
    border-left: 4px solid;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.wpbsx-error {
    border-color: #ff5252;
    background-color: #3a2222;
    color: #ff7b7b;
}

.wpbsx-notice {
    border-color: #00a8ff;
    background-color: #1a2a38;
    color: #00a8ff;
}

/* レスポンシブ対応 */
@media (max-width: 767px) {
    .wpbsx-stats-table {
        font-size: 0.9em;
    }
    
    .wpbsx-stats-table th, 
    .wpbsx-stats-table td {
        padding: 8px 10px;
    }
}

/* ランクと勝率の強調表示 */
.wpbsx-stats-table .rank {
    font-weight: 700;
    color: #00a8ff;
}

.wpbsx-stats-table .battle-count,
.wpbsx-stats-table .usage-count {
    color: #aaa;
}

/* 勝率による色分け */
.wpbsx-win-rate-high {
    color: #4CAF50 !important;
}

.wpbsx-win-rate-medium {
    color: #FF9800 !important;
}

.wpbsx-win-rate-low {
    color: #F44336 !important;
}

/* ランク表示 */
.wpbsx-rank {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    font-weight: bold;
    margin-right: 10px;
}

.wpbsx-rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.wpbsx-rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
    color: #000;
}

.wpbsx-rank-3 {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.wpbsx-sort-controls {
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-end;
}

.wpbsx-sort-button {
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
    font-size: 0.9em;
}

.wpbsx-sort-button:hover {
    background-color: #444;
}

.wpbsx-sort-button.active {
    background-color: #00a8ff;
    border-color: #0076b3;
}

/* ソート可能なヘッダーのスタイル */
.wpbsx-stats-table th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 25px;
}

.wpbsx-stats-table th.sortable:hover {
    background-color: #3a3a3a;
}

.wpbsx-stats-table th.sortable::after {
    content: "⇕";
    position: absolute;
    right: 8px;
    color: #777;
}

.wpbsx-stats-table th.sorted-asc::after {
    content: "↑";
    color: #00a8ff;
}

.wpbsx-stats-table th.sorted-desc::after {
    content: "↓";
    color: #00a8ff;
}

/* 時系列変動表示用スタイル */
.wpbsx-history {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #e1e1e1;
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.wpbsx-history h3 {
    margin-bottom: 15px;
    font-size: 1.4em;
    color: #00a8ff;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.wpbsx-history h4 {
    margin: 20px 0 15px;
    font-size: 1.2em;
    color: #00a8ff;
}

/* 変動表示 */
.wpbsx-change-up {
    color: #4CAF50;
    font-weight: bold;
}

.wpbsx-change-down {
    color: #F44336;
    font-weight: bold;
}

.wpbsx-change-none {
    color: #888;
}

/* トップランク表示 */
.wpbsx-top-rank-1 {
    color: #FFD700;
    font-weight: bold;
}

.wpbsx-top-rank-2 {
    color: #C0C0C0;
    font-weight: bold;
}

.wpbsx-top-rank-3 {
    color: #CD7F32;
    font-weight: bold;
}

/* グラフコンテナ */
.wpbsx-chart-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #252525;
    border-radius: 6px;
    height: 300px;
}

/* ポートレート表示用スタイル */
.wpbsx-portrait-container {
    display: inline-block;
    margin: 10px 0;
    text-align: center;
}

.wpbsx-portrait {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    height: auto;
}

.wpbsx-brawler-portrait {
    display: inline-block;
    border-radius: 50%;
    border: 2px solid #00a8ff;
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.wpbsx-brawler-icon {
    display: inline-block;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.wpbsx-stats-table .brawler {
    display: flex;
    align-items: center;
}

/* テンプレート用ポートレートスタイル */
.brawler-portrait {
    max-width: 100px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    margin: 10px 0;
}

/* WP Brawl Stars X スタイル - ダークモード */

/* 全キャラリンクページ用スタイル */
.wpbsx-all-brawlers-container {
    margin: 20px 0;
    background-color: #1e1e1e;
    color: #e1e1e1;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.wpbsx-all-brawlers-description {
    margin-bottom: 30px;
    color: #e1e1e1;
}

.wpbsx-all-brawlers-description p {
    color: #e1e1e1;
}

/* 管理者向け通知 */
.wpbsx-admin-notice {
    background-color: #2c2c2c;
    border-left: 4px solid #ffb900;
    padding: 12px;
    margin: 15px 0;
    box-shadow: 0 1px 1px rgba(0,0,0,.2);
    color: #e1e1e1;
}

.wpbsx-admin-button {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 5px 12px;
    text-decoration: none;
    border-radius: 3px;
    margin-top: 8px;
}

.wpbsx-admin-button:hover {
    background: #005177;
    color: #fff;
}

.wpbsx-rarity-section {
    margin-bottom: 40px;
}

.wpbsx-rarity-title {
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #e1e1e1;
}

/* グリッドレイアウト */
.wpbsx-brawlers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.wpbsx-brawler-card {
    transition: transform 0.3s ease;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background-color: #2c2c2c;
}

.wpbsx-brawler-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.wpbsx-brawler-card.no-page {
    opacity: 0.7;
    position: relative;
    background-color: #252525;
}

.wpbsx-brawler-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.wpbsx-brawler-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.wpbsx-create-page-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wpbsx-brawler-card:hover .wpbsx-create-page-overlay {
    opacity: 1;
}

.wpbsx-create-page-link {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.wpbsx-create-page-link:hover {
    background-color: #005177;
    color: white;
}

.wpbsx-brawler-name {
    text-align: center;
    padding: 10px;
    margin: 0;
    background: #333;
    color: #e1e1e1;
    font-size: 14px;
}

.wpbsx-coming-soon {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
}

.wpbsx-brawler-link {
    text-decoration: none;
    color: #e1e1e1;
    display: block;
}

.wpbsx-brawler-link:hover {
    color: #fff;
}

.wpbsx-no-page {
    cursor: default;
}

/* リストレイアウト */
.wpbsx-brawlers-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    column-count: 3;
}

.wpbsx-brawler-item {
    padding: 8px 0;
    break-inside: avoid;
}

.wpbsx-brawler-item.no-page {
    opacity: 0.7;
}

.wpbsx-brawler-item a {
    text-decoration: none;
    color: #0073aa;
}

.wpbsx-brawler-item a:hover {
    text-decoration: underline;
    color: #00a0d2;
}

/* レア度の色 */
:root {
    --rarity-starter-color: #767676;
    --rarity-rare-color: #4a97c2;
    --rarity-super-rare-color: #3c8c3c;
    --rarity-epic-color: #a940c9;
    --rarity-mythic-color: #c74141;
    --rarity-legendary-color: #cc9400;
    --rarity-chromatic-color: #c96c1b;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .wpbsx-brawlers-list {
        column-count: 2;
    }
    
    .wpbsx-brawlers-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .wpbsx-brawlers-list {
        column-count: 1;
    }
} 