
.fh-message {
    --fh-message-color: #e2c681;
    --fh-message-bg: rgba(197, 160, 89, 0.09);
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 13px 15px;
    color: var(--fh-message-color);
    background: var(--fh-message-bg);
    border: 0;
    border-left: 2px solid var(--fh-message-color);
    border-radius: 0 5px 5px 0;
    font-size: 0.88rem;
}

.fh-message[hidden] {
    display: none;
}

.fh-message--dismissible {
    padding-right: 52px;
}

.fh-message--info {
    --fh-message-color: #8fc8ff;
    --fh-message-bg: rgba(143, 200, 255, 0.08);
}

.fh-message--warning {
    --fh-message-color: #f2d272;
    --fh-message-bg: rgba(242, 210, 114, 0.09);
}

.fh-message--danger {
    --fh-message-color: #ff8a8a;
    --fh-message-bg: rgba(255, 138, 138, 0.08);
}

.fh-message--success {
    --fh-message-color: #9fe0a9;
    --fh-message-bg: rgba(159, 224, 169, 0.08);
}

.fh-message--premium {
    --fh-message-color: #e2c681;
    --fh-message-bg: rgba(197, 160, 89, 0.09);
}

.fh-message--neutral {
    --fh-message-color: #d7a7ff;
    --fh-message-bg: rgba(215, 167, 255, 0.075);
}

.fh-message-icon,
.fh-message svg {
    width: 17px;
    min-width: 17px;
    height: 17px;
    margin-top: 2px;
    color: var(--fh-message-color);
}

.fh-message-copy strong {
    display: block;
    margin: 0 0 5px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.25;
}

.fh-message-copy p {
    margin: 0;
    color: var(--text-main);
    line-height: 1.5;
}

.fh-message-copy p + p {
    margin-top: 6px;
    color: var(--text-muted);
}

.fh-message-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 4px;
    background: rgba(0,0,0,0.16);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.fh-message-close:hover {
    color: #fff;
    border-color: var(--fh-message-color);
    background: rgba(255,255,255,0.07);
}

.fh-message-showcase {
    display: grid;
    gap: 12px;
}

.clan-table-wrap {
    overflow-x: auto;
}

.clan-leaderboard-box {
    padding: 0;
    background: transparent;
    border: 0;
}

.clan-leaderboard-preview {
    max-height: 285px;
}

.clan-leaderboard-box.expanded .clan-leaderboard-preview {
    max-height: none;
    overflow: visible;
}

.clan-leaderboard-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(
        to bottom,
        rgba(14, 18, 22, 0) 0%,
        rgba(14, 18, 22, 0.78) 48%,
        #0E1216 100%
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.clan-leaderboard-box.expanded .clan-leaderboard-overlay {
    opacity: 0;
    display: none;
}

.clan-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.clan-table th,
.clan-table td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-align: left;
    white-space: nowrap;
}

.clan-table th {
    color: var(--accent-gold);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
}

.clan-table th.sorted-asc::after {
    content: " ↑";
}

.clan-table th.sorted-desc::after {
    content: " ↓";
}

.clan-table tbody tr:hover {
    background: rgba(255,255,255,0.035);
}

.clan-table a {
    color: #fff;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.clan-table a:hover {
    color: var(--accent-gold);
}

.clan-table a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.clan-table a:hover::after {
    transform: scaleX(1);
}

.player-ships-table {
    min-width: 1010px;
}

.ship-player-table {
    min-width: 1040px;
}

.eu-player-index-table {
    min-width: 860px;
}

.eu-player-index-filter {
    margin-bottom: 26px;
}

.eu-player-index-table-wrap {
    overflow: visible;
}

.player-index-fh-head {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.player-index-fh-help svg {
    width: 15px;
    height: 15px;
}

.player-index-fh-note {
    margin-top: -4px;
}

.player-index-fh-note a {
    color: var(--accent-gold);
    text-decoration: none;
}

.player-index-fh-note a:hover {
    text-decoration: underline;
}

.fh-rating-page {
    display: grid;
    gap: 24px;
}

.ranked-ships-table {
    min-width: 1280px;
}

.ranked-ships-global-table {
    min-width: 1020px;
}

.ranked-ships-picker {
    grid-template-columns: minmax(240px, 1fr) 150px;
}

.ranked-global-filter-row {
    grid-template-columns: minmax(260px, 1.2fr) minmax(150px, 0.7fr) minmax(160px, 0.8fr) 140px 160px;
}

.ship-meta-filter-row {
    grid-template-columns: minmax(110px, 0.55fr) minmax(170px, 0.9fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(150px, 0.75fr) 140px;
}

.ship-meta-table {
    min-width: 1120px;
}

.ship-meta-row {
    cursor: pointer;
}

.ship-meta-row-open {
    background: rgba(197, 160, 89, 0.045);
}

.ship-meta-player-row {
    display: none;
}

.ship-meta-player-row.ship-meta-player-row-open {
    display: table-row;
}

.ship-meta-player-row > td {
    padding: 14px 12px 18px;
    background: rgba(0, 0, 0, 0.20);
}

.ship-meta-player-panel {
    display: grid;
    gap: 12px;
}

.ship-meta-player-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ship-meta-player-head strong {
    color: var(--text-light);
}

.ship-meta-player-head span,
.ship-meta-player-loading {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ship-meta-player-table-wrap {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.ship-meta-player-table {
    min-width: 820px;
}

.ship-meta-player-table th,
.ship-meta-player-table td {
    padding: 9px 10px;
}

.ranked-global-filter {
    margin-bottom: 36px;
}

.ranked-global-meta {
    margin-top: 10px;
}

.ranked-global-table-wrap {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.ranked-ships-global-table th,
.ranked-ships-global-table td {
    padding: 11px 10px;
}

.ranked-ships-global-table th:nth-child(1),
.ranked-ships-global-table td:nth-child(1),
.ranked-ships-global-table th:nth-child(3),
.ranked-ships-global-table td:nth-child(3),
.ranked-ships-global-table th:nth-child(5),
.ranked-ships-global-table td:nth-child(5) {
    text-align: center;
}

.nation-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 5px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 999px;
    background: rgba(255,255,255,0.045);
    font-size: 0.9rem;
    line-height: 1;
}

.ranked-top-player {
    display: grid;
    gap: 2px;
    max-width: 160px;
}

.ranked-top-player > a:first-child {
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranked-top-player-clan {
    width: max-content;
    color: var(--text-muted) !important;
    font-size: 0.78rem;
    padding-bottom: 2px;
}

.ranked-ships-season-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ranked-ships-season-form .ships-input {
    min-width: 240px;
}

.ship-player-leaderboard-panel {
    overflow: visible;
}

.ship-player-row-hidden {
    display: none;
}

.ship-player-loadmore {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 22px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.eu-clan-index-filter {
    margin-bottom: 26px;
}

.eu-clan-index-table {
    min-width: 720px;
}

.eu-clan-index-table th:first-child,
.eu-clan-index-table td:first-child {
    width: 48%;
}

.eu-clan-index-table th:nth-child(2),
.eu-clan-index-table td:nth-child(2) {
    width: 120px;
    white-space: nowrap;
}

.eu-clan-index-table th:nth-child(3),
.eu-clan-index-table td:nth-child(3),
.eu-clan-index-table th:nth-child(4),
.eu-clan-index-table td:nth-child(4) {
    width: 18%;
}

.player-ships-table th:last-child,
.player-ships-table td:last-child {
    width: 82px;
    min-width: 82px;
    text-align: center;
    padding-right: 20px;
}

.player-ship-name {
    color: #fff;
    font-weight: 700;
}

.table-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 3px;
    color: var(--accent-gold);
    background: rgba(197, 160, 89, 0.08);
    font-size: 0.72rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.table-expert-badge {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.ship-badge-table-image {
    width: 178px;
    height: 50px;
    object-fit: contain;
    object-position: center;
    filter: brightness(0) invert(1) opacity(0.50) drop-shadow(0 0 7px rgba(197, 160, 89, 0.16));
}

#shipBadgeTable .ship-badge-entry {
    display: grid;
    grid-template-columns: 188px minmax(180px, 1fr);
    align-items: center;
    column-gap: 16px;
    min-height: 58px;
}

#shipBadgeTable .ship-badge-name-line {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
}

#shipBadgeTable .player-ship-name {
    display: inline-block;
    color: #fff !important;
    line-height: 1.15;
    white-space: normal;
}

#shipBadgeTable .player-ship-name:hover {
    color: var(--accent-gold) !important;
}

#shipBadgeTable .ship-badge-kind-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: 2px;
    transform: translateY(1px);
}

.table-empty {
    color: var(--text-muted);
}

.rating-note-box {
    position: relative;
    margin: 0 0 18px;
    padding: 16px 52px 16px 18px;
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 5px;
    background: rgba(197, 160, 89, 0.07);
}

.rating-note-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    background: rgba(0,0,0,0.18);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rating-note-close:hover {
    color: #fff;
    border-color: rgba(197, 160, 89, 0.45);
    background: rgba(197, 160, 89, 0.12);
}

.rating-note-box strong {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rating-note-box p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.rating-note-box p + p {
    margin-top: 8px;
}

.rating-note-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 10px;
    font-size: 0.88rem;
}

.rating-note-colors span {
    color: #fff;
    font-weight: 400;
}

.rating-note-colors b {
    font-weight: 400;
}

.rating-value {
    display: inline-block;
    min-width: 54px;
    padding: 0;
    font-weight: normal;
    text-align: center;
    border: 0;
    background: transparent;
}

.ship-stats strong.rating-red {
    color: #ff8a8a;
}

.ship-stats strong.rating-orange {
    color: #ffb16f;
}

.ship-stats strong.rating-yellow {
    color: #f2d272;
}

.ship-stats strong.rating-green {
    color: #9fe0a9;
}

.ship-stats strong.rating-blue {
    color: #8fc8ff;
}

.ship-stats strong.rating-purple {
    color: #d7a7ff;
}

.ship-stats strong.rating-empty {
    color: var(--text-muted);
}

.rating-red {
    color: #ff8a8a;
}

.rating-orange {
    color: #ffb16f;
}

.rating-yellow {
    color: #f2d272;
}

.rating-green {
    color: #9fe0a9;
}

.rating-blue {
    color: #8fc8ff;
}

.rating-purple {
    color: #d7a7ff;
}

.rating-empty {
    color: var(--text-muted);
}

.wr-value {
    display: inline-block;
    font-weight: normal;
    color: #9fe0a9;
}

.wr-good {
    color: #9fe0a9;
}

.wr-warm {
    color: #f2d272;
}

.wr-muted {
    color: #ff8a8a;
}

.clan-leaderboard-row {
    text-decoration: none;
    color: inherit;
}

.command-category.command-category-open .clan-leaderboard-grid {
    max-height: 1200px;
}

.clan-rank {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    color: var(--accent-gold);
    border: 1px solid rgba(197, 160, 89, 0.35);
    background: rgba(197, 160, 89, 0.08);
    border-radius: 4px;
    font-weight: 700;
}
