/* Minimalist Brutal Style */
body {
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    padding-top: 72px;
    line-height: 1.6;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #000 transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background: transparent;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: #000;
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

header {
    position: fixed;
    top: 0;
    left: 10%;
    right: 10%;
    background-color: #111;
    padding: 2px;
    border-radius: 12px;
    text-align: center;
    z-index: 1100;
}


nav {
    margin-top: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: bold;
}

nav a:hover {
    color: #ff0000;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

section {
    margin-bottom: 2rem;
    width: 100%;
}

#home-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

#home-info h2 {
    margin-bottom: 0;
}

#home-info h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.2rem;
}

#top-skins {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.market-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-start;
}

.filter-panel {
    position: fixed;
    left: 0;
    top: 3.5rem;
    bottom: 2rem;
    width: 280px;
    background-color: #111;
    border: 1px solid #444;
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 999;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.filter-panel::-webkit-scrollbar {
    display: none;
}

.filter-panel {
    scrollbar-width: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.filter-card {
    border: 1px solid #444;
    margin-bottom: 1rem;
    background-color: #222;
}

.filter-card summary {
    padding: 0.5rem;
    cursor: pointer;
    background-color: #333;
    border-bottom: 1px solid #444;
    font-weight: bold;
    list-style: none;
}

.filter-card summary:hover {
    background-color: #444;
}

.filter-card[open] summary {
    border-bottom: none;
}

.filter-card > div {
    padding: 0.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.wear-toggle-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.wear-toggle {
    cursor: pointer;
}

.wear-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.wear-toggle-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0.35rem 0.6rem;
    border: 1px solid #555;
    border-radius: 999px;
    background-color: #1a1a1a;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wear-toggle:hover .wear-toggle-pill {
    border-color: #888;
    background-color: #252525;
}

.wear-toggle input[type="checkbox"]:checked + .wear-toggle-pill {
    background-color: #ff0000;
    border-color: #ff3b3b;
    color: #fff;
}

.price-range-inputs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.price-input-wrap {
    position: relative;
    flex: 1;
}

.price-currency-prefix {
    position: absolute;
    left: 0.65rem;
    top: 35%;
    transform: translateY(-50%);
    color: #fff;
    pointer-events: none;
    font-weight: 700;
}

.price-range-input {
    width: 100%;
    box-sizing: border-box;
    padding-left: 1.45rem;
    text-align: center;
}

.filter-toggle {
    position: fixed;
    top: 3.5rem;
    left: 240px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: left 0.25s ease, border-color 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
    font-size: 1.1rem;
    font-weight: bold;
}

.market-wrapper.filters-closed .filter-panel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.market-wrapper.filters-closed .filter-toggle {
    left: 0;
    background-color: #111;
    border: 1px solid #444;
}

.market-content {
    margin-left: 290px;
    margin-right: calc(8vw + 2rem);
    flex: 1;
    min-width: 0;
    padding: 1rem;
    padding-top: 2rem;
    transition: margin-left 0.25s ease;
}

.market-wrapper.filters-closed .market-content {
    margin-left: 50px;
}

.gif-slot {
    position: fixed;
    right: 1rem;
    top: 5rem;
    bottom: 5rem;
    width: 8vw;
    background-color: #111;
    border-left: 0px solid #444;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 999;
}

.gif-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

main:has(.market-wrapper) {
    max-width: 100%;
    padding: 0;
    min-height: unset;
}

#skins-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.6rem;
}

.skin-card {
    position: relative;
    background-color: #111;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 0.6rem;
    box-sizing: border-box;
    text-align: center;
    transition: border-color 0.2s ease;
    overflow: hidden;
}

.skin-card:hover {
    border-color: #ff0000;
}

.skin-card.rarity-consumer {
    border-color: #7E7E7E;
    box-shadow: 0 0 10px rgba(60, 58, 59, 0.55), 0 0 18px rgba(60, 58, 59, 0.35);
}

.skin-card.rarity-industrial {
    border-color: #506493;
    box-shadow: 0 0 10px rgba(56, 66, 91, 0.55), 0 0 18px rgba(56, 66, 91, 0.35);
}

.skin-card.rarity-mil-spec {
    border-color: #4A4698;
    box-shadow: 0 0 10px rgba(49, 46, 102, 0.55), 0 0 18px rgba(49, 46, 102, 0.35);
}

.skin-card.rarity-restricted {
    border-color: #4A0D8A;
    box-shadow: 0 0 10px rgba(56, 29, 96, 0.55), 0 0 18px rgba(56, 29, 96, 0.35);
}

.skin-card.rarity-classified {
    border-color: #601F7C;
    box-shadow: 0 0 10px rgba(77, 20, 96, 0.55), 0 0 18px rgba(77, 20, 96, 0.35);
}

.skin-card.rarity-covert {
    border-color: #593333;
    box-shadow: 0 0 10px rgba(82, 45, 50, 0.55), 0 0 18px rgba(82, 45, 50, 0.35);
}

.skin-card.rarity-gold {
    border-color: #A68E42;
    box-shadow: 0 0 10px rgba(87, 78, 49, 0.6), 0 0 18px rgba(87, 78, 49, 0.4);
}

.skin-card.rarity-consumer:hover,
.skin-card.rarity-industrial:hover,
.skin-card.rarity-mil-spec:hover,
.skin-card.rarity-restricted:hover,
.skin-card.rarity-classified:hover,
.skin-card.rarity-covert:hover,
.skin-card.rarity-gold:hover {
    filter: brightness(1.05);
}

.skin-card.rarity-consumer:hover {
    box-shadow: 0 0 14px rgba(60, 58, 59, 0.7), 0 0 26px rgba(60, 58, 59, 0.45);
}

.skin-card.rarity-industrial:hover {
    box-shadow: 0 0 14px rgba(56, 66, 91, 0.7), 0 0 26px rgba(56, 66, 91, 0.45);
}

.skin-card.rarity-mil-spec:hover {
    box-shadow: 0 0 14px rgba(49, 46, 102, 0.7), 0 0 26px rgba(49, 46, 102, 0.45);
}

.skin-card.rarity-restricted:hover {
    box-shadow: 0 0 14px rgba(56, 29, 96, 0.7), 0 0 26px rgba(56, 29, 96, 0.45);
}

.skin-card.rarity-classified:hover {
    box-shadow: 0 0 14px rgba(77, 20, 96, 0.7), 0 0 26px rgba(77, 20, 96, 0.45);
}

.skin-card.rarity-covert:hover {
    box-shadow: 0 0 14px rgba(82, 45, 50, 0.7), 0 0 26px rgba(82, 45, 50, 0.45);
}

.skin-card.rarity-gold:hover {
    box-shadow: 0 0 14px rgba(87, 78, 49, 0.75), 0 0 26px rgba(87, 78, 49, 0.5);
}

.skin-card .buy-buttons {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-template-rows: 1fr;
    gap: 0.35rem;
    justify-content: center;
    align-items: center;
    align-content: center;
    background: rgba(0, 0, 0, 0.78);
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-top: 0;
}

.skin-card:hover .buy-buttons {
    opacity: 1;
}

.buy-button {
    display: inline-flex;
    width: 34px;
    height: 34px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #111;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.buy-button:hover {
    border-color: #ff0000;
    background-color: #222;
    transform: translateY(-2px);
}

.buy-button img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

#skin-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background-color: #111;
    border: 1px solid #444;
    padding: 0.75rem;
    border-radius: 8px;
    flex-wrap: wrap;
}

.skin-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.skin-item-meta img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #333;
}

.skin-item-meta h3 {
    margin: 0;
    font-size: 1rem;
}

.skin-item-meta p {
    margin: 0.25rem 0 0;
    color: #ccc;
    font-size: 0.9rem;
}

.skin-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-btn {
    appearance: none;
    border: 1px solid #444;
    background-color: #222;
    color: #fff;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.admin-btn:hover {
    border-color: #ff0000;
    background-color: #111;
}

.admin-btn.delete-btn {
    border-color: #661111;
}

.admin-btn.delete-btn:hover {
    background-color: #330000;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.admin-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0;
}

.admin-radio-group label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

.admin-radio-group input[type="radio"],
.admin-radio-group input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
}

#cancel-edit-button {
    border-color: #666;
    background-color: #222;
    display: none;
}

#cancel-edit-button:hover {
    background-color: #333;
}

.skin-card img {
    max-width: 100%;
    height: 240px;
    object-fit: contain;
}

.skin-card h3 {
    margin: 0.3rem 0;
    font-size: 0.85rem;
}

.skin-card p {
    margin: 0.2rem 0;
    font-size: 0.8rem;
}

.skin-card .skin-price {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.skin-float {
    display: block;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin: 0;
    text-align: left;
}

.skin-float-pattern-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 10%;
    box-sizing: border-box;
    margin: 0.1rem 0;
}

.skin-pattern {
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin: 0;
    text-align: right;
}

.skin-card a {
    color: #ff0000;
    text-decoration: none;
    font-weight: bold;
}

.skin-card a:hover {
    text-decoration: underline;
}

#skins-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
    width: 100%;
}

.skins-btn {
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.6rem;
    transition: all 0.3s ease;
}

.skins-btn:hover {
    border-color: #ff0000;
    color: #ff0000;
}

.skins-btn.active {
    background-color: #ff0000;
    border-color: #ff0000;
    color: #fff;
}

form {
    background-color: #111;
    padding: 1rem;
    border: 1px solid #444;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    box-sizing: border-box;
}

button {
    background-color: #ff0000;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background-color: #cc0000;
}

footer {
    background-color: #111;
    padding: 2px 10%;
    position: fixed;
    bottom: 0;
    left: 10%;
    right: 10%;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    margin: 0px;
}

footer a {
    color: #ff0000;
    font-weight: bold;
}

.market-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.market-top h2 {
    margin: 0;
}

.sort-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sort-label {
    font-size: 0.85rem;
    color: #aaa;
    font-weight: bold;
}

.sort-btn {
    background-color: #1a1a1a;
    color: #fff;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sort-btn:hover {
    background-color: #252525;
    border-color: #888;
}

.sort-btn.active {
    background-color: #ff0000;
    border-color: #ff3b3b;
    color: #fff;
}

#admin-login-section {
    max-width: 440px;
    margin: 0 auto 1.5rem;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background-color: #111;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 1rem;
}

#admin-session-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    background-color: #111;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

#admin-session-user {
    margin: 0;
    color: #bbb;
    font-size: 0.95rem;
}

#admin-logout-button {
    max-width: 140px;
}

.admin-form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.form-actions button {
    flex: 1;
    max-width: 150px;
}

.skin-search {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    box-sizing: border-box;
    border-radius: 4px;
    font-size: 1rem;
}

.skin-search::placeholder {
    color: #888;
}

.skin-search:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.2);
}

#giveaways-admin-section {
    margin-top: 1.5rem;
}

.giveaways-admin-note {
    margin-top: 0;
    color: #c5c5c5;
}

.giveaways-admin-form {
    background-color: #111;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 1rem;
}

.giveaways-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.giveaway-admin-card {
    background-color: #151515;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 0.8rem;
}

.giveaway-admin-card h3 {
    margin-top: 0;
    margin-bottom: 0.7rem;
}

.giveaway-admin-card input[type="checkbox"] {
    width: auto;
    margin-bottom: 0.8rem;
}

.giveaways-admin-actions {
    display: flex;
    gap: 0.7rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

#giveaways {
    width: 100%;
}

#giveaways h2 {
    margin-bottom: 0.4rem;
}

.giveaways-subtitle {
    margin-top: 0;
    color: #ccc;
    margin-bottom: 1.2rem;
}

.giveaways-status {
    margin-top: 0.9rem;
    color: #bbb;
    font-size: 0.9rem;
}

.giveaways-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.giveaway-card {
    background: linear-gradient(180deg, #171717 0%, #101010 100%);
    border: 1px solid #444;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.giveaway-daily {
    border-color: #2e7d32;
}

.giveaway-weekly {
    border-color: #c58b1a;
}

.giveaway-monthly {
    border-color: #9a2f2f;
}

.giveaway-badge {
    width: fit-content;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid #555;
    background-color: #1d1d1d;
}

.giveaway-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

.giveaway-card p {
    margin: 0;
    color: #d3d3d3;
}

.giveaway-paused {
    margin-top: 0.6rem;
    padding: 0.55rem 0.65rem;
    border: 1px dashed #666;
    border-radius: 8px;
    color: #bcbcbc;
    background-color: #111;
}

.giveaway-link {
    display: inline-block;
    width: fit-content;
    text-decoration: none;
    color: #fff;
    background-color: #ff0000;
    border: 1px solid #ff0000;
    border-radius: 8px;
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.giveaway-link:hover {
    background-color: #c70000;
    border-color: #c70000;
}

.gleam-slot {
    width: 100%;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    background-color: #0c0c0c;
    min-height: 420px;
}

.gleam-slot iframe {
    width: 100%;
    height: 420px;
    border: 0;
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .giveaways-admin-grid {
        grid-template-columns: 1fr;
    }

    .giveaways-grid {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: fixed;
        top: 3.4rem;
        left: 0;
        right: 0;
        width: 100%;
        bottom: auto;
        max-height: 55vh;
        border-left: none;
        border-right: none;
    }

    .filter-toggle {
        top: 3.7rem;
        left: calc(100% - 46px);
    }

    .market-content {
        margin-left: 0;
        padding: 1rem 0.75rem;
    }

    .market-wrapper.filters-closed .market-content {
        margin-left: 0;
    }

    .market-wrapper.filters-closed .filter-toggle {
        left: calc(100% - 46px);
    }

    #skins-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .giveaway-card {
        padding: 0.8rem;
    }

    .gleam-slot,
    .gleam-slot iframe {
        min-height: 360px;
        height: 360px;
    }

    #admin-session-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #admin-logout-button {
        max-width: none;
        width: 100%;
    }

    .skin-card img {
        height: 80px;
    }

    .skin-card h3 {
        font-size: 0.8rem;
    }

    .skin-card .skin-price {
        font-size: 1.05rem;
    }

    #skins-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    #skins-container {
        grid-template-columns: 1fr;
    }

    main {
        padding: 1rem;
    }
}