html, body {
    padding: 0;
    margin: 0;
    height: 100%;
    background: #f3f3f3;
}

input {
    text-align: center;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.command-button {
    margin-left: 2%;
}

.match-button {
    margin-left: 2%;
}

.menu {
    height: 40px;
    background: #e4e4e4;
    border-bottom: solid 1px rgb(150,150,150);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px 0 25px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.teams-inputs {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.spacer {
    width: 40px;
}

.toggle-container {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-checkbox {
    margin-right: 5px;
    cursor: pointer;
}

.toggle-text {
    font-size: 14px;
    font-weight: 500;
}

/* Stats dropdown styles */
.stats-dropdown-container {
    position: relative;
    margin: 0 15px;
}

.stats-dropdown-button {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    user-select: none;
    gap: 5px;
}

.stats-dropdown-button:hover {
    background-color: #f5f5f5;
}

.stats-dropdown-text {
    font-size: 14px;
    font-weight: 500;
}

.stats-dropdown-arrow {
    font-size: 10px;
    color: #666;
}

.stats-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 120px;
}

.stats-dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
}

.stats-dropdown-item:hover {
    background-color: #f5f5f5;
}

.stats-dropdown-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.stats-dropdown-item span {
    font-size: 14px;
}

.button-link {
    width: 100px;
}

.tools-button {
    margin-right: 10px;
    font-size: 20px;
    cursor: pointer;
    user-select: none;
}

.admin-menu-btn {
    position: absolute;
    left: 10px;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    opacity: 0.65;
    transition: opacity 0.15s;
}
.admin-menu-btn:hover {
    opacity: 1;
}

/* Отступ для первого поля ввода команды после кнопок/элементов */
.stats-dropdown-container + .teams-inputs {
    margin-left: 15px;
}

.main {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.teams-info {
    display:flex;
    align-items: flex-start;
    padding: 20px 20px 0 20px;
}

.team-info {
    display: flex;
    flex-direction: column;
    padding-right: 20px;
    margin-bottom: 15px;
}

.info {
    display: flex;
}

.col {
    display: flex;
    flex-direction: column;
}
.row {
    height: 25px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.team {
    display: flex;
    margin-left: 20px;
    border: solid 1px rgb(150,150,150);
}

.line_up {
    padding-right: 4px;
    padding-bottom: 12px;
}

.line_up_tabs {
    display: flex;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgb(200, 200, 200);
    margin-bottom: 6px;
}

.line_up_tab {
    font-size: 13px;
    cursor: pointer;
    padding-bottom: 3px;
    color: rgb(100, 100, 100);
    border-bottom: 2px solid transparent;
}

.line_up_tab.active {
    font-weight: bold;
    color: rgb(0, 0, 0);
    border-bottom-color: rgb(0, 0, 0);
}

.line_up_input_row {
    display: flex;
    gap: 4px;
    align-items: stretch;
    margin-top: 5px;
}

.line_up_input {
    flex: 1;
    height: 2.4em;
    resize: none;
    box-sizing: border-box;
    font-size: 12px;
}

.line_up_submit_btn {
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.line_up_result {
    width: 100%;
    height: 2.4em;
    resize: none;
    box-sizing: border-box;
    font-size: 12px;
    margin-top: 4px;
    border: 1px solid rgb(200, 200, 200);
    background: rgb(250, 250, 250);
    color: rgb(60, 60, 60);
}

.line_up_result.result-ok {
    border: 2px solid green;
}

.line_up_result.result-error {
    border: 2px solid red;
}

.result-error {
    border: 2px solid red !important;
}
.status_main_input {
    height: 3.6em;
}

.vlm-recognition {
    margin-top: 6px;
}

.vlm-input-row {
    display: flex;
    gap: 4px;
    align-items: stretch;
}

.vlm-dropzone {
    flex: 1;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 2px dashed rgb(150, 150, 150);
    border-radius: 4px;
    text-align: center;
    font-size: 11px;
    color: rgb(100, 100, 100);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, background-color 0.15s;
}

.vlm-dropzone:focus,
.vlm-dropzone:hover {
    border-color: rgb(80, 120, 200);
    background-color: rgb(240, 245, 255);
}

.vlm-dropzone.dragover {
    border-color: rgb(60, 100, 180);
    background-color: rgb(230, 240, 255);
}

.vlm-recognizing-text {
    animation: vlm-pulse 1s ease-in-out infinite alternate;
}

@keyframes vlm-pulse {
    from { opacity: 1; }
    to   { opacity: 0.4; }
}

.vlm-browse-btn {
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.vlm-browse-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vlm-error {
    font-size: 11px;
    color: red;
    margin-top: 2px;
}


.team-logo {
    height: 28px;
    vertical-align: middle;
    margin-right: 5px;
}

.team-logo-last-game {
    height: 16px;
    vertical-align: middle;
}

.team-side-last-game {
    height: 12px;
    vertical-align: middle;
}

.command-name {
    font-weight: bold;
}

.status-header {
    width: 35px;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
}

/* Custom Select Styles */
.custom-select {
    position: relative;
    width: 100%;
    cursor: pointer;
    user-select: none;
}

.select-selected {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 2px 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    border-radius: 3px;
}

.select-selected:hover {
    border-color: #999;
}

.custom-select.open .select-selected {
    border-color: #666;
    background-color: #f5f5f5;
}


.select-items {
    position: absolute;
    background-color: #fff;
    border: 1px solid #666;
    border-top: none;
    z-index: 1000;
    width: 100%;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.select-item {
    padding: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.select-item:last-child {
    border-bottom: none;
}

.select-item:hover {
    background-color: #e3f2fd;
}

.status-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.status-ok {
    color: green;
    font-weight: bold;
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.request {
    font-size: 12px;
    width: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preliminary-status {
    font-size: 12px;
    padding-left: 5px;
    width: 17px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.status-playing, .status-substitute {
    font-size: 12px;
    width: 21px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.counter-value {
    min-height: 14px;
    display: block;
    line-height: 14px;
}

.request, .status-playing {
    padding-left: 5px;
}

.status-substitute {
    padding-left: 5px;
}

.lineup-save-btn,
.lineup-clear-btn {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10;
}

.lineup-save-btn:hover,
.lineup-clear-btn:hover {
    opacity: 1;
}

.lineup-save-btn {
    color: #4CAF50;
}

.lineup-clear-btn {
    color: #ff9800;
}

.shirtnumber {
    width: 12px;
    text-align: center;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.shirtnumber.role-num-star {
    font-weight: bold;
}

.shirtnumber.role-num-key {
    font-weight: bold;
}

.shirtnumber.role-num-anchor {
    font-weight: bold;
    color: #305CDE;
}

.shirtnumber.command-name {
    width: 188px;
    text-align: left;
    padding-left: 5px;
}

.gray-table .photo,
.gray-table .name {
    width: 0;
    overflow: hidden;
}

.name {
    width: 140px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.roster-status, .starting-status {
    width: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gray-table .starting-status {
    position: relative;
    cursor: help;
    margin-left: -5px;
}

.flag img {
    height: 12px;
    vertical-align: top;
}
.photo {
    width: 33px;
    text-align: center;
}

.photo img {
    height: 20px;
    vertical-align: middle;
}

.status-cell, .flag, .age, .position {
    width: 30px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.position {
    position: relative;
    cursor: help;
}

.fc_rating {
    width: 28px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: bold;
    font-size: 15px;
    position: relative;
    cursor: help;
}

/* FC rating color classes */
.fc-rating-very-low {
    color: #8B0000 !important; /* Dark red */
}

.fc-rating-low {
    color: #CC5500 !important; /* Dark orange */
}

.fc-rating-medium-low {
    color: #66a80f !important; /* Lime green (yellowgreen) */
}

.fc-rating-medium {
    color: #008000 !important; /* Green */
}

.fc-rating-high {
    color: #4B0082 !important; /* Dark purple (indigo) */
}

.rating {
    width: 26px;
    text-align: center;
    font-weight: bold;
}

.transfer_value {
    width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Manrope', sans-serif;
}

.npxg_xa_total {
    width: 22px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.1;
    position: relative;
    cursor: help;
}

/* Fast tooltip styles */
.fast-tooltip[data-tooltip]:not([data-tooltip=""]):hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    pointer-events: none;
    animation: fadeIn 0.1s ease-in;
}

.fast-tooltip[data-tooltip]:not([data-tooltip=""]):hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: 0px;
    z-index: 1000;
    pointer-events: none;
    animation: fadeIn 0.1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.xgot {
    width: 35px;
    text-align: center;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.1;
}

.goals-assists {
    width: 30px;
    text-align: center;
}

.goals-number {
    font-size: 14px;
    font-weight: normal;
}

.assists-number {
    font-size: 14px;
    color: #999;
}

.player-link {
    color: inherit !important;
    text-decoration: none;
}

.player-link:hover {
    text-decoration: underline;
}

.player-role-badge {
    font-size: 10px;
    margin-left: 3px;
    vertical-align: super;
    line-height: 1;
}

.last_game {
    width: 34px;
    font-size: 10px;
    text-align: center;
    font-weight: bold;
    font-family: sans-serif;
}

.lineups {
    width: 30px;
    text-align: center;
}

.lineups-starter {
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: normal;
}

.lineups-total {
    font-size: 11px;
    color: #999;
}

.game_minutes {
    width: 30px;
    text-align: center;
}

.time_on_field {
    width: 32px;
    text-align: center;
    font-size: 12px;
}

.gray-table {
    height: 54px;
    background: #f5f5f5;
}

.team-row:nth-child(even) {
    background: #e5e5e5;
}

.cell {
    width:25px;
}
.circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: sans-serif;
    font-size: 9px;
    font-weight: bold;
    margin: 0 auto;
}

.green {
    background-color: #28a745;
}

.yellow {
    background-color: #ffc107;
}

/* Highlighting styles for player statistics */
.highlight-transfer-value {
    color: green !important;
    font-weight: bold;
}

.highlight-rating {
    color: darkgoldenrod !important;
    font-weight: bold;
}

.highlight-goals-assists {
    color: darkgoldenrod !important;
    font-weight: bold;
}

.highlight-young-talent {
    color: orangered !important;
    font-weight: bold;
}

.highlight-npxg-xa {
    border: 2px solid #333 !important;
    background-color: #f0f0f0 !important;
    font-weight: bold !important;
}

.highlight-low-starter-rate {
    color: orangered !important;
    font-weight: bold;
}

/* Autocomplete styles */
.autocomplete-container {
    position: relative;
    flex: 1;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: #e3f2fd;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.team-logo-small {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    object-fit: contain;
}

.command-input {
    flex: 1;
}

/* Match history dropdown styles */
.match-history-container {
    position: relative;
    margin-right: 8px;
}

.match-history-container.match-history-right {
    margin-right: 0;
    margin-left: 8px;
}

.match-history-button {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    transition: all 0.2s ease;
}

.match-history-button:hover {
    background: #f5f5f5;
    border-color: #999;
}

.match-history-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 400px;
    min-width: 350px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.match-history-right .match-history-dropdown {
    left: auto;
    right: 0;
}

.match-history-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background-color 0.2s ease;
}

.match-history-item:hover {
    background-color: #e3f2fd;
}

.match-history-item:last-child {
    border-bottom: none;
}

.match-date {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.match-league {
    font-size: 11px;
    width: 24px;
    color: #666;
    margin-left: 8px;
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #444;
}

.team-logo-tiny {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.team-name-short {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.match-separator {
    color: #999;
    font-weight: bold;
    margin: 0 4px;
}

/* Logout button styles */
.logout-button {
    margin-left: auto;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 5px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.logout-button a {
    color: #fff !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

