@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Syne:wght@600;700;800&display=swap');

.gm-container {
    max-width: 1500px;
    width: 95%;
    margin: 20px auto;
    font-family: 'Inter', sans-serif;
}

@keyframes gmFastFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
        visibility: hidden;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
}

.tier-columns-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.tier-columns-wrapper:active {
    cursor: grabbing;
}

.tier-columns-wrapper::-webkit-scrollbar {
    height: 8px;
}
.tier-columns-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
.tier-columns-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.tier-columns-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.tier-columns-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(4px, 1vw, 16px);
}

.tier-column {
    display: flex;
    flex-direction: column;
    background: rgba(13, 14, 18, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-height: 500px;
    opacity: 0;
    visibility: hidden;
    animation: gmFastFadeIn 0.4s ease-out forwards;
}

.tier-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tier-col-title {
    font-size: clamp(0.9rem, 1.2vw, 1.25rem);
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tier-col-icon {
    font-size: clamp(0.9rem, 1vw, 1.2rem);
    opacity: 0.9;
    color: var(--tier-color);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.col-tier-1 { --tier-color: #FFD700; --tier-bg-ht: rgba(255, 215, 0, 0.15); --tier-bg-lt: rgba(255, 215, 0, 0.05); border-bottom-color: var(--tier-color); }
.col-tier-2 { --tier-color: #E2E8F0; --tier-bg-ht: rgba(226, 232, 240, 0.15); --tier-bg-lt: rgba(226, 232, 240, 0.05); border-bottom-color: var(--tier-color); }
.col-tier-3 { --tier-color: #CD7F32; --tier-bg-ht: rgba(205, 127, 50, 0.15); --tier-bg-lt: rgba(205, 127, 50, 0.05); border-bottom-color: var(--tier-color); }
.col-tier-4 { --tier-color: #B19CD9; --tier-bg-ht: rgba(177, 156, 217, 0.15); --tier-bg-lt: rgba(177, 156, 217, 0.05); border-bottom-color: var(--tier-color); }
.col-tier-5 { --tier-color: #38A169; --tier-bg-ht: rgba(56, 161, 105, 0.15); --tier-bg-lt: rgba(56, 161, 105, 0.05); border-bottom-color: var(--tier-color); }

.tier-col-title { color: var(--tier-color); text-shadow: 0 0 10px rgba(255, 255, 255, 0.1); }

.tier-col-list {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 6px;
}

.tier-col-list .player-strip,
.gm-container .player-strip {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: clamp(6px, 1vw, 12px) !important;
    padding: clamp(4px, 0.5vw, 8px) clamp(6px, 1vw, 12px) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    min-height: unset !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: hidden;
}

.tier-col-list .player-strip::before,
.gm-container .player-strip::before {
    display: none !important;
}

.tier-col-list .player-strip:hover,
.gm-container .player-strip:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateX(3px) !important;
    box-shadow: none !important;
}

.tier-col-list .player-strip.sub-ht,
.gm-container .player-strip.sub-ht { 
    border-left-color: var(--tier-color) !important; 
    background: var(--tier-bg-ht) !important;
}
.tier-col-list .player-strip.sub-lt,
.gm-container .player-strip.sub-lt { 
    border-left-color: var(--tier-color) !important; 
    background: var(--tier-bg-lt) !important;
    opacity: 0.95; 
    filter: brightness(0.95); 
}

.tier-col-list .player-strip.sub-ht:hover,
.gm-container .player-strip.sub-ht:hover {
    opacity: 1;
    filter: brightness(1.1);
    box-shadow: -4px 0 15px -5px var(--tier-color) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}
.tier-col-list .player-strip.sub-lt:hover,
.gm-container .player-strip.sub-lt:hover {
    opacity: 1;
    filter: brightness(1);
    background: rgba(255, 255, 255, 0.03) !important;
}

.player-avatar-wrapper {
    width: clamp(24px, 2.5vw, 36px);
    height: clamp(24px, 2.5vw, 36px);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.player-avatar-3d {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tier-col-list .player-strip .player-info,
.gm-container .player-strip .player-info,
.player-info {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
}

.tier-col-list .player-strip .player-name,
.gm-container .player-strip .player-name,
.player-name {
    font-size: clamp(0.7rem, 0.9vw, 0.95rem) !important;
    font-weight: 700 !important;
    color: #E2E8F0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.2s ease;
    display: block !important;
    gap: 0 !important;
}

.tier-col-list .player-strip:hover .player-name,
.gm-container .player-strip:hover .player-name,
.player-strip:hover .player-name {
    color: #fff !important;
}

.sub-arrow {
    font-size: 1rem;
    flex-shrink: 0;
    color: var(--tier-color);
}
.sub-arrow.badge-ht {
    opacity: 0.9;
}
.sub-arrow.badge-lt {
    opacity: 0.5;
}

.tier-columns-grid .tier-column:nth-child(1) { animation-delay: 0s; }
.tier-columns-grid .tier-column:nth-child(2) { animation-delay: 0.08s; }
.tier-columns-grid .tier-column:nth-child(3) { animation-delay: 0.16s; }
.tier-columns-grid .tier-column:nth-child(4) { animation-delay: 0.24s; }
.tier-columns-grid .tier-column:nth-child(5) { animation-delay: 0.32s; }

.tier-col-list .player-strip.retired,
.gm-container .player-strip.retired {
    background: rgba(45, 12, 70, 0.85) !important;
    border-left: 4px solid #9932cc !important;
    border-left-color: #9932cc !important;
    opacity: 0.85;
}
.tier-col-list .player-strip.retired .player-name,
.gm-container .player-strip.retired .player-name {
    color: rgba(255, 255, 255, 0.65) !important;
    text-decoration: line-through !important;
    text-decoration-color: rgba(255, 255, 255, 0.45) !important;
}
.tier-col-list .player-strip.retired .sub-arrow,
.gm-container .player-strip.retired .sub-arrow {
    color: #ba55d3 !important;
    opacity: 0.7 !important;
}

.gm-container:not(.show-retired) .player-strip.retired {
    display: none !important;
}
.gm-container.show-retired .player-strip.retired {
    display: flex !important;
    animation: retiredCardFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes retiredCardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }
    100% {
        opacity: 0.85;
        transform: translateY(0);
    }
}
.gm-container.show-retired .empty-col.only-retired-empty {
    display: none !important;
}
.gm-container:not(.show-retired) .empty-col.only-retired-empty {
    display: block !important;
}

.empty-col {
    padding: 30px 10px;
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    font-style: italic;
}

body.light-mode .tier-column {
    background: #2B2D31;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.light-mode .tier-column-header {
    background: #1E1F22;
}
body.light-mode .player-strip.sub-ht:hover,
body.light-mode .player-strip.sub-lt:hover {
    background: rgba(255, 255, 255, 0.03);
}
body.light-mode .player-name {
    color: #F2F3F5 !important;
}
body.light-mode .player-strip:hover .player-name {
    color: #FFFFFF !important;
}

@media (max-width: 1200px) {
    .tier-columns-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 850px) {
    .tier-columns-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tier-column {
        min-height: auto;
    }
}

@media (max-width: 550px) {
    .tier-columns-grid {
        grid-template-columns: 1fr;
    }
    .tier-columns-wrapper {
        padding-bottom: 10px;
    }
    .gm-container {
        width: 100%;
        padding: 0 10px;
    }
    .tier-col-title {
        font-size: 1.1rem;
    }
    .player-strip {
        padding: 8px 12px;
    }
}

@media (min-width: 1951px) {
    .gm-container {
        max-width: 1500px;
        width: 95%;
        margin: 20px auto;
    }
    .tier-columns-grid {
        gap: 16px;
    }
    .tier-col-list .player-strip {
        padding: 8px 14px !important;
    }
}
