/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

canvas {
    max-width: 100% !important;
    width: 100% !important;
    padding: 1rem;
    aspect-ratio: 1 / 1;
}

.container {
    max-width: 1600px;
    min-width: 756px;
    margin: 0;
    padding: 2rem;
    display: flex;
    gap: 2rem;
    min-height: auto;
}

.main-content {
    flex: 1;
    min-width: 0;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #4a90e2;
}

h1 img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

h1 img:hover {
    cursor: pointer;
}

.loading {
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background-color: #ff4444;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 1rem;
}

/* エモート関連のスタイル */
.emote-container {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    margin-right: 0.5rem;
}

.emote-image {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    border-radius: 4px;
}

.emote-info-btn {
    padding: 0.1rem 0.3rem;
    background: none;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    font-size: 0.9rem;
}

.emote-info-btn:hover {
    color: #357abd;
}

.emote-popover {
    width: fit-content;
    position: absolute;
    z-index: 1000;
    background-color: #2a2a2a;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    min-width: 200px;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
}

.emote-popover-content {
    padding: 0.8rem;
}

.emote-popover-content h4 {
    color: #4a90e2;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #4a90e2;
    font-size: 0.9rem;
}

.emote-name, .emote-unlock {
    white-space: nowrap;
    margin: 0.3rem 0;
    user-select: text;
}
.ocr-language-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.language-hint {
    margin-bottom: 12px;
    font-size: 14px;
    color: #adb5bd;
    text-align: center;
    line-height: 1.4;
}

.language-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid #4a4a4a;
    border-radius: 6px;
    background: #343a40;
    color: #f8f9fa;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #007bff, #0056b3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lang-btn:hover {
    border-color: #6c757d;
    background: #444;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lang-btn.active {
    background: #1a1a1a;
    border-color: #007bff;
    color: white;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.lang-btn.active::before {
    opacity: 0.15;
}

.lang-btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lang-btn.active::after {
    content: '✓';
    opacity: 1;
    color: #007bff;
}

/* 既存のスタイルを維持 */
.image-search-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2a2a2a;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    z-index: 1000;
    max-width: 90%;
    width: 400px;
}

.drop-zone {
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    background: #2a2a2a;
    transition: all 0.3s ease;
}

.drop-zone.drag-over {
    background: #343a40;
    border-color: #007bff;
}

.drop-zone-content {
    border: 2px dashed #4a4a4a;
    padding: 20px;
    background: #343a40;
    color: #f8f9fa;
    border-radius: 4px;
}

.drop-zone-content svg {
    margin-bottom: 10px;
    color: #007bff;
}

.browse-button {
    margin-top: 15px;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.browse-button:hover {
    background: #0056b3;
}

.image-preview {
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.search-image-button, .cancel-image-button {
    margin: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-image-button {
    background: #007bff;
    color: white;
}

.search-image-button:hover {
    background: #0056b3;
}

.cancel-image-button {
    background: #6c757d;
    color: white;
}

.cancel-image-button:hover {
    background: #5a6268;
}

.image-search-content {
    align-items: center;
    padding: 20px;
    background: #2a2a2a;
    color: #f8f9fa;
    border-radius: 4px;
}

/* OCR進捗バー */
.ocr-progress {
    margin: 15px 0;
    padding: 10px;
    background: #343a40;
    border-radius: 4px;
    display: none;
}

.ocr-progress-bar {
    width: 100%;
    height: 4px;
    background: #4a4a4a;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.ocr-progress-value {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #007bff;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ocr-progress-status {
    margin-top: 8px;
    font-size: 12px;
    color: #adb5bd;
    text-align: center;
}

/* アニメーション用のスタイル */
@keyframes button-activate {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.lang-btn.active {
    animation: button-activate 0.3s ease;
}

@keyframes checkmark-appear {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.lang-btn.active::after {
    animation: checkmark-appear 0.3s ease forwards;
}
/* 検索フォーム関連のスタイル */
.search-form {
    background-color: #2a2a2a;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

input, select, button {
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

input {
    min-width: 250px;
    background-color: #333;
    color: #fff;
}

button {
    background-color: #4a90e2;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #357abd;
}
/* 検索履歴関連のスタイル */
.search-history {
    width: 300px;
    flex-shrink: 0;
    background-color: #2a2a2a;
    padding: 1rem;
    border-radius: 8px;
    align-self: flex-start;
    position: sticky;
    top: 1rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #4a90e2 #2a2a2a;
    transition: height 0.3s ease-in-out;
}

.search-history h4 {
    color: #4a90e2;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4a90e2;
}

.search-history ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-history li {
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    background-color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.search-history li .player-name {
    flex-grow: 1;
}

.search-history li:hover {
    background-color: #357abd;
}

.search-history li:active {
    background-color: #2868a3;
}

.favorite-btn {
    color: #666;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    transition: color 0.2s;
    font-size: 1.2rem;
    margin-left: auto;
}

.favorite-btn:hover {
    color: #ffd700;
}

.favorite-btn.active {
    color: #ffd700;
}

.delete-btn {
    color: #666;
    cursor: pointer;
    padding: 0.2rem 0.2rem;
    transition: color 0.2s;
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.delete-btn:hover {
    color: #ff4444;
}

.search-history li:hover .favorite-btn:not(.active) {
    color: #999;
}

.search-history li:hover .favorite-btn.active {
    color: #ffd700;
}
/* プレイヤー情報表示関連のスタイル */
.player-info {
    background-color: #2a2a2a;
    padding: 2rem;
    border-radius: 8px;
    container-type: inline-size;
}

.basic-info-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    min-height: fit-content;
}

.player-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.player-info-header h2 {
    margin: 0;
}

.basic-info {
    background-color: #333;
    padding: 1.5rem;
    border-radius: 6px;
    flex: 1;
    min-width: 300px;
}

.basic-info p {
    margin-bottom: 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.basic-info p span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.share-url-btn {
    background-color: #2d4a6d;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.share-url-btn:hover {
    background-color: #3d5a7d;
}

.lp-history {
    background-color: #333;
    padding: 1.5rem;
    border-radius: 6px;
    flex: 2;
    min-width: 400px;
    height: 300px;
    min-height: fit-content;
}

.lp-history h3 {
    color: #4a90e2;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #4a90e2;
}

.lp-history canvas {
    width: 100% !important;
    height: auto !important;
    padding: 0;
    max-height: 300px;
    aspect-ratio: 16/9;
}

/* ランク表示のスタイル */
.rank-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#rank_icon, #max_rank_icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    object-fit: contain;
}
/* 名前履歴関連のスタイル */
.name-history-btn {
    padding: 0.2rem 0.5rem;
    background: none;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    font-size: 0.8rem;
}

.name-history-btn:hover {
    color: #357abd;
}

.name-history-popover {
    position: absolute;
    z-index: 1000;
    background-color: #2a2a2a;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    min-width: 280px;
}

.name-history-content {
    padding: 1rem;
}

.name-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #4a90e2;
}

.name-history-header h4 {
    color: #4a90e2;
    margin: 0;
}

.name-history-header .copy-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem 0.4rem;
    transition: color 0.2s;
}

.name-history-header .copy-btn:hover {
    color: #4a90e2;
}

.name-history-entry {
    padding: 0.5rem;
    border-bottom: 1px solid #444;
}

.name-history-entry:last-child {
    border-bottom: none;
}

.name-history-entry .name-change {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.name-history-entry .change-date {
    font-size: 0.8rem;
    color: #888;
    user-select: none;
}

/* コピー通知 */
.copy-notification {
    display: none;
    margin-right: 0.5rem;
    color: #4a90e2;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.copy-notification.show {
    display: inline;
    opacity: 1;
}

/* キャラクター統計関連のスタイル */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
    width: 100%;
    overflow-x: hidden;
}

.info-section {
    background-color: #333;
    padding: 1.5rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* 背景画像の共通スタイル */
.info-section.most-played::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--character-bg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.10;
    z-index: 0;
}

.info-section > * {
    position: relative;
    z-index: 1;
}

.info-section h3 {
    color: #4a90e2;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #4a90e2;
}

.info-section p {
    margin-bottom: 0.5rem;
    justify-content: space-between;
}

/* 総合戦績、フォワード戦績、ゴーリー戦績の勝敗表示 */
.info-section .wins,
.info-section .losses {
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    display: inline-block;
    margin-right: 0.5rem;
}

.info-section .wins {
    color: #4ade80;
    background-color: rgba(74, 222, 128, 0.1);
}

.info-section .losses {
    color: #f87171;
    background-color: rgba(248, 113, 113, 0.1);
}

/* 総合戦績の勝敗表示を少し大きく */
.total-stats .wins,
.total-stats .losses {
    font-size: 1.2rem;
    padding: 0.6rem 1rem;
}

.total-stats {
    background-color: #2d4a6d;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
}

.total-stats.most-played::before {
    background-size: contain;
}

.total-stats h3 {
    width: 100%;
    text-align: center;
    margin-bottom: 0;
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.total-stats-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    align-items: start;
}

.total-stats #totalStats {
    min-width: 0;
    width: 100%;
}

.total-stats #totalStats p {
    padding-right: 2rem;
}

.total-stats canvas {
    width: auto !important;
    height: auto !important;
    aspect-ratio: 1;
    padding: 0.5rem;
    display: block;
    max-width: min(100%, 400px) !important;
    margin: 0 auto;
    justify-self: end;
    line-height: none;
}

.roles-container {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}

.role-section {
    width: 48%;
    background-color: #2a2a2a;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.role-section.forward.most-played::before,
.role-section.goalie.most-played::before {
    background-size: contain;
}

.role-section h4 {
    color: #4a90e2;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 4px solid #4a90e2;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    width: 100%;
}

.character-card {
    background-color: #333;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #444;
    position: relative;
    overflow: hidden;
}

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--character-bg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.1;
    z-index: 0;
}

.character-card > * {
    position: relative;
    z-index: 1;
}

.character-card h5 {
    color: #4a90e2;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #4a90e2;
}

.character-card .player-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem;
    margin: 0;
    padding: 0.2rem;
    background: none;
    width: auto;
}

.character-card .player-stats p {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0.3rem;
    line-height: 1.0;
    padding: 0.2rem 0.2rem;
}

.character-card .player-stats p.wins,
.character-card .player-stats p.losses {
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    display: inline-block;
    margin-right: 0.5rem;
}

.character-card .player-stats p.wins {
    color: #4ade80;
    background-color: rgba(74, 222, 128, 0.1);
}

.character-card .player-stats p.losses {
    color: #f87171;
    background-color: rgba(248, 113, 113, 0.1);
}

.player-stats {
    margin-top: 2rem;
    background-color: #333;
    padding: 0.5rem;
    border-radius: 1px;
    width: 100%; /* 親要素の幅いっぱいに広げる */
    /* display: grid; */
    grid-template-columns: repeat(2, 1fr);
    gap: 0.1rem;
}

.player-stats p {
    padding: 0.5rem;
    font-size: 0.9rem;
    color: #ccc;
}

.win-rate {
    font-weight: bold;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.player-stats h3 {
    color: #4a90e2;
    margin-bottom: 1.5rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4a90e2;
}

/* レスポンシブデザイン関連のスタイル */
@container (max-width: 800px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .total-stats-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .total-stats-content canvas {
        justify-self: center;
        width: 100%;
    }

    .total-stats-content #totalStats p {
        padding-right: 0;
    }
}

@media (max-width: 1185px) {
    .basic-info-container {
        flex-direction: column;
    }

    .lp-history {
        min-width: 100%;
    }

    .container {
        flex-direction: column;
    }

    .main-content {
        display: flex;
        flex-direction: column;
    }

    .search-history {
        width: 100%;
        height: auto !important;
        position: static;
        min-height: auto;
        order: -1;
        margin-bottom: 2rem;
    }

    .search-form {
        order: 0;
    }

    h1 {
        order: -2;
    }

    .search-history ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem;
        padding: 0.5rem;
    }

    .search-history li {
        margin-bottom: 0;
    }

    .roles-container {
        flex-direction: column;
    }

    .role-section {
        width: 100%;
    }

    .info-section p {
        flex-direction: row;
        align-items: flex-start;
        min-width: 50%;
    }
}
/* メインのCSSファイル - 各モジュールのインポート */
.nameplate-container {
    position: relative;
    display: inline-block;
    margin: 5px;
}

.nameplate-image {
    max-width: 160px;
    height: auto;
    border-radius: 4px;
}

.nameplate-info-btn {
    padding: 0.1rem 0.3rem;
    background: none;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    font-size: 0.9rem;
}

.nameplate-info-btn:hover {
    color: #357abd;
}

.nameplate-popover {
    width: fit-content;
    position: absolute;
    z-index: 1000;
    background-color: #2a2a2a;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    min-width: 200px;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
}

.nameplate-popover-content {
    padding: 0.8rem;
}

.nameplate-popover-content h4 {
    color: #4a90e2;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #4a90e2;
    font-size: 0.9rem;
}

.nameplate-name, .nameplate-unlock {
    white-space: nowrap;
    margin: 0.3rem 0;
    user-select: text;
}

/*# sourceMappingURL=style.css.map*/