* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    background-color: rgb(18, 18, 18);
    color: rgb(222, 222, 222);
    min-height: 100vh;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    border: 4px solid rgba(141, 181, 230, 0.2);
    border-top-color: rgb(141, 181, 230);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    font-size: 1.2rem;
    color: rgb(141, 181, 230);
    text-align: center;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    transition: opacity 0.3s ease;
}

h1 {
    color: rgb(141, 181, 230);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.3rem;
}

h2 {
    color: rgb(255, 255, 255);
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-transform: uppercase;
    display: inline-block;
    padding-bottom: 5px;
}

.auth-section {
    background-color: rgb(28, 28, 28);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px rgba(200, 200, 200, 0.25) solid;
}

.auth-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.auth-btn {
    background-color: rgba(141, 181, 230, 0.2);
    border: 1px solid rgb(141, 181, 230);
    color: rgb(141, 181, 230);
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.auth-btn:hover {
    background-color: rgba(141, 181, 230, 0.4);
    box-shadow: 0 0 15px rgba(141, 181, 230, 0.5);
    transform: translateY(-2px);
}

.user-info {
    background-color: rgb(28, 28, 28);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px rgba(200, 200, 200, 0.25) solid;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-label {
    color: rgb(141, 181, 230);
    font-weight: bold;
    font-size: 1.1rem;
}

.user-value {
    color: rgb(255, 255, 255);
    font-size: 1.1rem;
}

.knife-section,
.glove-section {
    background-color: rgb(28, 28, 28);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.knife-section h2,
.glove-section h2 {
    margin-bottom: 20px;
}

.weapon-categories {
    margin-bottom: 80px;
}

.category-box {
    background-color: rgb(28, 28, 28);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px rgba(200, 200, 200, 0.25) solid;
    transition: all 0.3s ease;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px;
    background-color: rgba(141, 181, 230, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-header:hover {
    background-color: rgba(141, 181, 230, 0.2);
}

.category-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: rgb(141, 181, 230);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-count {
    font-size: 1rem;
    color: rgb(170, 170, 170);
}

.category-arrow {
    font-size: 1.5rem;
    color: rgb(141, 181, 230);
    transition: transform 0.3s ease;
}

.category-box.expanded .category-arrow {
    transform: rotate(180deg);
}

.weapons-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
}

.category-box.expanded .weapons-grid {
    display: grid;
}

.weapon-card {
    background-color: rgba(18, 18, 18, 0.8);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(200, 200, 200, 0.2);
    transition: all 0.3s ease;
}

.weapon-card:hover {
    border-color: rgb(141, 181, 230);
    box-shadow: 0 0 15px rgba(141, 181, 230, 0.3);
}

.weapon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.weapon-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: rgb(255, 255, 255);
}

.team-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 4px;
    cursor: pointer;
}

.team-badge.ct {
    background-color: rgba(92, 158, 255, 0.2);
    border: 1px solid rgb(92, 158, 255);
    color: rgb(92, 158, 255);
}

.team-badge.t {
    background-color: rgba(255, 140, 66, 0.2);
    border: 1px solid rgb(255, 140, 66);
    color: rgb(255, 140, 66);
}

.team-badge.both {
    background: linear-gradient(
        90deg,
        rgba(92, 158, 255, 0.2) 0%,
        rgba(255, 140, 66, 0.2) 100%
    );
    border: 1px solid rgb(141, 181, 230);
    color: rgb(141, 181, 230);
}

.team-badge.active {
    opacity: 1;
    box-shadow: 0 0 10px currentColor;
}

.team-badge.inactive-in-both {
    opacity: 0.5;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    width: 100%;
    padding: 12px 35px 12px 12px;
    background-color: rgba(18, 18, 18, 0.9);
    border: 1px solid rgba(200, 200, 200, 0.3);
    border-radius: 6px;
    color: rgb(222, 222, 222);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select-trigger:hover {
    border-color: rgb(141, 181, 230);
}

.select-trigger.active {
    border-color: rgb(141, 181, 230);
    box-shadow: 0 0 10px rgba(141, 181, 230, 0.3);
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgb(141, 181, 230);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.select-trigger.active + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background-color: rgb(28, 28, 28);
    border: 1px solid rgb(141, 181, 230);
    border-radius: 6px;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.select-dropdown.show {
    display: block;
}

.select-option {
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(200, 200, 200, 0.1);
}

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

.select-option:hover {
    background-color: rgba(141, 181, 230, 0.2);
}

.rarity-blue {
    color: rgb(75, 105, 255);
}
.rarity-purple {
    color: rgb(136, 71, 255);
}
.rarity-pink {
    color: rgb(211, 44, 230);
}
.rarity-red {
    color: rgb(235, 75, 75);
}
.rarity-gold {
    color: rgb(255, 215, 0);
}

.save-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(18, 18, 18, 0.98) 0%,
        rgba(18, 18, 18, 0.95) 50%,
        transparent 100%
    );
    padding: 20px;
    text-align: center;
    z-index: 999;
}

.save-btn {
    background: linear-gradient(
        135deg,
        rgb(76, 175, 80) 0%,
        rgb(69, 160, 73) 100%
    );
    border: none;
    color: white;
    padding: 18px 60px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
}

.save-btn:active {
    transform: translateY(0);
}

.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: bold;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.success {
    background-color: rgba(76, 175, 80, 0.5);
    border: 1px solid rgb(76, 175, 80);
}

.status-message.error {
    background-color: rgba(255, 82, 82, 0.5);
    border: 1px solid rgb(255, 82, 82);
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: rgba(40, 40, 50, 0.6);
}

::-webkit-scrollbar-thumb {
    background: rgb(141, 181, 230);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(120, 160, 210);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media screen and (max-width: 768px) {
    .weapons-grid {
        grid-template-columns: 1fr;
    }

    .user-info {
        flex-direction: column;
    }

    .save-btn {
        padding: 15px 40px;
        font-size: 1rem;
    }
}
