.players-gallery-section {
    padding: 2rem 1rem;
    max-width: 90%;
    margin: 0 auto;
}

.section-title {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 15px;
    padding: 1rem 0;
}

.player-card {
    background: linear-gradient(145deg,
            rgba(30, 41, 59, 0.7),
            rgba(15, 23, 42, 0.7));
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: var(--shadow-md);
    display: flex;
    margin: 0;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease;
}

.player-card:hover {
    border-color: var(--primary-light);
}

.player-card {
    animation: fadeIn 0.5s ease forwards;
}

.player-image-container {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.player-image.loading,
.modal-player-image.loading {
    background: linear-gradient(90deg,
            var(--bg-card) 25%,
            var(--bg-card-light) 50%,
            var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}

.loading-spinner-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.player-image-container.loading .loading-spinner-small {
    display: block;
}


@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1.5);
    }
}

.vote-animation {
    animation: floatUp 1s ease-out forwards;
}

@media (min-width: 768px) {
    .player-image-container {
        height: 240px;
    }
}

@media (min-width: 1024px) {
    .player-image-container {
        height: 280px;
    }
}

.player-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px;
    background: linear-gradient(to bottom, var(--bg-darker), var(--bg-card));
}

.player-card:hover .player-image {
    transform: scale(1.05);
}

.player-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.9), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}

.player-image-container:hover .player-image-overlay {
    opacity: 1;
}

.view-image-text {
    color: white;
    background: rgba(99, 102, 241, 0.8);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-image-container:hover .view-image-text {
    transform: translateY(0);
}

.player-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.player-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 1rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.5rem;
}

.player-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem 0.8rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 19px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card-light);
    color: var(--text-light);
    flex: 1;
    min-width: 0;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.action-btn:disabled:hover {
    background: var(--bg-card-light) !important;
    color: var(--text-light) !important;
    box-shadow: none !important;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.like-btn:hover {
    background: var(--success);
    color: rgb(255, 78, 78);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.dislike-btn:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.dislike-btn .action-icon {
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.action-count {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.drip-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.drip-player-modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.drip-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
}

.drip-modal-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border-radius: 20px;
    padding: 1.5rem;
    width: 100%;
    height: 90%;
    border: 1px solid var(--border-light);
    animation: contentSlideIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes contentSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card-light);
    color: var(--text-white);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.modal-close:hover {
    background: var(--danger);
    transform: rotate(90deg);
}

.modal-player-image-container {
    width: 100%;
    height: 85%;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(to bottom, var(--bg-darker), var(--bg-card));
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-player-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
}

.modal-player-details {
    text-align: center;
}

.modal-player-name {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions .action-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    min-width: 120px;
}

@media (max-width: 640px) {
    .player-image-container {
        height: 180px;
    }

    .player-name {
        font-size: 1rem;
    }

    .modal-content {
        padding: 1rem;
        max-width: 320px;
    }

    .modal-player-image-container {
        height: 280px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .action-btn {
        min-width: 100%;
    }
}

@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes dislikeAnimation {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-8deg);
    }

    75% {
        transform: rotate(8deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.liked {
    animation: likeAnimation 0.4s ease;
    background: var(--success) !important;
    color: white !important;
}

.disliked {
    animation: dislikeAnimation 0.4s ease;
    background: var(--danger) !important;
    color: white !important;
}

.player-image.loading {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-light) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.player-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.player-actions button:disabled:hover {
    transform: none !important;
    background: var(--bg-card-light) !important;
    color: var(--text-light) !important;
    box-shadow: none !important;
}

.player-stats {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
    justify-content: center;
}

.rank-badge,
.score-badge {
    background: rgba(99, 102, 241, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.score-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.voted-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: inline-block;
    animation: fadeIn 0.3s ease;
}

.player-stats span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .player-stats {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .player-stats span {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
}