@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
* { font-family: 'Inter', sans-serif; box-sizing: border-box; }
body { background: radial-gradient(circle at top, #14171f, #090a0d 60%); color: #e8e8e8; margin: 0; }
a { text-decoration: none; }

.bg-primary { padding: 32px 20px; background: linear-gradient(120deg, #1e2a45, #0d0f14) !important; border-bottom: none; box-shadow: 0 4px 20px rgba(0,0,0,0.5); text-align: center; }
.bg-primary h2 { font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 0; letter-spacing: -0.02em; }

/* ===== Toolbar ===== */
.toolbar {
    max-width: 1440px;
    margin: 20px auto 0;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tab {
    background: #1a1d24; color: #9aa3b5; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px; padding: 8px 18px; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s ease; display: inline-block;
}
.cat-tab:hover { color: #e8e8e8; border-color: rgba(90,130,190,0.4); }
.cat-tab.active { background: linear-gradient(135deg, #4a7bc4, #325a91); color: #fff; border-color: transparent; }

.team-toggle { display: flex; gap: 4px; background: #1a1d24; border-radius: 999px; padding: 4px; border: 1px solid rgba(255,255,255,0.08); }
.team-btn { color: #9aa3b5; padding: 6px 18px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.team-btn.active { background: linear-gradient(135deg, #4a7bc4, #325a91); color: #fff; }
.team-btn:not(.active):hover { color: #e8e8e8; }

.search-box {
    background: #1a1d24; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
    color: #e8e8e8; padding: 9px 16px; font-size: 0.85rem; min-width: 220px; outline: none;
}
.search-box::placeholder { color: #6d7688; }
.search-box:focus { border-color: #5a82be; box-shadow: 0 0 0 3px rgba(90,130,190,0.2); }

/* ===== Gallery header ===== */
.gallery-header { max-width: 1440px; margin: 24px auto 0; padding: 0 24px; }
.gallery-header h3 { font-size: 1.15rem; font-weight: 700; margin: 8px 0 0; }
.back-link { color: #6a93c9; font-size: 0.85rem; font-weight: 600; }
.back-link:hover { color: #8fb0dd; }

/* ===== Grid ===== */
.card-group { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; padding: 24px; max-width: 1440px; margin: 0 auto; }
.card-group .col-sm-2 { width: 100%; max-width: none; flex: none; padding: 0; }

/* ===== Weapon list cards (linked) ===== */
.weapon-card-link { display: block; color: inherit; }
.card { background: linear-gradient(160deg, #1c2029, #14161c); border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; overflow: hidden; transition: transform 0.2s cubic-bezier(.2,.8,.2,1), box-shadow 0.2s ease, border-color 0.2s ease; height: 100%; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 16px 40px rgba(0,0,0,0.55); border-color: rgba(90,130,190,0.4); }
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-header { background: transparent; border: none; padding: 0 0 10px 0; }
.card-title.item-name, .card-title { font-weight: 700; font-size: 0.82rem; color: #f5f5f5; margin: 0; line-height: 1.3; min-height: 2.2em; }
.skin-image { width: 100%; max-width: 140px; aspect-ratio: 4 / 3; object-fit: contain; background: radial-gradient(circle, #1a1d24, #101217); border-radius: 10px; margin: 4px auto 10px; padding: 10px; }
.card-footer { background: rgba(0,0,0,0.25); border-top: 1px solid rgba(255,255,255,0.06); padding: 10px; font-size: 0.75rem; color: #8a92a3; text-align: center; font-weight: 600; }

/* ===== Skin gallery tiles (click-to-select, no dropdown) ===== */
.skin-tile-form { margin: 0; }
.skin-tile {
    width: 100%; background: linear-gradient(160deg, #1c2029, #14161c);
    border: 2px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 14px;
    cursor: pointer; transition: all 0.15s ease; display: flex; flex-direction: column; align-items: center;
    color: #e8e8e8;
}
.skin-tile:hover { border-color: rgba(90,130,190,0.5); transform: translateY(-4px); }
.skin-tile.selected { border-color: #4a7bc4; box-shadow: 0 0 0 3px rgba(74,123,196,0.3); }
.skin-tile .tile-name { font-size: 0.78rem; font-weight: 600; margin-top: 6px; text-align: center; }

/* ===== Knife select bar ===== */
.knife-select-bar { max-width: 1440px; margin: 0 auto 20px; padding: 0 24px; }

/* ===== Wear panel ===== */
.wear-panel { max-width: 500px; margin: 10px auto 40px; padding: 20px 24px; background: #14161c; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; }
.wear-panel h5 { font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; }
.wear-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wear-form select, .wear-form input { flex: 1; min-width: 120px; }

.form-control.select, select.form-control, input.form-control {
    background: #0f1115; color: #e8e8e8; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; font-size: 0.8rem; padding: 7px 10px;
}
.form-control.select:focus, input.form-control:focus { border-color: #5a82be; box-shadow: 0 0 0 3px rgba(90,130,190,0.2); outline: none; }

/* ===== Buttons ===== */
.btn { border-radius: 8px; font-size: 0.8rem; font-weight: 600; padding: 8px 18px; border: none; transition: transform 0.1s ease; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: linear-gradient(135deg, #4a7bc4, #325a91); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, #5588d1, #3a679f); }
.btn-danger { background: linear-gradient(135deg, #c0555a, #98383d); color: #fff; }
.btn-danger:hover { background: linear-gradient(135deg, #cc6469, #a5424a); }

/* ===== Footer ===== */
footer { border-top: 1px solid rgba(255,255,255,0.06) !important; text-align: center; padding: 24px; opacity: 0.6; }
footer a { color: #6a93c9; }

@media (max-width: 600px) {
    .card-group { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 16px; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .search-box { min-width: 0; }
}

.section-heading { max-width: 1440px; margin: 24px auto 0; padding: 0 24px; font-size: 1rem; font-weight: 700; color: #9aa3b5; text-transform: uppercase; letter-spacing: 0.05em; }
