:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --success-color: #10b981;
    --rank-bg: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  --main-bg: #000  ;
  --second-bg: #0C0D10;
  --third-bg: #111418;
  --border-color: #2c323c;
  
  --blue: #4dabf7;
  --blue-opacity: rgb(77 171 247 / 30%);
}

.weapons-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 28px;
    width: 90%;
    margin: 0 auto;
    padding: 25px 0;
    position: relative;
    z-index: 1;
}

.weapon-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--card-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    max-height: 340px;
    backdrop-filter: blur(10px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: cardAppear 0.6s ease forwards;
    margin-bottom: 20px;
    z-index: 2;
}

/* Top players */
.player-tooltip {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 330px;
    background: linear-gradient(145deg, rgba(23, 32, 48, 0.99), rgba(15, 23, 42, 0.99));
    border: 1px solid var(--primary-color);
    border-radius: 16px;
    padding: 16px;
    z-index: 1001;
    display: none;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.weapon-card:hover .player-tooltip {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.player-tooltip-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.player-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.player-item:hover {
    border-color: var(--primary-color);
    transform: translateX(1px);
}

.player-item:nth-child(1) {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.15), transparent);
    border-color: rgba(234, 179, 8, 0.3);
}

.player-item:nth-child(2) {
    background: linear-gradient(90deg, rgba(107, 114, 128, 0.15), transparent);
    border-color: rgba(107, 114, 128, 0.3);
}

.player-item:nth-child(3) {
    background: linear-gradient(90deg, rgba(185, 28, 28, 0.15), transparent);
    border-color: rgba(185, 28, 28, 0.3);
}

.player-wpnp-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

.player-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
}

.player-level {
    color: #60a5fa;
    font-weight: 700;
    background: rgba(96, 165, 250, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.player-kills {
    color: #ef4444;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.player-headshots {
    color: #10b981;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.weapon-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.weapon-card:nth-child(even) {
    animation-delay: 0.2s;
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.weapon-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
    z-index: 1000 !important;
    transform: translateY(-5px) scale(1.02);
}

.weapon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    position: relative;
}

.weapon-icon {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    object-fit: contain;
}

.weapon-name-wrapper {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.weapon-name-wrapper img {
    width: 170px;
    height: 140px;
    transform: rotate(5deg);
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.weapon-name-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weapon-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.weapon-rank {
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--rank-bg);
    color: white;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 800;
    min-width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease-in-out;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.stat-extra {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: 4px;
    font-weight: 400;
}

.progress-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    position: relative;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #22c55e);
    border-radius: 6px;
    position: relative;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: left;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.4), transparent);
}

.progress-value {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate__fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

.weapon-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.weapon-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}


.weapon-tag {
    font-size: 0.7rem;
    padding: 5px 10px;
    border-radius: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.weapon-caliber {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    width: fit-content;
    transition: all 0.3s ease;
}

.weapon-card:hover .weapon-caliber {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}


.weapon-tag--level {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    border: 1px solid #6366f1;
}

.weapon-tag--kills {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.weapon-tag--accuracy {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.weapon-tag--popularity {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.weapon-tag--survival {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border: 1px solid #8b5cf6;
}

.weapon-name-container {
    display: flex;
    flex-direction: column;
}

.map-tags-container {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.map-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.map-tag {
    font-size: 0.7rem;
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.map-tag--factory {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.map-tag--woods {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.map-tag--customs {
    background: rgba(249, 115, 22, 0.15);
    color: #fdba74;
}

.map-tag--reserve {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

.map-tag--shoreline {
    background: rgba(6, 182, 212, 0.15);
    color: #7dd3fc;
}

.map-tag--lighthouse {
    background: rgba(234, 179, 8, 0.15);
    color: #fde047;
}

.weapon-filters {
    position: sticky;
    top: 155px;
    z-index: 1;
    margin-bottom: 25px;
    margin-left: 90px;
    margin-right: 90px;
    padding: 20px;
    background-color: var(--second-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    backdrop-filter: blur(3);
    -webkit-backdrop-filter: blur(3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.search-box {
    margin-bottom: 20px;
}

.search-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    z-index: -1;
}

#weaponSearch {
    width: 50%;
    padding: 12px 16px;
    background: var(--third-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#weaponSearch::placeholder {
    color: var(--text-tertiary);
}

#weaponSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.dropdown-filters {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    position: relative;
    z-index: 10;
}

.dropdown-wrapper {
    position: relative;
    min-width: 200px;
}

.category-dropdown {
    width: 100%;
    padding: 10px 16px;
    background: var(--third-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    appearance: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    min-width: 180px;
    flex-grow: 1;
}

.category-dropdown:hover {
    border-color: var(--primary-color);
}

.category-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* options */
.category-dropdown option {
    background: var(--card-bg);
    color: var(--text-main);
    padding: 10px 16px;
    transition: background 0.2s ease;
}

.category-dropdown option:hover {
    background: var(--primary-color) !important;
}

.category-dropdown:disabled {
    opacity: 50%;
    cursor: not-allowed;
    background-color: var(--third-bg);
}

.custom-select__options {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    margin-top: 4px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-select__option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.custom-select__option:hover {
    background: var(--primary-color);
}

@media (max-width: 768px) {
    .dropdown-filters {
        flex-direction: column;
        gap: 8px;
    }

    .dropdown-wrapper {
        min-width: 100%;
    }
}

.dropdown-focused .category-dropdown {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.dropdown-focused::after {
    color: var(--primary-color);
}

.category-dropdown:not([disabled]):not([value="all"]) {
    border-color: #4d7ea8;
    box-shadow: 0 0 0 1px rgba(77, 126, 168, 0.5);
}