﻿/* version: 20250708.3 */
body {
    font-family: "Inter", sans-serif
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px
}

::-webkit-scrollbar-thumb:hover {
    background: #555
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0
}

.language-select-header {
    padding: .25rem .5rem;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
    font-size: .75rem;
    color: #4b5563;
    background-color: #f9fafb;
    min-width: 100px;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05)
}

.dark .language-select-header {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db
}

.language-select-header:focus {
    outline: 2px solid #fff0;
    outline-offset: 2px;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px #a5b4fc
}

.message-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: .375rem;
    box-shadow: 0 4px 6px rgb(0 0 0 / .1);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, background-color 0.3s ease-in-out;
    text-align: center
}

.message-box.show {
    display: block;
    opacity: 1
}

.message-box.success {
    background-color: #22c55e
}

.message-box.warning {
    background-color: #f59e0b
}

.message-box.error {
    background-color: #ef4444
}

.message-box.info {
    background-color: #3b82f6
}

.filter-dropdown,
#globalKeywordSearchInput,
#occupationFilter,
#specializationFilter,
#teamFilter {
    font-size: 16px !important
}

@media (min-width:768px) {

    .filter-dropdown,
    #globalKeywordSearchInput,
    #occupationFilter,
    #specializationFilter,
    #teamFilter {
        font-size: 0.875rem !important
    }
}

.advanced-filter-row .remove-filter-btn {
    background: #fff0;
    border: none;
    color: #ef4444;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 .5rem
}

.advanced-filter-row .remove-filter-btn:hover {
    color: #b91c1c
}

.table-container {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: .5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05)
}

.dark .table-container {
    border-color: #374151
}

.table-container table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse
}

#resultsTable th,
#resultsTable td {
    padding: .65rem .8rem;
    text-align: left;
    vertical-align: middle;
    border-bottom-width: 1px;
    border-color: #e5e7eb;
    white-space: nowrap
}

.dark #resultsTable th,
.dark #resultsTable td {
    border-color: #374151
}

#resultsTable th {
    font-weight: 500;
    font-size: .8rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: .05em;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f9fafb;
    cursor: pointer;
    user-select: none
}

.dark #resultsTable th {
    background-color: #1f2937;
    color: #9ca3af
}

#resultsTable th:hover {
    background-color: #f3f4f6
}

.dark #resultsTable th:hover {
    background-color: #374151
}

#resultsTable td {
    font-size: .85rem;
    color: #374151
}

.dark #resultsTable td {
    color: #d1d5db
}

#resultsTable td.total-value-cell {
    font-weight: 600;
    color: #1d4ed8
}

.dark #resultsTable td.total-value-cell {
    color: #60a5fa
}

#resultsTable th:nth-child(1),
#resultsTable td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 11;
    background-color: inherit;
    min-width: 40px
}

#resultsTable tbody tr:nth-child(odd) {
    background-color: #fff
}

.dark #resultsTable tbody tr:nth-child(odd) {
    background-color: #1f2937
}

#resultsTable tbody tr:nth-child(even) {
    background-color: #f9fafb
}

.dark #resultsTable tbody tr:nth-child(even) {
    background-color: #374151
}

#resultsTable th .sort-indicator {
    margin-left: .3em;
    font-size: .75em;
    display: inline-block;
    width: 1em;
    color: #374151;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle
}

.dark #resultsTable th .sort-indicator {
    color: #9ca3af
}

.top5-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .5rem;
    padding: .75rem
}

.dark .top5-card {
    background-color: #1e293b;
    border-color: #334155
}

.top5-card-title {
    font-weight: 600;
    color: #1d4ed8;
    margin-bottom: .5rem
}

.dark .top5-card-title {
    color: #60a5fa
}

.top5-list {
    list-style-type: none;
    padding-left: 0;
    font-size: .8rem;
    space-y: .25rem
}

.top5-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.top5-player-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: .5rem
}

.top5-spec-name {
    font-size: .7rem;
    color: #6b7280;
    margin-left: .5rem
}

.dark .top5-spec-name {
    color: #9ca3af
}

.top5-team-name {
    font-size: .7rem;
    color: #9ca3af;
    margin-left: .25rem
}

.dark .top5-team-name {
    color: #6b7280
}

.top5-player-value {
    font-weight: 500;
    color: #4b5563
}

.dark .top5-player-value {
    color: #d1d5db
}

.show-more-btn {
    font-size: .75rem;
    color: #4f46e5;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: .5rem
}

.show-more-btn:hover {
    text-decoration: underline
}

.team-ranking-list {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .5rem;
    padding: 1rem
}

.dark .team-ranking-list {
    background-color: #1e293b;
    border-color: #334155
}

.team-ranking-item {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: .25rem 0;
    font-size: .85rem
}

.team-ranking-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0
}

.dark .team-ranking-item:not(:last-child) {
    border-color: #334155
}

.team-rank {
    font-weight: 600;
    text-align: center;
    color: #64748b
}

.team-name {
    font-weight: 500;
    display: flex;
    align-items: center
}

.team-avg-value {
    font-weight: 600;
    color: #1d4ed8
}

.dark .team-avg-value {
    color: #60a5fa
}

.team-composition-accordion {
    border-bottom: 1px solid #e5e7eb;
}
.team-composition-accordion:last-child {
    border-bottom: none;
}
.team-composition-accordion summary {
    cursor: pointer;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}
.team-composition-accordion summary::-webkit-details-marker {
    display: none;
}
.team-composition-accordion summary:hover {
    background-color: #eef2ff;
}
.dark .team-composition-accordion summary:hover {
    background-color: #312e81;
}
.team-composition-accordion summary::after {
    content: '▼';
    font-size: 0.8em;
    color: #6b7280;
    transition: transform 0.2s ease;
}
.team-composition-accordion[open]>summary::after {
    transform: rotate(180deg);
}
.team-composition-accordion .team-member-list-container {
    padding: 0 0.5rem 0.75rem 1rem;
    column-count: 3;
    column-gap: 1.5rem
}
.dark .team-composition-accordion {
    border-color: #374151;
}

.team-member-item {
    display: block;
    padding: .25rem .5rem;
    border-radius: .25rem;
    cursor: pointer;
    font-size: .8rem;
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: .25rem
}

.dark .team-member-item {
    color: #d1d5db
}

.team-member-item:hover {
    background-color: #eef2ff
}

.dark .team-member-item:hover {
    background-color: #312e81
}

.team-member-spec {
    font-size: .75rem;
    color: #6b7280;
    margin-left: .25rem
}

.dark .team-member-spec {
    color: #9ca3af
}

.video-search-btn {
    margin-left: .5rem;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    padding: .25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.video-search-btn:hover {
    color: #1d4ed8;
    background-color: #eef2ff
}

.occupation-skill-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .5rem;
    padding: 1rem;
    height: fit-content
}

.dark .occupation-skill-card {
    background-color: #1e293b;
    border-color: #334155
}

.occupation-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1rem
}

.dark .occupation-title {
    color: #93c5fd
}

.specialization-accordion summary {
    cursor: pointer;
    font-weight: 600;
    color: #059669;
    padding: .5rem;
    border-radius: .25rem;
    transition: background-color 0.2s;
    list-style: none
}

.specialization-accordion summary::-webkit-details-marker {
    display: none
}

.dark .specialization-accordion summary {
    color: #34d399
}

.specialization-accordion summary:hover {
    background-color: #f0fdf4
}

.dark .specialization-accordion summary:hover {
    background-color: #064e3b
}

.specialization-accordion[open]>summary {
    background-color: #ecfdf5
}

.dark .specialization-accordion[open]>summary {
    background-color: #042f2e
}

.specialization-accordion summary::before {
    content: "▶";
    margin-right: .5rem;
    display: inline-block;
    transition: transform 0.2s
}

.specialization-accordion[open]>summary::before {
    transform: rotate(90deg)
}

.skill-usage-list {
    list-style-type: none;
    padding: .75rem .5rem .25rem .5rem;
    space-y: .5rem
}

.skill-usage-item {
    display: flex;
    flex-direction: column
}

.skill-usage-item>div:first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: .125rem;
    font-size: .75rem
}

.skill-name {
    font-weight: 500
}

.skill-percentage {
    color: #4b5563;
    font-weight: 500
}

.dark .skill-percentage {
    color: #d1d5db
}

.skill-usage-bar-bg {
    background-color: #e5e7eb;
    border-radius: .25rem;
    height: 6px;
    width: 100%;
    overflow: hidden
}

.dark .skill-usage-bar-bg {
    background-color: #374151
}

.skill-usage-bar {
    background-color: #10b981;
    height: 100%;
    border-radius: .25rem
}

.analysis-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .analysis-header {
        justify-content: flex-start;
        gap: 1.5rem;
    }
}

.analysis-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .5rem;
    padding: 1rem
}

.dark .analysis-card {
    background-color: #1e293b;
    border-color: #334155
}

.analysis-card-title {
    font-weight: 600;
    color: #1d4ed8;
    margin-bottom: .75rem
}

.dark .analysis-card-title {
    color: #60a5fa
}

.histogram-bar-container {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100px;
    margin-top: .5rem
}

.histogram-bar {
    background-color: #3b82f6;
    flex-grow: 1
}

.dark .histogram-bar {
    background-color: #60a5fa
}

.histogram-label {
    font-size: .7rem;
    text-align: center;
    color: #6b7280;
    line-height: 1.3;
    flex-basis: 0%;
    flex-grow: 1
}

.dark .histogram-label {
    color: #9ca3af
}

.dark .histogram-label {
    color: #9ca3af
}

.player-type-list,
.ideal-comp-list {
    list-style-type: none;
    padding: 0;
    space-y: .5rem
}

.ideal-comp-list {
    column-count: 3;
    column-gap: 1.5rem
}

@media (max-width:767px) {
    .ideal-comp-list {
        column-count: 1
    }
    .team-composition-accordion .team-member-list-container {
        column-count: 1;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .team-composition-accordion .team-member-list-container {
        column-count: 2;
    }
}

.player-type-item,
.ideal-comp-item {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    page-break-inside: avoid;
    break-inside: avoid
}

.player-type-name,
.ideal-comp-name {
    font-weight: 500;
}

.player-type-value,
.ideal-comp-value {
    font-weight: 600;
    color: #1e3a8a
}

.dark .player-type-value,
.dark .ideal-comp-value {
    color: #93c5fd
}

#modal-container.flex {
    display: flex
}

#modal-container.hidden {
    display: none
}

.modal-video-list a {
    display: block;
    padding: .5rem;
    border-radius: .25rem;
    text-decoration: none;
    color: #1d4ed8
}

.modal-video-list a:hover {
    background-color: #eef2ff
}

.modal-player-details .player-card {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: .75rem;
    margin-bottom: .75rem
}

.modal-player-details .player-card:last-child {
    border-bottom: none;
    margin-bottom: 0
}

.modal-player-details .stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    gap: .125rem 2.5rem
}

@media (min-width: 640px) {
    .modal-player-details .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.stat-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    padding: .2rem 0;
    align-items: baseline
}

.stat-item>span:first-child {
    color: #4b5563;
    font-weight: 500
}

.dark .stat-item>span:first-child {
    color: #9ca3af
}

.stat-item>span:last-child {
    font-weight: 600;
    text-align: right
}

.stat-item-spacer {
    grid-column: span 2;
    height: .75rem
}

.stat-item-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid #e5e7eb
}

.dark .stat-item-total {
    border-color: #4b5563
}

.stat-item-total>span:first-child {
    font-weight: 600;
    margin-right: 1rem
}

.stat-item-total>span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d4ed8
}

.dark .stat-item-total>span:last-child {
    color: #60a5fa
}

.dark .stat-item {
    border-color: #374155
}

.stat-item>span:first-child {
    color: #4b5563
}

.dark .stat-item>span:first-child {
    color: #9ca3af
}

.stat-item>span:last-child {
    font-weight: 600;
    text-align: right
}

.stat-item-spacer {
    grid-column: span 2;
    height: .5rem
}

.stat-item-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid #e5e7eb
}

.dark .stat-item-total {
    border-color: #4b5563
}

.stat-item-total>span:first-child {
    font-weight: 600;
    margin-right: 1rem
}

.stat-item-total>span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d4ed8
}

.dark .stat-item-total>span:last-child {
    color: #60a5fa
}

.stat-item-spacer {
    height: 1rem
}

.stat-item-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid #e5e7eb
}

.stat-item-total>span:first-child {
    margin-right: 1rem;
    font-weight: 600
}

.stat-item-total>span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d4ed8
}

.dark .stat-item-total>span:last-child {
    color: #60a5fa
}

.custom-btn {
    color: #fff;
    font-weight: 600;
    padding: .5rem 1rem;
    border-radius: .5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px 0 rgb(0 0 0 / .06);
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out
}

.custom-btn:focus {
    outline: 2px solid #fff0;
    outline-offset: 2px
}

.search-reset-button {
    background-color: #ef4444;
    border-color: #ef4444
}

.search-reset-button:hover {
    background-color: #dc2626;
    border-color: #dc2626
}

.search-reset-button:focus {
    box-shadow: 0 0 0 2px #fca5a5, 0 0 0 4px #ef4444
}

#lastUpdatedFooter {
    color: #9ca3af
}

.dark #lastUpdatedFooter {
    color: #6b7280
}

@media (max-width:767px) {

    .filter-dropdown,
    #globalKeywordSearchInput,
    #teamFilter,
    #languageSelectHeader,
    select,
    textarea {
        font-size: 16px !important
    }
}

@media (max-width:640px) {
    .table-container {
        max-height: 60vh
    }

    #resultsTable th,
    #resultsTable td {
        font-size: .8rem;
        padding: .5rem .75rem
    }
}

.message-box.info {
    background-color: #3b82f6
}

#debug-panel {
    display: none;
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: rgb(0 0 0 / .85);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    z-index: 9999;
    border: 1px solid #ffc107;
    box-shadow: 0 4px 12px rgb(0 0 0 / .5)
}

body.debug-mode-active #debug-panel {
    display: block
}

#debug-panel h4 {
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
    color: #ffc107;
    font-weight: 700
}

#debug-panel table td {
    padding: 3px 8px;
    vertical-align: top;
    white-space: pre-wrap;
    word-break: break-all
}

#debug-panel table tr td:first-child {
    color: #aaa;
    font-weight: 700
}

.privacy-sensitive-count,
.privacy-sensitive-button {
    transition: opacity 0.2s ease-in-out
}

body.privacy-mode-enabled .privacy-sensitive-count,
body.privacy-mode-enabled .privacy-sensitive-button {
    display: none
}

.stat-item-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid #e5e7eb
}

.dark .stat-item-total {
    border-color: #374155
}

.stat-item-total>span:first-child {
    font-weight: 600;
    margin-right: 1rem
}

.stat-item-total>span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1d4ed8
}

.dark .stat-item-total>span:last-child {
    color: #60a5fa
}

/* Analysis Section Common Styles */
.analysis-filter-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-select {
    padding: .25rem .5rem;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
    font-size: .75rem;
    color: #4b5563;
    background-color: #f9fafb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}
