@import url('case_gradients.css');

/* Microheader Styles */
.microheader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    /* Increased to be definitely on top of most elements */
    background: #1a0b2e !important;
    /* solid fallback */
    background: linear-gradient(120deg, var(--purple-darker) 0%, var(--purple-dark) 100%) !important;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 2px solid rgba(107, 42, 163, 0.25);
    box-shadow: 0 8px 32px 0 rgba(59, 19, 87, 0.25);
    transform: translateY(-100%);
    transition: transform 0.25s ease-out;
    display: block;
    will-change: transform;
}

.microheader.visible {
    transform: translateY(0);
    display: block;
}

.microheader-content {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 1% 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    background: rgba(59, 19, 87, 0.10);
    box-shadow: 0 2px 12px rgba(107, 42, 163, 0.10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.microheader-logo {
    flex-shrink: 0;
    /* Prevent logo from shrinking */
    display: flex;
    align-items: center;
    min-width: 120px;
    /* Minimum width to prevent squashing */
}

.microheader-logo a {
    display: block;
    height: 40px;
    /* Fixed height for logo container */
}

.microheader-logo-img {
    height: 40px;
    width: auto;
    /* Maintain aspect ratio */
    max-width: none;
    /* Allow full width */
    transform: none;
    transition: transform 0.3s ease;
    object-fit: contain;
    /* Ensure proper scaling */
}

.microheader-logo-full {
    display: block;
}

.microheader-logo-small {
    display: none;
}

.microheader-logo:hover .microheader-logo-img {
    transform: scale(1.05);
}

/* Microheader Search */
.microheader-search {
    flex: 1;
    margin: 0 12px;
    position: relative;
    display: flex;
    align-items: center;
}

/* Limit width only for skin search on home.html */
.microheader-search .skin-search-row {
    max-width: 700px;
    width: 100%;
    flex-wrap: nowrap;
}

/* Unify styles for SkinType dropdown and Search input in microheader */
.microheader .skin-type-select-wrap,
.microheader .skin-name-input-wrap {
    flex-shrink: 1;
    min-width: 0;
}

.microheader .skin-type-select-wrap {
    flex: 0 1 auto;
    width: 150px;
    min-width: 100px;
}

.microheader .skin-name-input-wrap {
    flex: 1 1 auto;
    min-width: 120px;
}

/* Make SkinType dropdown and Search input identical in microheader - matching static pages */
.microheader .skin-type-selected,
.microheader .skin-name-input-wrap input {
    height: 40px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 48px 8px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.microheader .skin-name-input-wrap input {
    padding: 8px 16px 8px 40px;
}

.microheader .skin-name-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.microheader .skin-type-selected:hover,
.microheader .skin-name-input-wrap input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.microheader .skin-type-selected.open,
.microheader .skin-type-selected:focus,
.skin-type-selected.open {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    box-shadow: 0 0 20px rgba(126, 34, 206, 0.1);
    outline: none;
}

.skin-type-selected.open {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    /* Hide bottom border to merge with dropdown */
    z-index: 2001;
    /* Ensure it stays above dropdown border */
}

/* Specific override for microheader open state to fix border radius */
.microheader .skin-type-selected.open,
.microheader .skin-name-input-wrap.open input {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    z-index: 2001;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
}

/* Ensure selected skin badges align with 36px controls in microheader */
.microheader .selected-skins {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.microheader .selected-skin-badge {
    height: 40px;
    min-height: 40px;
    border-radius: 20px;
    padding: 0 12px 0 8px;
}

.microheader .selected-skin-badge img {
    width: 40px;
    height: 28px;
    margin-right: 8px;
}

.microheader .selected-skin-badge span {
    font-size: 13px;
}

.microheader .skin-type-selected .arrow {
    right: 16px;
}

.microheader .skin-name-input-wrap .search-dropdown {
    top: calc(100% + 6px);
}

/* Responsive behavior for microheader search */
@media (max-width: 1200px) {
    .microheader .skin-type-select-wrap {
        width: 150px;
    }

    .microheader .skin-name-input-wrap {
        min-width: 150px;
    }
}

@media (max-width: 1000px) {
    .microheader-search .skin-search-row {
        max-width: 500px;
    }

    .microheader .skin-type-select-wrap {
        width: 130px;
    }

    .microheader .skin-name-input-wrap {
        min-width: 120px;
    }

    .microheader .skin-type-selected,
    .microheader .skin-name-input-wrap input {
        font-size: 13px;
        height: 34px;
    }
}


.microheader-search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 8px 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.microheader-search-container:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.microheader-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: "Outfit", "Montserrat", sans-serif;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    padding: 0;
    margin-right: 8px;
}

.microheader-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.microheader-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.microheader-search-btn:hover {
    color: #fff;
}

.microheader-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
}

/* Hide all microheader dropdowns when microheader is not visible */
.microheader:not(.visible) .microheader-search-dropdown,
.microheader:not(.visible) #micro-skin-search-dropdown,
.microheader:not(.visible) #micro-author-search-dropdown,
.microheader:not(.visible) .author-search-dropdown {
    display: none !important;
}

.microheader-search-dropdown.show {
    display: block;
}

/* Selected skins bar under microheader */
.selected-skins.micro-selected {
    padding: 8px 2rem 8px 2rem;
    gap: 10px;
    background: rgba(34, 31, 72, 0.65);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 18px rgba(59, 19, 87, 0.18);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: none;
}

.selected-skins.micro-selected:has(.skin-chip) {
    display: flex;
    top: 60px;
}

/* No margin-top needed - microheader is fixed and floats above content */

.microheader-search-item {
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.microheader-search-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.microheader-search-item:last-child {
    border-bottom: none;
}

/* Page search results counter */
.microheader-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(59, 19, 87, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(107, 42, 163, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.microheader-search-results.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#search-result-count {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    display: block;
    text-align: center;
    min-width: 120px;
}

.search-nav-btn {
    background: none;
    border: none;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.search-nav-btn:hover {
    opacity: 0.7;
}

.search-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.search-nav-btn svg {
    width: 18px;
    height: 18px;
}

/* Clear search button */
.microheader-clear-search-btn {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.microheader-clear-search-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.microheader-clear-search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.microheader-clear-search-btn svg {
    width: 14px;
    height: 14px;
}

/* Microheader search dropdown items */
.microheader-search-dropdown .search-dropdown-item {
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.microheader-search-dropdown .search-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.microheader-search-dropdown .search-dropdown-item:last-child {
    border-bottom: none;
}

.microheader-search-dropdown .search-dropdown-price {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* Microheader Filters */
.microheader-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

/* Microheader skin search dropdown needs spacing */
.microheader-search .search-dropdown,
#micro-skin-search-dropdown {
    margin-top: 8px;
}

.microheader-favorites-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
}

.microheader-favorites-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.microheader-favorites-btn.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.microheader-favorites-btn:active {
    transform: scale(0.95);
}

.microheader-price-filter {
    display: flex;
    align-items: center;
}

.microheader-price-slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0 12px;
    backdrop-filter: none;
    transition: all 0.3s ease;
    height: 40px;
    width: 180px;
}

.microheader-price-slider-container:hover {
    background: transparent;
    border-color: transparent;
}

.microheader-price-slider {
    width: 90px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    flex: none;
}

.microheader-price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.microheader-price-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.microheader-price-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.microheader-price-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.microheader-current-price {
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
    width: 50px;
    min-width: 50px;
    text-align: right;
    flex: none;
}

.microheader-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.microheader-clear-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.microheader-clear-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;

    transform: translateY(0);
}

.microheader-social {
    display: flex;
    align-items: center;
    gap: 4px;
}

.microheader-social a {
    background-color: rgba(107, 42, 163, 0.13);
    padding: 0 8px;
    height: 40px;
    width: 40px;
    min-width: 40px;
    border-radius: 6px;
    border: 1.5px solid rgba(107, 42, 163, 0.18);
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 19, 87, 0.06);
    margin: 0;
}

.microheader-social a:hover {
    background-color: rgba(107, 42, 163, 0.22);
    box-shadow: 0 4px 16px rgba(107, 42, 163, 0.10);
    transform: none;
}

.microheader-social a img {
    filter: brightness(0) invert(1) !important;
    -webkit-filter: brightness(0) invert(1) !important;
    width: 16px;
    height: 16px;
}

.microheader-balance-block {
    display: flex;
    align-items: center;
    background-color: rgba(107, 42, 163, 0.13);
    padding: 0 12px;
    height: 40px;
    min-width: 40px;
    border-radius: 6px;
    border: 1.5px solid rgba(107, 42, 163, 0.18);
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(59, 19, 87, 0.06);
    margin-right: 0;
    margin-left: 0;
    font-weight: 600;
    font-size: 0.9em;
    color: #22c55e;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.microheader-balance-block:hover {
    background-color: rgba(107, 42, 163, 0.22);
    box-shadow: 0 4px 16px rgba(107, 42, 163, 0.10);
}

.microheader-balance-label {
    font-size: 0.9em;
    color: #22c55e;
    margin-right: 2px;
}

.microheader-balance-value {
    font-size: 0.9em;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 6px rgba(34, 197, 94, 0.10);
}

.microheader-balance-coin {
    height: 22px;
    width: 22px;
    margin-right: 4px;
    vertical-align: middle;
    display: inline-block;
}

.microheader-profile {
    border-radius: 6px;
    background: rgba(107, 42, 163, 0.18);
    border: 1.5px solid rgba(107, 42, 163, 0.22);
    box-shadow: 0 2px 8px rgba(59, 19, 87, 0.10);
    padding: 0 12px 0 8px;
    height: 40px;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 8px;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    justify-content: center;
    text-decoration: none;
}

.microheader-profile:hover {
    background: rgba(107, 42, 163, 0.28);
    box-shadow: 0 4px 16px rgba(107, 42, 163, 0.13);
}

.microheader-profile-username {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.92;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    user-select: text;
    text-shadow: 0 1px 6px rgba(59, 19, 87, 0.18);
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.microheader-profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #2a0e41;
    border: 1.5px solid rgba(107, 42, 163, 0.22);
}

.microheader-auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    padding: 0 16px;
    background: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
    position: relative;
    overflow: hidden;
}

.microheader-auth span {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

.microheader-auth i {
    font-size: 16px;
    margin-right: 6px;
    position: relative;
    z-index: 2;
}

.microheader-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
    background-size: 200% 100%;
}

.microheader-auth:hover {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
    transform: translateY(-1px) scale(1.03);
}

.microheader-auth:hover::before {
    opacity: 1;
    animation: shine 2s linear infinite;
}

/* Microheader Responsive Design */

/* Large screens (1200px+) */
@media (min-width: 1200px) {
    .microheader-search {
        max-width: 900px;
        margin: 0 50px;
    }

    .microheader-filters {
        margin-left: 40px;
    }

    .microheader-nav {
        margin-left: 40px;
    }

    /* Show social media and balance on very large screens */
    .microheader-social {
        display: flex;
    }

    .microheader-balance-block {
        display: flex;
    }

    /* Show the full logo on large screens. */
    .microheader-logo-full {
        display: block;
    }

    .microheader-logo-small {
        display: none;
    }

    .microheader-logo {
        min-width: 150px;
        /* More space for the full logo */
    }
}

/* Extra large screens (1400px+) */
@media (min-width: 1400px) {
    .microheader-search {
        max-width: 1000px;
        margin: 0 60px;
    }

    .microheader-filters {
        margin-left: 50px;
    }

    .microheader-nav {
        margin-left: 50px;
    }

    /* Show all elements on very large screens */
    .microheader-social {
        display: flex;
    }

    .microheader-balance-block {
        display: flex;
    }

    .microheader-logo-full {
        display: block;
    }

    .microheader-logo-small {
        display: none;
    }

    .microheader-social a {
        width: 40px;
        height: 40px;
    }

    .microheader-balance-block {
        padding: 8px 16px;
    }

    .microheader-balance-value {
        font-size: 15px;
    }

    .microheader-profile-username {
        font-size: 15px;
    }
}

/* Desktop screens (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .microheader-search {
        max-width: 700px;
        margin: 0 35px;
    }

    .microheader-filters {
        margin-left: 25px;
    }

    .microheader-nav {
        margin-left: 25px;
    }

    /* Hide social media and balance on desktop screens */
    .microheader-social {
        display: none;
    }

    .microheader-balance-block {
        display: none;
    }

    .microheader-logo {
        min-width: 80px;
    }
}

/* Medium screens (768px - 991px) - Hide social media and balance */
@media (min-width: 768px) and (max-width: 991px) {
    .microheader-social {
        display: none;
    }

    .microheader-balance-block {
        display: none;
    }

    .microheader-logo-full {
        display: none;
    }

    .microheader-logo-small {
        display: block;
    }

    .microheader-logo {
        min-width: 70px;
    }
}

/* Tablet landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .microheader-search {
        max-width: 500px;
        margin: 0 25px;
    }

    .microheader-filters {
        margin-left: 20px;
        gap: 8px;
    }

    .microheader-nav {
        margin-left: 20px;
        gap: 15px;
    }

    .microheader-social {
        gap: 8px;
    }

    .microheader-social a {
        width: 32px;
        height: 32px;
    }

    .microheader-balance-block {
        padding: 6px 12px;
    }

    .microheader-balance-value {
        font-size: 13px;
    }

    .microheader-profile-username {
        font-size: 13px;
    }
}

/* Tablet portrait (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .microheader-search {
        max-width: 400px;
        margin: 0 20px;
    }

    .microheader-filters {
        margin-left: 15px;
        gap: 6px;
    }

    .microheader-nav {
        margin-left: 15px;
        gap: 12px;
    }

    /* Hide social media and balance on smaller screens */
    .microheader-social {
        display: none;
    }

    .microheader-balance-block {
        display: none;
    }

    /* Switch to small logo */
    .microheader-logo-full {
        display: none;
    }

    .microheader-logo-small {
        display: block;
    }

    .microheader-social a {
        width: 28px;
        height: 28px;
    }

    .microheader-balance-block {
        padding: 5px 10px;
    }

    .microheader-balance-value {
        font-size: 12px;
    }

    .microheader-profile-username {
        font-size: 12px;
    }

    .microheader-favorites-btn,
    .microheader-clear-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .microheader-price-slider-container {
        min-width: 80px;
    }

    .microheader-current-price {
        font-size: 11px;
    }
}

/* Small tablets (481px - 600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .microheader-search {
        max-width: 300px;
        margin: 0 15px;
    }

    .microheader-filters {
        margin-left: 10px;
        gap: 4px;
    }

    .microheader-nav {
        margin-left: 10px;
        gap: 8px;
    }

    /* Hide social media and balance on very small screens */
    .microheader-social {
        display: none;
    }

    .microheader-balance-block {
        display: none;
    }

    /* Switch to small logo */
    .microheader-logo-full {
        display: none;
    }

    .microheader-logo-small {
        display: block;
    }

    .microheader-social a {
        width: 24px;
        height: 24px;
    }

    .microheader-balance-block {
        padding: 4px 8px;
    }

    .microheader-balance-value {
        font-size: 11px;
    }

    .microheader-profile-username {
        font-size: 11px;
    }

    .microheader-favorites-btn,
    .microheader-clear-btn {
        width: 28px;
        height: 28px;
        padding: 4px;
    }

    .microheader-price-slider-container {
        min-width: 60px;
    }

    .microheader-current-price {
        font-size: 10px;
    }
}

/* Hide microheader on mobile */
@media (max-width: 768px),
screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px),
screen and (max-width: 1024px) and (max-height: 480px) {
    .microheader {
        display: none !important;
    }
}

/* Completely hide micro-top-loot if it exists */
.micro-top-loot,
.micro-top-loot-items,
.micro-top-loot-item,
.micro-top-loot-toggle,
.micro-best-drop,
.micro-best-drop-badge {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Base Styles & Background */
body,
html {
    width: 100%;
    max-width: 100% !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    overflow-y: auto;
    scroll-behavior: smooth;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

body {
    background: url("../img/backgrounds/case_background_1080p.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    color: #ffffff;
}

@media screen and (max-width: 1024px) {
    body {
        background: transparent !important;
    }

    body::before {
        display: block !important;
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        background: url("../img/backgrounds/case_background_1080p.jpg");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        pointer-events: none;
    }
}

body::before {
    display: none;
}

/* Removed - effects are now in the background image */

@keyframes smokeEffect {

    0%,
    50%,
    100% {
        background-position: center, center, top center, center, center 75%, 0% 0%;
    }
}

@keyframes nebulaFloat2 {
    0% {
        transform: translate(0, 0);
        opacity: 0.4;
    }

    25% {
        transform: translate(5%, -5%);
        opacity: 0.5;
    }

    50% {
        transform: translate(7%, -7%);
        opacity: 0.4;
    }

    75% {
        transform: translate(-5%, -5%);
        opacity: 0.5;
    }

    100% {
        transform: translate(0, 0);
        opacity: 0.4;
    }
}

@keyframes camoFloat {

    0%,
    100% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0 0, 0 0, 0% 0%;
    }
}

/* Override container styles from base.css only for home page elements */
.hero-banner,
.cases-section {
    max-width: 1700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Predictable Cases Hero Slider containment on Home Page (1:1 matched with main slider width & bounds) */
body.page-home .creator-hero,
body.page-home .creator-hero * {
    min-width: 0 !important;
    box-sizing: border-box !important;
}

body.page-home .creator-hero {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    clip-path: inset(0 round 16px) !important;
    border-radius: 16px !important;
    position: relative !important;
}

body.page-home .creator-hero-track {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

body.page-home .creator-hero-slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
}

body.page-home .creator-hero-copy {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.page-home .creator-hero-copy h1,
body.page-home .creator-hero-copy h2,
body.page-home .creator-hero-copy p,
body.page-home .creator-small-note {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

body.page-home .creator-actions {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 1024px) {
    body.page-home .creator-hero {
        width: 100% !important;
        max-width: 100% !important;
        margin: 36px 0 24px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        border-radius: 12px !important;
        clip-path: inset(0 round 12px) !important;
        overflow: hidden !important;
    }

    body.page-home .creator-hero-track {
        width: 100% !important;
        max-width: 100% !important;
    }

    body.page-home .creator-hero-slide {
        width: 100% !important;
        max-width: 100% !important;
        opacity: 1 !important;
    }

    body.page-home .creator-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        width: 100% !important;
        margin-top: 18px !important;
        flex-wrap: wrap !important;
    }

    body.page-home .creator-actions .drpskwnbutton {
        width: auto !important;
        min-width: 160px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        margin: 0 !important;
    }

    body.page-home .creator-hero-copy {
        padding-top: 48px !important;
        padding-bottom: 64px !important;
    }

    body.page-home .creator-hero-copy h1,
    body.page-home .creator-hero-copy h2 {
        font-size: clamp(20px, 3.5vw, 28px) !important;
        line-height: 1.25 !important;
        letter-spacing: 0 !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        text-align: center !important;
        margin: 0 0 10px 0 !important;
    }

    body.page-home .creator-slider-controls {
        position: absolute !important;
        inset: 0 !important;
        z-index: 10 !important;
        pointer-events: none !important;
        display: block !important;
    }

    body.page-home .creator-slider-dots {
        position: absolute !important;
        top: 14px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        gap: 8px !important;
        z-index: 12 !important;
        pointer-events: auto !important;
    }

    body.page-home .creator-slider-arrow {
        display: flex !important;
        width: 42px !important;
        height: 42px !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        background: rgba(23, 19, 61, 0.85) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: #fff !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
    }

    body.page-home .creator-slider-prev {
        position: absolute !important;
        bottom: 14px !important;
        top: auto !important;
        right: 50% !important;
        left: auto !important;
        margin-right: 10px !important;
        transform: none !important;
        z-index: 12 !important;
    }

    body.page-home .creator-slider-next {
        position: absolute !important;
        bottom: 14px !important;
        top: auto !important;
        left: 50% !important;
        right: auto !important;
        margin-left: 10px !important;
        transform: none !important;
        z-index: 12 !important;
    }

    body.page-home .popular-predictable-header,
    body.page-home .predictable-cases-row-mobile {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    body.page-home .popular-predictable-header h2 {
        max-width: 100% !important;
        font-size: clamp(14px, 4.5vw, 20px) !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        text-align: center !important;
    }
}

@media (max-width: 600px) {
    body.page-home .creator-hero {
        width: 100% !important;
        max-width: 100% !important;
        margin: 32px 0 20px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        border-radius: 12px !important;
        clip-path: inset(0 round 12px) !important;
        overflow: hidden !important;
    }

    body.page-home .creator-hero-track {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    body.page-home .creator-hero-slide {
        width: 100% !important;
        max-width: 100% !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    body.page-home .creator-hero-copy {
        padding-inline: 18px !important;
        overflow: visible !important;
    }

    body.page-home .creator-hero-copy h1,
    body.page-home .creator-hero-copy h2 {
        font-size: clamp(18px, 5.2vw, 22px) !important;
        line-height: 1.2 !important;
        letter-spacing: 0.01em !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        text-wrap: balance;
    }

    body.page-home .creator-hero-copy > p {
        font-size: clamp(12px, 3.4vw, 14px) !important;
        line-height: 1.4 !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        text-wrap: pretty;
    }

    body.page-home .creator-actions {
        padding: 3px 4px !important;
        gap: 8px !important;
        overflow: visible !important;
    }

    body.page-home .creator-actions .drpskwnbutton {
        min-height: 40px !important;
        padding: 8px 12px !important;
        font-size: clamp(10px, 3vw, 12px) !important;
        line-height: 1.2 !important;
        letter-spacing: 0.04em !important;
    }

    body.page-home .creator-actions .drpskwnbutton:hover,
    body.page-home .creator-actions .drpskwnbutton:focus-visible {
        transform: translateY(-1px) !important;
    }
}

/* Regular container should use the original settings */
.container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    min-height: 100vh;
    overflow: hidden;
}

/* Hero Banner Section */
.hero-banner {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto 20px;
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: stretch;
    height: 420px;
    min-height: 420px;
    padding: 0 10px;
}

#slider-gradient-back,
#slider-gradient-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.8s ease;
    pointer-events: none;
    border-radius: 16px;
}

#slider-gradient-back {
    z-index: 0;
}

#slider-gradient-front {
    z-index: 1;
}

/* On mobile/tablet hide slider side gradient */
@media (max-width: 1024px) {

    #slider-gradient-back,
    #slider-gradient-front {
        display: none !important;
    }
}

#slider-content {
    position: relative;
    z-index: 2;
}

.hero-banner::before,
.hero-banner::after,
.banner-content::before,
.banner-content::after {
    display: none !important;
    content: none !important;
}

.banner-content {
    display: flex;
    width: 100%;
    padding: 20px;
    align-items: flex-end;
    justify-content: space-between;
    background-image: none;
    background-size: 33% auto;
    background-position: right;
    background-repeat: no-repeat;
}

.left-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 300px;
    max-width: 350px;
}

.center-section {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    text-align: center;
    align-items: center;
}

.right-side {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 420px;
    width: 350px;
    min-width: 340px;
    max-width: 420px;
    overflow: hidden;
}

.center-section h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: 2px;
    background: linear-gradient(to right, #4a99e0 0%, #7dd3fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.center-section p {
    margin: 0 0 25px;
    font-size: 16px;
    line-height: 1.5;
    color: #e2e8f0;
    text-align: center;
    max-width: 450px;
}

.countdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.countdown span {
    font-size: 14px;
    color: #94a3b8;
}

.time-blocks {
    display: flex;
    gap: 12px;
}

.time-block {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(147, 51, 234, 0.4);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.time-block span {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.time-block small {
    font-size: 12px;
    color: #94a3b8;
}

.promo-bonus {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bonus-card {
    background: linear-gradient(to right, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.bonus-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: url('../img/percent.webp');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}

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

.bonus-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #e2e8f0;
}

.percentage {
    font-size: 28px;
    font-weight: 800;
    color: #3b82f6;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.code {
    background: rgba(15, 23, 42, 0.8);
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    margin: 0 0 15px;
}

.copy-btn {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.8), rgba(96, 165, 250, 0.7));
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.copy-btn:hover {
    background: linear-gradient(to right, rgba(96, 165, 250, 0.8), rgba(59, 130, 246, 0.7));
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.daily-bonus,
.invite-friends-bonus {
    min-height: unset;
    height: auto;
    padding: 24px 20px 20px 20px;
    border-radius: 16px;
    margin-top: 0;
    margin-bottom: 18px;
    width: 100%;
    max-width: 370px;
    box-sizing: border-box;
    overflow: hidden;
}

.daily-bonus {
    background: linear-gradient(139deg, #2d064d 60%, #7e22ce 100%);
    border: 1.5px solid rgba(126, 34, 206, 0.25);
    color: #fff;
    text-shadow: 0 1px 8px rgba(126, 34, 206, 0.18);
}

.daily-bonus h3,
.daily-bonus p,
.daily-bonus a {
    color: #fff !important;
    text-shadow: 0 1px 8px rgba(126, 34, 206, 0.18);
}

.invite-friends-bonus {
    background: linear-gradient(139deg, #2d064d 60%, #7e22ce 100%);
    border: 1.5px solid rgba(126, 34, 206, 0.25);
    color: #fff;
    text-shadow: 0 1px 8px rgba(126, 34, 206, 0.18);
    padding: 36px 28px 28px 28px;
    margin-bottom: 0;
    max-width: 100%;
    font-size: 1.08rem;
    overflow: hidden;
}

.invite-friends-bonus h3 {
    font-size: 1.18rem;
    margin-bottom: 10px;
}

.invite-friends-bonus p,
.invite-friends-bonus ol {
    font-size: 1.08rem;
    margin-bottom: 14px;
}

.invite-friends-bonus a {
    color: #fff !important;
    text-shadow: 0 1px 8px rgba(59, 130, 246, 0.18);
}

.invite-friends-bonus .event-btn {
    background: #22c55e;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 17px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
    transition: all 0.2s;
    margin-top: 18px;
    margin-bottom: 0;
    outline: none;
    letter-spacing: 0.5px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.invite-friends-bonus .event-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 8px;
}

.invite-friends-bonus .event-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

.invite-friends-bonus .event-btn:hover::before {
    opacity: 1;
    animation: shine 2s linear infinite;
}

.claim-btn,
.copy-invite-btn {
    background: linear-gradient(90deg, #fde047 60%, #fbbf24 100%);
    color: #22223b;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-weight: 700;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.10);
    transition: all 0.2s;
    margin-top: 18px;
    margin-bottom: 0;
    outline: none;
    letter-spacing: 0.5px;
    display: inline-block;
}

.claim-btn:hover {
    background: linear-gradient(90deg, #fbbf24 60%, #fde047 100%);
    color: #18181b;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.18);
    transform: translateY(-2px) scale(1.04);
}

/* optimized: removed earlier invite-link styles in favor of consolidated block below */

.invite-steps {
    margin: 0 0 18px 0;
    padding: 0 0 0 18px;
    color: #d1fae5;
    font-size: 15px;
    list-style: decimal;
}

.invite-link-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #192a44;
    border-radius: 10px;
    padding: 14px 18px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    margin-top: 14px;
    margin-bottom: 10px;
    width: 100%;
    min-width: 0;
}

.invite-link {
    flex: 1;
    background: transparent;
    border: none;
    color: #bbf7d0;
    font-size: 1.08rem;
    font-family: monospace;
    outline: none;
    padding: 6px 8px;
    border-radius: 6px;
    min-width: 0;
}

.copy-invite-btn {
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.08rem;
    font-weight: 700;
    cursor: pointer;
    padding: 12px 28px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 110px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.copy-invite-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a, #22c55e);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 8px;
}

.copy-invite-btn:hover::before {
    opacity: 1;
    animation: shine 2s linear infinite;
}

.copy-invite-btn:hover {
    background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
    transform: scale(1.05);
}

/* Cases Section */
.cases-section {
    max-width: 1700px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.filters {
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(147, 51, 234, 0.2);
    position: relative;
    background: linear-gradient(to right, rgba(38, 35, 78, 0.8), rgba(23, 19, 61, 0.7));
}

.filters-bg-back,
.filters-bg-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.filters-bg-back {
    z-index: 0;
}

.filters-bg-front {
    z-index: 1;
}

.filters .skin-search-row {
    position: relative;
    z-index: 10;
}

.filters .skin-name-input-wrap {
    flex: 0 1 300px;
    min-width: 220px;
    max-width: 340px;
}

.filters .search-mode-row {
    position: relative;
    z-index: 10;
}

.filters .filters-row {
    position: relative;
    z-index: 2;
}

.filters-custom-cases-link {
    position: relative;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.3);
    background-color: rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.5);
    color: rgba(255, 255, 255, 0.96);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.18);
    z-index: 1;
    transition: background-color 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease, transform 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.filters-custom-cases-link:hover {
    color: #fff;
    border-color: rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.44);
    box-shadow: 0 7px 16px rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.24);
    transform: translateY(-1px);
}

.filters-custom-cases-link:focus-visible {
    outline: 2px solid rgba(216, 180, 254, 0.9);
    outline-offset: 2px;
}

.filters-custom-cases-link:active {
    transform: translateY(0);
}

.filters-custom-cases-link .filters-custom-cases-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.filters-custom-cases-link span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.2px;
}

.filters-custom-cases-link:hover .filters-custom-cases-icon {
    transform: translateX(1px);
}

.filters-custom-cases-link-desktop {
    position: absolute;
    right: 16px;
    bottom: 10px;
    z-index: 20;
}

.filters-custom-cases-row {
    display: none;
}

@media (max-width: 1100px) {
    .filters-custom-cases-link-desktop {
        right: 10px;
        bottom: 8px;
    }
}

@media (max-width: 768px) {
    .page-home .cases-section .filters-custom-cases-link-desktop {
        display: none !important;
    }

    .page-home .cases-section .filters-custom-cases-row {
        display: flex;
        justify-content: center;
        margin: 0 auto 18px;
        padding: 0 12px;
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link {
        display: flex !important;
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        max-width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 14px 20px;
        justify-content: center;
        border-radius: 12px;
        background: linear-gradient(135deg, #16a34a, #22c55e);
        border: 1px solid rgba(34, 197, 94, 0.3);
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
        color: #fff;
        z-index: 1;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link span {
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link .filters-custom-cases-icon {
        width: 18px;
        height: 18px;
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link:hover {
        background: linear-gradient(135deg, #15803d, #16a34a);
        border-color: rgba(34, 197, 94, 0.5);
        box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
        color: #fff;
        transform: translateY(-2px);
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link:active {
        transform: translateY(0);
    }

    /* Optimize microheader clear button for mobile */
    .microheader-clear-btn {
        min-width: 42px;
        height: 42px;
        padding: 8px;
        border-radius: 12px;
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .microheader-clear-btn:hover {
        background: rgba(239, 68, 68, 0.25);
        border-color: rgba(239, 68, 68, 0.5);
    }
}

.filters::before,
.filters::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            rgba(147, 51, 234, 0.4),
            rgba(168, 85, 247, 0.5),
            rgba(147, 51, 234, 0.4),
            transparent);
}

.filters::before {
    top: 0;
}

.filters::after {
    bottom: 0;
}

.search-container {
    flex: 1;
    min-width: 250px;
    display: flex;
    height: 46px;
    border: 1px solid rgba(147, 51, 234, 0.4);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.7);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: rgba(147, 51, 234, 0.7);
    box-shadow: 0 0 10px rgba(126, 34, 206, 0.2);
}

.search {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: "Outfit", "Montserrat", sans-serif;
    color: #e2e8f0;
    font-size: 15px;
    padding: 0 15px;
}

.search::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.search-container button {
    background: transparent;
    border: none;
    width: 46px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-container button img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.search-container button:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* optimized: removed duplicate visible layout for .filter-tabs; hidden version is defined later */

.filter-tab {
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(51, 65, 85, 0.4);
}

.filter-tab.active,
.filter-tab:hover {
    background: rgba(147, 51, 234, 0.2);
    color: #e2e8f0;
    border-color: rgba(147, 51, 234, 0.4);
}

/* optimized: removed early .filter-buttons block; consolidated later */

/* optimized: removed duplicated .section-title block (already defined above) */

/* optimized: removed duplicated cases grid/card block (already defined above) */

/* optimized: removed duplicated responsive block (already defined above) */

.price-filter {
    flex: 1;
    padding: 10px 0;
}

.price-slider-container {
    width: 100%;
    padding: 0 15px;
}

.price-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 14px;
    gap: 10px;
}

.price-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: linear-gradient(to right, rgba(79, 17, 147, 0.6), rgba(126, 34, 206, 0.8));
    outline: none;
    margin: 0;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(126, 34, 206, 0.5);
    transition: all 0.3s ease;
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(126, 34, 206, 0.5);
    transition: all 0.3s ease;
}

.price-slider::-webkit-slider-thumb:hover,
.price-slider::-moz-range-thumb:hover {
    background: #9333ea;
    transform: scale(1.1);
}

.current-price {
    text-align: center;
    font-size: 14px;
    color: #e2e8f0;
    margin-top: 5px;
    font-weight: 500;
    transition: opacity 0.15s ease;
}

/* Price slider tooltip bubble (desktop main header only) */
.price-slider-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.price-slider-wrap .price-slider {
    width: 100%;
}

.price-slider-tooltip {
    position: absolute;
    bottom: calc(100% + 14px);
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7e22ce, #a855f7);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(126, 34, 206, 0.5);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
    letter-spacing: 0.3px;
}

.price-slider-tooltip.visible {
    opacity: 1;
}

.price-slider-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #a855f7;
}

.filter-tabs {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(51, 65, 85, 0.4);
}

.filter-tab.active,
.filter-tab:hover {
    background: rgba(147, 51, 234, 0.2);
    color: #e2e8f0;
    border-color: rgba(147, 51, 234, 0.4);
}

.filters-row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0 15px;
    height: 38px;
    background: linear-gradient(to right, rgba(79, 17, 147, 0.6), rgba(126, 34, 206, 0.5));
    border: 1px solid rgba(147, 51, 234, 0.4);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    outline: 2px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(to right, rgba(79, 17, 147, 0.75), rgba(126, 34, 206, 0.65));
}

.filter-btn img {
    width: 16px;
    opacity: 0.8;
}

.filter-btn:hover {
    background: linear-gradient(to right, rgba(126, 34, 206, 0.6), rgba(147, 51, 234, 0.5));
    box-shadow: 0 0 10px rgba(126, 34, 206, 0.3);
}

.filter-btn.clear {
    background: linear-gradient(to right, rgba(51, 65, 85, 0.6), rgba(71, 85, 105, 0.5));
    border-color: rgba(100, 116, 139, 0.4);
}

.filter-btn.clear:hover {
    background: linear-gradient(to right, rgba(71, 85, 105, 0.6), rgba(100, 116, 139, 0.5));
}

.section-title {
    margin: 40px 0 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-small {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-small img {
    width: 100%;
    height: auto;
}

.logo-small.default-logo {
    color: #cbd5e1;
}

.logo-small.default-logo.gold {
    color: #fbbf24;
}

.section-title[style*="--group-color"] .logo-small.default-logo {
    color: var(--group-color);
}

.logo-small-icon {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    filter:
        drop-shadow(0 0 5px rgba(255, 255, 255, 0.18)) drop-shadow(0 0 10px color-mix(in srgb, currentColor, transparent 72%));
}

.logo-small-icon-tint {
    position: absolute;
    inset: 0;
    background-color: currentColor;
    -webkit-mask-image: url('/static/img/Logo/Logo_silver.webp');
    mask-image: url('/static/img/Logo/Logo_silver.webp');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    opacity: 0.78;
}

.logo-small-icon-detail {
    position: absolute;
    inset: 0;
    display: block;
    background-image: url('/static/img/Logo/Logo_silver.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.76;
    mix-blend-mode: normal;
    filter: brightness(1.08) contrast(1.06);
    pointer-events: none;
}

.section-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(147, 51, 234, 0.4);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(to right,
            transparent,
            rgba(147, 51, 234, 0.7),
            rgba(168, 85, 247, 0.8),
            rgba(147, 51, 234, 0.7),
            transparent);
}

.section-title.bonus-cases h2 {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.section-title.bonus-cases::after {
    background: linear-gradient(to right,
            transparent,
            rgba(245, 158, 11, 0.7),
            rgba(234, 179, 8, 0.8),
            rgba(245, 158, 11, 0.7),
            transparent);
}

.section-title[style*="--group-color"] h2 {
    color: var(--group-color) !important;
    text-shadow: 0 0 12px color-mix(in srgb, var(--group-color), transparent 35%) !important;
}

.section-title[style*="--group-color"]::after {
    background: linear-gradient(to right,
            transparent,
            var(--group-color),
            var(--group-color),
            var(--group-color),
            transparent) !important;
    opacity: 0.85;
    height: 3px;
    box-shadow: 0 0 10px color-mix(in srgb, var(--group-color), transparent 20%);
}

.custom-group-header h2 {
    color: var(--group-color) !important;
}

.custom-group-header::after {
    background: linear-gradient(to right,
            transparent,
            var(--group-color),
            var(--group-color),
            var(--group-color),
            transparent);
    opacity: 0.8;
    height: 3px;
    /* Slightly thicker for visibility */
    box-shadow: 0 0 10px var(--group-color);
    /* Add glow to underline too */
}

/* Custom Group Case Card Styles */
/* Custom Group Case Card Styles */
.custom-group-case:hover {
    border-color: color-mix(in srgb, var(--group-color), transparent 60%) !important;
    box-shadow: 0 6px 15px color-mix(in srgb, var(--group-color), transparent 70%), 0 0 8px color-mix(in srgb, var(--group-color), transparent 70%) inset !important;
}

.custom-group-case:hover .case-card-title {
    text-shadow: 0 0 12px color-mix(in srgb, var(--group-color), transparent 20%) !important;
}

.custom-group-case .case-price::before {
    background: linear-gradient(90deg, transparent 0%, var(--group-color) 40%, var(--group-color) 60%, transparent 100%) !important;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(15px, 2.5vw, 30px);
    margin-bottom: clamp(20px, 3vw, 40px);
}

.case-card {
    position: relative;
    border-radius: 12px;
    overflow: visible;
    aspect-ratio: 1;
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 116, 139, 0.2);
    transform: perspective(800px) rotateX(0deg);
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(147, 51, 234, 0.4);
    box-shadow: 0 6px 15px rgba(126, 34, 206, 0.3), 0 0 8px rgba(147, 51, 234, 0.3) inset;
    z-index: 2;
}

.case-content {
    padding: clamp(12px, 2vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    overflow: visible;
    flex: 1;
    min-height: 0;
}

.case-card .case-card-title {
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 clamp(8px, 1vw, 15px);
    text-align: center;
    transition: all 0.3s ease;
    min-height: clamp(36px, 4vw, 48px);
    max-height: clamp(48px, 5vw, 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.case-card:hover .case-card-title {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(147, 51, 234, 0.8);
}

.case-image {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: all 0.4s ease;
}

.case-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

.case-card:hover .case-image img {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.4));
}

.case-price {
    padding: 8px 25px;
    border-radius: 6px;
    margin-top: -20px;
    transition: all 0.3s ease;
    position: relative;
    min-height: 40px;
    overflow: visible;
}

.case-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.favorite-heart {
    background: transparent;
    border: none;
    padding: 4px;
    margin-left: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    position: relative;
    pointer-events: auto;
    touch-action: manipulation;
}

.favorite-heart svg {
    transition: transform 0.15s ease, fill 0.15s ease, stroke 0.15s ease;
}

.favorite-heart.active svg {
    fill: #ef4444;
    stroke: #ef4444;
    transform: scale(1.08);
}

.favorite-heart.favorite-yt-like svg {
    animation: favoriteYoutubePop 0.46s cubic-bezier(.2, 1.2, .25, 1) both;
}

@keyframes favoriteYoutubePop {
    0% {
        transform: scale(1);
    }

    38% {
        transform: scale(0.78);
    }

    68% {
        transform: scale(1.22);
    }

    100% {
        transform: scale(1);
    }
}

.favorite-heart--disabled {
    cursor: default;
}

.favorite-heart--disabled svg {
    opacity: 0.72;
}

.case-price::before {
    content: '';
    display: block;
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 99.5%;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, transparent 0%, #a855f7 40%, #9333ea 60%, transparent 100%);
    opacity: 0.7;
    filter: blur(1px);
    pointer-events: none;
    z-index: 2;
}

.case-price span {
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
    word-break: break-word;
    line-height: 1.1;
}

.case-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.case-price-meta--likes,
.case-price-favorite {
    position: relative;
    z-index: 30;
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .banner-content {
        flex-direction: column;
        background-position: center;
        padding: 30px;
    }

    .left-side,
    .center-section,
    .right-side {
        max-width: 100%;
        width: 100%;
    }

    .right-side {
        display: none;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
        gap: clamp(15px, 2vw, 25px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .event-info {
        padding: 15px 0;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs,
    .filter-buttons {
        justify-content: center;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
        gap: clamp(12px, 2vw, 20px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    }
}

/* Адаптация для маленьких экранов - скрываем текст, оставляем только иконки */
@media (max-width: 380px) {
    .mobile-filter-row .filter-btn span {
        display: none !important;
    }

    .mobile-filter-row .filter-btn {
        padding: 0 10px !important;
        justify-content: center !important;
    }

    .mobile-filter-row .filter-btn svg {
        margin: 0 !important;
    }
}

@media (min-width: 769px) {
    .featured-cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    }
}

@media (min-width: 1400px) {
    .classic-cases-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

.featured-cases-grid .case-card {
    aspect-ratio: 1;
}

/* optimized: removed earlier height override; consolidated below */

.featured-cases-grid .case-image img {
    max-height: 117%;
    max-width: 117%;
    object-fit: contain;
    transform: scale(1.1);
}

.featured-cases-grid .case-card:hover {
    transform: perspective(800px) rotateX(5deg) translateY(-10px) scale(1.03);
    border-color: rgba(168, 85, 247, 0.8);
    box-shadow: 0 15px 30px rgba(126, 34, 206, 0.5), 0 0 20px rgba(168, 85, 247, 0.7) inset;
    z-index: 3;
}

.featured-cases-grid .case-card:hover .case-image img {
    transform: translateY(-15px) scale(1.15);
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.6));
}

.featured-cases-grid .case-content {
    padding: clamp(10px, 1.5vw, 12px) clamp(15px, 2vw, 20px);
}

.featured-cases-grid .case-image {
    margin-bottom: clamp(6px, 0.8vw, 8px);
    flex: 1;
    min-height: 0;
}

.featured-cases-grid .case-price {
    margin-top: -30px;
}

.featured-cases-grid .case-card .case-card-title {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 clamp(10px, 1.2vw, 15px);
    text-align: center;
    transition: all 0.3s ease;
    min-height: clamp(40px, 4.5vw, 56px);
    max-height: clamp(56px, 6vw, 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    padding: 0 clamp(3px, 0.5vw, 5px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-cases-grid .case-price span {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    color: #22c55e;
    word-break: break-word;
    line-height: 1.1;
}

.featured-cases-grid .case-price::before {
    height: 4px;
}

.classic-cases-grid .case-card:hover {
    transform: perspective(800px) rotateX(5deg) translateY(-10px) scale(1.03);
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.4), 0 0 20px rgba(234, 179, 8, 0.7) inset;
    z-index: 3;
}

.classic-cases-grid .case-card:hover .case-image img {
    transform: translateY(-15px) scale(1.15);
    filter: drop-shadow(0 20px 20px rgba(245, 158, 11, 0.7));
}

.classic-cases-grid .case-card:hover .case-card-title {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.9);
}

.classic-cases-grid .case-card .case-card-title {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    min-height: clamp(40px, 4.5vw, 52px);
    max-height: clamp(52px, 6vw, 65px);
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    padding: 0 5px;
}

.classic-cases-grid .case-price span {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
}

.classic-cases-grid .case-price::before {
    background: linear-gradient(90deg, transparent 0%, #fbbf24 40%, #f59e0b 60%, transparent 100%);
}

.classic-cases-grid .case-price {
    margin-top: -25px;
}

/* optimized: removed duplicate .hero-banner block */
.hero-banner .right-side {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 420px;
    /* фиксированная высота для слайдшоу */
    width: 350px;
    /* фиксированная ширина для слайдшоу */
    min-width: 340px;
    max-width: 420px;
    overflow: hidden;
    /* чтобы изображения не выходили за пределы */
}

.hero-banner .right-side img {
    position: static;
    /* убираем absolute */
    right: unset;
    bottom: unset;
    height: 100%;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* чтобы изображение не выходило за пределы */
    z-index: 2;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.5s, transform 0.5s;
}

/* BEGINNERS CASES SECTION */
.beginners-cases {
    margin: 40px 0 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.beginners-cases h2 {
    font-size: 24px;
    font-weight: 700;
    color: #38bdf8;
    margin: 0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    position: relative;
    display: inline-block;
}

.beginners-cases .logo-small img {
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

/*
.beginners-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.beginners-cases-grid .case-card {
    border: 2px solid #38bdf8;
    background: linear-gradient(120deg, rgba(56,189,248,0.10) 0%, rgba(23,19,61,0.85) 100%);
    box-shadow: 0 5px 20px rgba(56,189,248,0.10);
    transition: all 0.3s;
}
.beginners-cases-grid .case-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 12px 24px rgba(56,189,248,0.18), 0 0 15px rgba(56,189,248,0.18) inset;
    transform: translateY(-5px) scale(1.03);
    z-index: 2;
}
.beginners-cases-grid .case-card .case-card-title {
    color: #38bdf8;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(56,189,248,0.18);
}
.beginners-cases-grid .case-price span {
    color: #38bdf8;
    font-size: 20px;
    font-weight: 700;
}
*/
.lorem-block img[alt="Bonus Cards"] {
    height: 64px;
    width: auto;
    margin-right: 14px;
    display: block;
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 600px) {
    .lorem-block img[alt="Bonus Cards"] {
        height: 44px;
        margin-right: 8px;
    }
}

@keyframes pulse-pop {

    0%,
    100% {
        transform: scale(1);
    }
}

.pulse-pop {
    animation: pulse-pop 1.1s cubic-bezier(.22, 1, .36, 1) 1;
}

.home-bg-weapon-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 50vw;
    height: 140vh;
    background: url('/static/img/weapon.webp') no-repeat left center;
    background-size: cover;
    opacity: 0.3;
    z-index: 0 !important;
    pointer-events: none;
}

.home-bg-weapon-right {
    position: absolute;
    top: 3600px;
    right: 0;
    width: 50vw;
    height: 140vh;
    background: url('/static/img/weapon2.webp') no-repeat right center;
    background-size: cover;
    opacity: 0.3;
    z-index: 0 !important;
    pointer-events: none;
}

.home-bg-weapon-left-lower {
    position: absolute;
    top: 7200px;
    left: 0;
    width: 50vw;
    height: 140vh;
    background: url('/static/img/weapon.webp') no-repeat left center;
    background-size: cover;
    opacity: 0.3;
    z-index: 0 !important;
    pointer-events: none;
}

.home-content {
    position: relative;
    z-index: 0;
}


@media screen and (max-width: 1024px) {

    #slider-arrow-left,
    #slider-arrow-right {
        display: none !important;
    }

    .hero-banner {
        margin: 20px auto 15px;
        height: auto;
        min-height: 280px;
        padding: 0 12px;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(126, 34, 206, 0.15);
        overflow: visible;
    }

    .banner-content {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        height: auto;
        min-height: auto;
    }

    .hero-left-col {
        max-width: 100%;
        width: 100%;
        order: 2;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .hero-center.hero-center-mobile {
        order: 1;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        height: auto;
    }

    .hero-center.hero-center-mobile>div:not(.creator-promo-banner) {
        min-height: auto;
        height: auto;
        padding: 20px 0;
        border-radius: 12px;
    }

    .bonus-card {
        min-height: 360px;
        padding: 28px 24px;
        margin-bottom: 24px;
        border-radius: 16px;
        box-shadow: 0 6px 24px rgba(126, 34, 206, 0.15);
    }

    .bonus-card .bonus-header h3 {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }

    .bonus-card .percentage {
        font-size: 2.4rem;
    }

    .bonus-card .code {
        font-size: 1.2rem;
        padding: 14px;
        margin-bottom: 20px;
    }

    .bonus-card .copy-btn {
        font-size: 1.2rem;
        padding: 14px 20px;
    }

    .lorem-block,
    .invite-friends-bonus {
        padding: 20px 16px;
        margin-bottom: 0;
        max-width: 100%;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(126, 34, 206, 0.12);
        height: auto;
    }

    .lorem-block {
        min-height: auto;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 12px;
    }

    .invite-friends-bonus {
        min-height: auto;
        height: auto;
        padding: 24px 20px;
        font-size: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 14px;
    }

    .invite-friends-bonus h3 {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus ol {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .cases-section {
        padding: 0 15px;
        margin-bottom: 30px;
    }

    .filters {
        padding: 15px;
        gap: 15px;
        margin-bottom: 30px;
        border-radius: 16px;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.85), rgba(23, 19, 61, 0.8));
        box-shadow: 0 4px 20px rgba(126, 34, 206, 0.15);
    }

    .filters-row {
        flex-direction: column;
        gap: 18px;
    }

    .search-container {
        height: 48px;
        width: 100%;
        border-radius: 12px;
        border: 2px solid rgba(147, 51, 234, 0.3);
        background: rgba(15, 23, 42, 0.8);
        box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.1) inset;
        transition: all 0.3s ease;
    }

    .search-container:focus-within {
        border-color: rgba(147, 51, 234, 0.7);
        box-shadow: 0 0 20px rgba(126, 34, 206, 0.3);
        transform: translateY(-1px);
    }

    .search {
        font-size: 16px;
        padding: 0 18px;
        height: 44px;
        border-radius: 10px;
        color: #ffffff;
        letter-spacing: 0.3px;
    }

    .search::placeholder {
        color: rgba(148, 163, 184, 0.7);
        font-size: 15px;
    }

    .search-container button {
        width: 48px;
        height: 44px;
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.6), rgba(126, 34, 206, 0.7));
        transition: all 0.3s ease;
    }

    .search-container button:hover {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.8), rgba(126, 34, 206, 0.9));
        transform: scale(1.05);
    }

    .filter-buttons {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0 16px;
        height: 44px;
        font-size: 14px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(79, 17, 147, 0.7), rgba(126, 34, 206, 0.6));
        border: 1px solid rgba(147, 51, 234, 0.4);
        color: #ffffff;
        font-weight: 600;
        letter-spacing: 0.3px;
        transition: all 0.3s ease;
        flex: 1;
        min-width: 120px;
        max-width: 150px;
    }

    .filter-btn:hover,
    .filter-btn:active {
        background: linear-gradient(135deg, rgba(126, 34, 206, 0.8), rgba(147, 51, 234, 0.7));
        box-shadow: 0 4px 15px rgba(126, 34, 206, 0.4);
        transform: translateY(-2px);
    }

    .price-filter {
        background: rgba(15, 23, 42, 0.6);
        border-radius: 12px;
        padding: 16px;
        border: 1px solid rgba(147, 51, 234, 0.2);
    }

    .price-range {
        margin-bottom: 8px;
    }

    .price-slider {
        height: 8px;
        border-radius: 4px;
        background: linear-gradient(to right, rgba(79, 17, 147, 0.7), rgba(126, 34, 206, 0.9));
    }

    .price-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        border: 3px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 10px rgba(126, 34, 206, 0.6);
    }

    .current-price {
        text-align: center;
        font-size: 15px;
        font-weight: 600;
        color: #ffffff;
        margin-top: 8px;
    }

    .section-title {
        margin: 30px 0 20px;
    }

    .section-title h2 {
        font-size: 18px;
    }

    .center-section h1 {
        font-size: 24px;
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }

    .case-card {
        height: 200px;
    }

    .case-content {
        padding: 15px;
    }

    .case-card .case-card-title {
        font-size: 16px;
        min-height: 40px;
        margin-bottom: 12px;
    }

    .case-image {
        height: 170px;
        margin-bottom: 2px;
    }

    .case-price {
        padding: 6px 20px;
        margin-top: -15px;
    }

    .case-price span {
        font-size: 18px;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-cases-grid .case-card {
        height: 360px;
    }

    .featured-cases-grid .case-image {
        height: 250px;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 20px;
        min-height: 48px;
        text-transform: none !important;
        letter-spacing: 0.02em;
    }

    .featured-cases-grid .case-price span {
        font-size: 22px;
    }

    .classic-cases-grid .case-image {
        height: 230px;
    }

    .cases-grid .case-image img {
        transform: scale(1.18) !important;
        max-height: 120% !important;
    }

    .featured-cases-grid .case-image img {
        transform: scale(1.22) !important;
        max-height: 125% !important;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.14) !important;
        max-height: 118% !important;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 18px;
        min-height: 44px;
    }

    .classic-cases-grid .case-price span {
        font-size: 20px;
    }

    .beginners-cases-grid .case-image {
        height: 210px;
    }

    .beginners-cases-grid .case-image img {
        transform: translateY(-16px) scale(1.35) !important;
        max-height: 132% !important;
    }

    .beginners-cases .case-image {
        height: 210px;
    }

    .beginners-cases .case-image img {
        transform: translateY(-16px) scale(1.35) !important;
        max-height: 132% !important;
    }

    .beginners-cases .case-price {
        margin-top: -8px;
    }
}


/* Variables */
:root {
    --skeleton-bg: rgba(148, 163, 184, 0.16);
    --skeleton-highlight: rgba(255, 255, 255, 0.28);
    --skeleton-radius: 10px;
}

/* Shimmer animation */
@keyframes skeletonShimmerHome {

    0%,
    100% {
        background-position: -200% 0;
    }
}

/* Primitive blocks */
.skeleton-block {
    background: linear-gradient(90deg,
            var(--skeleton-bg) 25%,
            var(--skeleton-highlight) 37%,
            var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
    border-radius: var(--skeleton-radius);
    color: transparent !important;
}

.skeleton-text {
    height: 1em;
    line-height: 1;
    border-radius: 6px;
}

.skeleton-text.sm {
    height: 0.8em;
}

.skeleton-text.lg {
    height: 1.2em;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-block {
        animation: none;
    }
}

/* Helpers: allow multiple toggles */
.is-loading .as-skeleton,
[data-loading="true"] .as-skeleton {
    position: relative;
}

.is-loading .as-skeleton::before,
[data-loading="true"] .as-skeleton::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg,
            var(--skeleton-bg) 25%,
            var(--skeleton-highlight) 37%,
            var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

/* Toggle on body for home page */
body.loading-home .banner-content .left-side>*,
body.loading-home .banner-content .center-section>* {
    color: transparent;
}

/* Hero: title, paragraph, countdown block become skeletons */
body.loading-home .center-section h1,
body.loading-home .center-section p {
    min-height: 1.2em;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

body.loading-home .center-section h1 {
    height: 1.6em;
}

body.loading-home .center-section p {
    height: 1.1em;
    max-width: 520px;
}

/* Hero right-side slideshow placeholder */
body.loading-home .hero-banner .right-side img {
    opacity: 0;
}

body.loading-home .hero-banner .right-side::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

/* Bonus cards as a whole get an overlay skeleton */
body.loading-home .daily-bonus,
body.loading-home .invite-friends-bonus,
body.loading-home .lorem-block {
    position: relative;
}

body.loading-home .daily-bonus::before,
body.loading-home .invite-friends-bonus::before,
body.loading-home .lorem-block::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

/* Cases grid skeletons */
body.loading-home .cases-grid .case-card {
    pointer-events: none;
}

body.loading-home .cases-grid .case-card .case-card-title {
    color: transparent;
    min-height: 18px;
    height: 18px;
    width: 80%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

body.loading-home .cases-grid .case-card .case-image {
    position: relative;
}

body.loading-home .cases-grid .case-card .case-image img {
    opacity: 0;
}

body.loading-home .cases-grid .case-card .case-image::before {
    content: '';
    display: block;
    width: 72%;
    height: 78%;
    margin: 0 auto;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

body.loading-home .cases-grid .case-card .case-price {
    position: relative;
    min-height: 40px;
}

body.loading-home .cases-grid .case-card .case-price>* {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.loading-home .cases-grid .case-card .case-price::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(72%, 190px);
    height: 16px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

/* Subtle randomization for better realism */
body.loading-home .cases-grid .case-card:nth-child(3n) .case-card-title {
    width: 70%;
}

body.loading-home .cases-grid .case-card:nth-child(4n) .case-card-title {
    width: 85%;
}

body.loading-home .cases-grid .case-card:nth-child(5n) .case-image::before {
    width: 80%;
    height: 74%;
}

/* Smaller screens adjust skeleton block sizing automatically */
@media (max-width: 768px) {
    body.loading-home .center-section h1 {
        height: 1.4em;
    }

    body.loading-home .center-section p {
        height: 1em;
    }

    body.loading-home .cases-grid .case-card .case-card-title {
        height: 16px;
    }

    body.loading-home .cases-grid .case-card .case-price::after {
        height: 14px;
        width: min(76%, 150px);
    }
}

@media (max-width: 480px) {
    body.loading-home .cases-grid .case-card .case-image::before {
        width: 86%;
        height: 70%;
    }
}

@media screen and (max-width: 768px) {
    body {
        background-attachment: fixed !important;
        background-size: cover !important;
        background-position: center !important;
    }

    .hero-banner {
        margin: 20px auto 15px;
        height: auto;
        min-height: 220px;
        padding: 0 12px;
        border-radius: 16px;
    }

    .banner-content {
        padding: 20px;
        gap: 20px;
    }

    .hero-center.hero-center-mobile>div {
        min-height: 220px;
        padding: 20px 0;
    }

    .bonus-card {
        min-height: 320px;
        padding: 24px 20px;
        margin-bottom: 20px;
    }

    .bonus-card .bonus-header h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .bonus-card .percentage {
        font-size: 2.2rem;
    }

    .bonus-card .code {
        font-size: 1.1rem;
        padding: 12px;
        margin-bottom: 18px;
    }

    .bonus-card .copy-btn {
        font-size: 1.1rem;
        padding: 12px 18px;
    }

    .lorem-block {
        min-height: 160px;
        padding: 20px 16px;
        font-size: 1rem;
    }

    .lorem-block h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .invite-friends-bonus {
        min-height: 420px;
        padding: 24px 20px;
        font-size: 1rem;
    }

    .invite-friends-bonus h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus ol {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .invite-steps {
        margin: 0 0 18px 0;
        padding: 0 0 0 20px;
        font-size: 0.95rem;
    }

    .cases-section {
        padding: 0 10px;
        margin-bottom: 25px;
    }

    .filters {
        padding: 16px 12px;
        gap: 16px;
        margin-bottom: 25px;
        border-radius: 14px;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.9), rgba(23, 19, 61, 0.85));
        box-shadow: 0 6px 25px rgba(126, 34, 206, 0.18);
    }

    .filters-row {
        flex-direction: column;
        gap: 20px;
    }

    .search-container {
        height: 52px;
        width: 100%;
        border-radius: 14px;
        border: 2px solid rgba(147, 51, 234, 0.4);
        background: rgba(15, 23, 42, 0.85);
        box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.15) inset;
        transition: all 0.3s ease;
    }

    .search-container:focus-within {
        border-color: rgba(147, 51, 234, 0.8);
        box-shadow: 0 0 25px rgba(126, 34, 206, 0.4);
        transform: translateY(-2px);
    }

    .search {
        font-size: 16px;
        padding: 0 20px;
        height: 48px;
        border-radius: 12px;
        color: #ffffff;
        letter-spacing: 0.4px;
        font-weight: 500;
    }

    .search::placeholder {
        color: rgba(148, 163, 184, 0.8);
        font-size: 15px;
    }

    .search-container button {
        width: 52px;
        height: 48px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.7), rgba(126, 34, 206, 0.8));
        transition: all 0.3s ease;
    }

    .search-container button:hover {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.9), rgba(126, 34, 206, 1));
        transform: scale(1.08);
    }

    .filter-buttons {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0 14px;
        height: 48px;
        font-size: 14px;
        border-radius: 14px;
        background: linear-gradient(135deg, rgba(79, 17, 147, 0.75), rgba(126, 34, 206, 0.65));
        border: 1px solid rgba(147, 51, 234, 0.5);
        color: #ffffff;
        font-weight: 700;
        letter-spacing: 0.4px;
        transition: all 0.3s ease;
        flex: 1;
        min-width: 110px;
        max-width: 140px;
        text-transform: uppercase;
        box-shadow: 0 2px 8px rgba(126, 34, 206, 0.15);
    }

    .filter-btn:hover,
    .filter-btn:active {
        background: linear-gradient(135deg, rgba(126, 34, 206, 0.85), rgba(147, 51, 234, 0.75));
        box-shadow: 0 6px 20px rgba(126, 34, 206, 0.5);
        transform: translateY(-3px) scale(1.02);
    }

    .price-filter {
        background: rgba(15, 23, 42, 0.7);
        border-radius: 14px;
        padding: 18px;
        border: 1px solid rgba(147, 51, 234, 0.3);
        box-shadow: 0 2px 12px rgba(126, 34, 206, 0.1);
    }

    .price-range {
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 600;
    }

    .price-slider {
        height: 10px;
        border-radius: 5px;
        background: linear-gradient(to right, rgba(79, 17, 147, 0.8), rgba(126, 34, 206, 1));
    }

    .price-slider::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
        border: 3px solid rgba(255, 255, 255, 1);
        box-shadow: 0 3px 12px rgba(126, 34, 206, 0.7);
    }

    .current-price {
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: #ffffff;
        margin-top: 10px;
        text-shadow: 0 1px 3px rgba(126, 34, 206, 0.3);
    }

    .section-title {
        margin: 25px 0 15px;
    }

    .section-title h2 {
        font-size: 18px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 25px;
    }

    .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    }

    .featured-cases-grid .case-card {
        height: auto !important;
        min-height: auto;
        aspect-ratio: 1;
    }

    .featured-cases-grid .case-image {
        height: auto;
    }

    .case-content {
        padding: 12px;
    }

    .case-card .case-card-title {
        font-size: 15px;
        min-height: 36px;
        margin-bottom: 10px;
    }

    .case-image {
        height: auto;
    }

    .case-price {
        padding: 5px 18px;
        margin-top: -12px;
    }

    .case-price span {
        font-size: 16px;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .featured-cases-grid .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .featured-cases-grid .case-image {
        height: auto;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 18px;
        min-height: 44px;
    }

    .featured-cases-grid .case-price span {
        font-size: 20px;
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 16px;
        min-height: 40px;
    }

    .classic-cases-grid .case-price span {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .hero-banner {
        margin: 18px auto 12px;
        height: auto;
        min-height: 200px;
        padding: 0 8px;
        border-radius: 14px;
    }

    .banner-content {
        padding: 16px;
        gap: 16px;
    }

    .hero-center.hero-center-mobile>div {
        min-height: 200px;
        padding: 16px 0;
    }

    .bonus-card {
        min-height: 280px;
        padding: 24px 20px;
        margin-bottom: 20px;
    }

    .bonus-card .bonus-header h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .bonus-card .percentage {
        font-size: 2rem;
    }

    .bonus-card .code {
        font-size: 1rem;
        padding: 12px;
        margin-bottom: 18px;
    }

    .bonus-card .copy-btn {
        font-size: 1rem;
        padding: 12px 16px;
    }

    .lorem-block {
        min-height: 140px;
        padding: 18px 14px;
        font-size: 0.95rem;
    }

    .lorem-block h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .invite-friends-bonus {
        min-height: 300px;
        padding: 18px 14px;
        font-size: 0.9rem;
    }

    .invite-friends-bonus h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus ol {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .invite-steps {
        margin: 0 0 12px 0;
        padding: 0 0 0 16px;
        font-size: 0.85rem;
    }

    .cases-section {
        padding: 0 10px;
        margin-bottom: 25px;
    }

    .filters {
        padding: 16px 12px;
        gap: 16px;
        margin-bottom: 25px;
        border-radius: 14px;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.9), rgba(23, 19, 61, 0.85));
        box-shadow: 0 6px 25px rgba(126, 34, 206, 0.18);
    }

    .filters-row {
        flex-direction: column;
        gap: 20px;
    }

    .search-container {
        height: 52px;
        width: 100%;
        border-radius: 14px;
        border: 2px solid rgba(147, 51, 234, 0.4);
        background: rgba(15, 23, 42, 0.85);
        box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.15) inset;
        transition: all 0.3s ease;
    }

    .search-container:focus-within {
        border-color: rgba(147, 51, 234, 0.8);
        box-shadow: 0 0 25px rgba(126, 34, 206, 0.4);
        transform: translateY(-2px);
    }

    .search {
        font-size: 16px;
        padding: 0 20px;
        height: 48px;
        border-radius: 12px;
        color: #ffffff;
        letter-spacing: 0.4px;
        font-weight: 500;
    }

    .search::placeholder {
        color: rgba(148, 163, 184, 0.8);
        font-size: 15px;
    }

    .search-container button {
        width: 52px;
        height: 48px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.7), rgba(126, 34, 206, 0.8));
        transition: all 0.3s ease;
    }

    .search-container button:hover {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.9), rgba(126, 34, 206, 1));
        transform: scale(1.08);
    }

    .filter-buttons {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0 14px;
        height: 48px;
        font-size: 14px;
        border-radius: 14px;
        background: linear-gradient(135deg, rgba(79, 17, 147, 0.75), rgba(126, 34, 206, 0.65));
        border: 1px solid rgba(147, 51, 234, 0.5);
        color: #ffffff;
        font-weight: 700;
        letter-spacing: 0.4px;
        transition: all 0.3s ease;
        flex: 1;
        min-width: 110px;
        max-width: 140px;
        text-transform: uppercase;
        box-shadow: 0 2px 8px rgba(126, 34, 206, 0.15);
    }

    .filter-btn:hover,
    .filter-btn:active {
        background: linear-gradient(135deg, rgba(126, 34, 206, 0.85), rgba(147, 51, 234, 0.75));
        box-shadow: 0 6px 20px rgba(126, 34, 206, 0.5);
        transform: translateY(-3px) scale(1.02);
    }

    .price-filter {
        background: rgba(15, 23, 42, 0.7);
        border-radius: 14px;
        padding: 18px;
        border: 1px solid rgba(147, 51, 234, 0.3);
        box-shadow: 0 2px 12px rgba(126, 34, 206, 0.1);
    }

    .price-range {
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 600;
    }

    .price-slider {
        height: 10px;
        border-radius: 5px;
        background: linear-gradient(to right, rgba(79, 17, 147, 0.8), rgba(126, 34, 206, 1));
    }

    .price-slider::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
        border: 3px solid rgba(255, 255, 255, 1);
        box-shadow: 0 3px 12px rgba(126, 34, 206, 0.7);
    }

    .current-price {
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: #ffffff;
        margin-top: 10px;
        text-shadow: 0 1px 3px rgba(126, 34, 206, 0.3);
    }

    .section-title {
        margin: 25px 0 15px;
    }

    .section-title h2 {
        font-size: 18px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
        gap: clamp(12px, 1.5vw, 15px);
        margin-bottom: clamp(15px, 2vw, 25px);
    }

    .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .case-content {
        padding: clamp(10px, 1.2vw, 12px);
    }

    .case-card .case-card-title {
        font-size: clamp(13px, 1.8vw, 15px);
        min-height: clamp(30px, 3.5vw, 36px);
        max-height: clamp(36px, 4.5vw, 45px);
        margin-bottom: clamp(6px, 1vw, 10px);
    }

    .case-image {
        flex: 1;
        min-height: 0;
    }

    .case-price {
        padding: 5px 18px;
        margin-top: -12px;
    }

    .case-price span {
        font-size: 16px;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    }

    .featured-cases-grid .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .featured-cases-grid .case-image {
        flex: 1;
        min-height: 0;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 18px;
        min-height: 44px;
    }

    .featured-cases-grid .case-price span {
        font-size: 20px;
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 16px;
        min-height: 40px;
    }

    .classic-cases-grid .case-price span {
        font-size: 18px;
    }
}

/* Ensure classic cases are always readable on mobile */
@media (max-width: 768px) {
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .classic-cases-grid .case-image {
        flex: 1.3 !important;
        min-height: 0 !important;
        margin-bottom: 4px !important;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.1) !important;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 13px !important;
        line-height: 1.25 !important;
        min-height: 44px !important;
        white-space: normal !important;
        padding: 0 2px !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .classic-cases-grid .case-price {
        margin-top: 2px !important;
        padding: 4px 10px !important;
        gap: 6px !important;
    }

    .classic-cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.8 !important;
    }

    .classic-cases-grid .case-price span {
        font-size: clamp(13px, 4vw, 18px) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }

    .classic-cases-grid .favorite-heart svg {
        width: 16px !important;
        height: 16px !important;
    }
}

@media (max-width: 480px) {
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .classic-cases-grid .case-image {
        flex: 1.3 !important;
        min-height: 0 !important;
        margin-bottom: 4px !important;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.15) !important;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 12px !important;
        min-height: 40px !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
        padding: 0 2px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .classic-cases-grid .case-price {
        margin-top: 0 !important;
        padding: 3px 8px !important;
        gap: 6px !important;
    }

    .classic-cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.85 !important;
    }

    .classic-cases-grid .case-price span {
        font-size: clamp(12px, 4.6vw, 17px) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: calc(100% - 24px) !important;
    }

    .classic-cases-grid .favorite-heart svg {
        width: 15px !important;
        height: 15px !important;
    }
}

@media screen and (max-width: 320px) {
    .hero-banner {
        margin: 15px auto 10px;
        height: auto;
        min-height: 180px;
        padding: 0 6px;
        border-radius: 12px;
    }

    .banner-content {
        padding: 12px;
        gap: 12px;
    }

    .hero-center.hero-center-mobile>div {
        min-height: 180px;
        padding: 12px 0;
    }

    .bonus-card {
        min-height: 260px;
        padding: 20px 16px;
        margin-bottom: 18px;
    }

    .bonus-card .bonus-header h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .bonus-card .percentage {
        font-size: 1.8rem;
    }

    .bonus-card .code {
        font-size: 0.95rem;
        padding: 10px;
        margin-bottom: 15px;
    }

    .bonus-card .copy-btn {
        font-size: 0.95rem;
        padding: 10px 14px;
    }

    .lorem-block {
        min-height: 120px;
        padding: 14px 10px;
        font-size: 0.9rem;
    }

    .lorem-block h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .invite-friends-bonus {
        min-height: 280px;
        padding: 14px 10px;
        font-size: 0.85rem;
    }

    .invite-friends-bonus h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus ol {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .invite-steps {
        margin: 0 0 10px 0;
        padding: 0 0 0 14px;
        font-size: 0.75rem;
    }

    .cases-section {
        padding: 0 6px;
        margin-bottom: 18px;
    }

    .filters {
        padding: 12px 10px;
        gap: 12px;
        margin-bottom: 18px;
        border-radius: 12px;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.9), rgba(23, 19, 61, 0.85));
        box-shadow: 0 4px 20px rgba(126, 34, 206, 0.18);
    }

    .filters-row {
        flex-direction: column;
        gap: 16px;
    }

    .search-container {
        height: 44px;
        width: 100%;
        border-radius: 12px;
        border: 2px solid rgba(147, 51, 234, 0.4);
        background: rgba(15, 23, 42, 0.85);
        box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.15) inset;
        transition: all 0.3s ease;
    }

    .search-container:focus-within {
        border-color: rgba(147, 51, 234, 0.8);
        box-shadow: 0 0 20px rgba(126, 34, 206, 0.4);
        transform: translateY(-1px);
    }

    .search {
        font-size: 14px;
        padding: 0 16px;
        height: 40px;
        border-radius: 10px;
        color: #ffffff;
        letter-spacing: 0.3px;
        font-weight: 500;
    }

    .search::placeholder {
        color: rgba(148, 163, 184, 0.8);
        font-size: 13px;
    }

    .search-container button {
        width: 44px;
        height: 40px;
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.7), rgba(126, 34, 206, 0.8));
        transition: all 0.3s ease;
    }

    .search-container button:hover {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.9), rgba(126, 34, 206, 1));
        transform: scale(1.05);
    }

    .filter-buttons {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0 12px;
        height: 40px;
        font-size: 12px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(79, 17, 147, 0.75), rgba(126, 34, 206, 0.65));
        border: 1px solid rgba(147, 51, 234, 0.5);
        color: #ffffff;
        font-weight: 700;
        letter-spacing: 0.3px;
        transition: all 0.3s ease;
        flex: 1;
        min-width: 90px;
        max-width: 120px;
        text-transform: uppercase;
        box-shadow: 0 2px 6px rgba(126, 34, 206, 0.15);
    }

    .filter-btn:hover,
    .filter-btn:active {
        background: linear-gradient(135deg, rgba(126, 34, 206, 0.85), rgba(147, 51, 234, 0.75));
        box-shadow: 0 4px 16px rgba(126, 34, 206, 0.5);
        transform: translateY(-2px) scale(1.02);
    }

    .price-filter {
        background: rgba(15, 23, 42, 0.7);
        border-radius: 12px;
        padding: 14px;
        border: 1px solid rgba(147, 51, 234, 0.3);
        box-shadow: 0 2px 10px rgba(126, 34, 206, 0.1);
    }

    .price-range {
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 600;
    }

    .price-slider {
        height: 8px;
        border-radius: 4px;
        background: linear-gradient(to right, rgba(79, 17, 147, 0.8), rgba(126, 34, 206, 1));
    }

    .price-slider::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
        border: 2px solid rgba(255, 255, 255, 1);
        box-shadow: 0 2px 10px rgba(126, 34, 206, 0.7);
    }

    .current-price {
        text-align: center;
        font-size: 14px;
        font-weight: 700;
        color: #ffffff;
        margin-top: 8px;
        text-shadow: 0 1px 2px rgba(126, 34, 206, 0.3);
    }

    .section-title {
        margin: 20px 0 12px;
    }

    .section-title h2 {
        font-size: 16px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
        gap: clamp(10px, 1.2vw, 12px);
        margin-bottom: clamp(15px, 2vw, 20px);
    }

    .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .case-content {
        padding: clamp(6px, 1vw, 8px);
    }

    .case-card .case-card-title {
        font-size: clamp(10px, 1.5vw, 11px);
        min-height: clamp(24px, 3vw, 28px);
        max-height: clamp(28px, 3.5vw, 35px);
        margin-bottom: clamp(4px, 0.8vw, 6px);
    }

    .case-image {
        flex: 1;
        min-height: 0;
        margin-bottom: -8px;
    }

    .case-price {
        padding: clamp(2px, 0.5vw, 3px) clamp(8px, 1.2vw, 10px);
        margin-top: -10px;
    }

    .case-price span {
        font-size: clamp(11px, 1.8vw, 12px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    }

    .featured-cases-grid .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .featured-cases-grid .case-image {
        flex: 1;
        min-height: 0;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: clamp(13px, 2vw, 15px);
        min-height: clamp(30px, 3.5vw, 36px);
        max-height: clamp(36px, 4.5vw, 45px);
    }

    .featured-cases-grid .case-price span {
        font-size: clamp(14px, 2.2vw, 16px);
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    }

    .classic-cases-grid .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .classic-cases-grid .case-image {
        flex: 1.25;
        min-height: 0;
        margin-bottom: -8px;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.1);
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: clamp(11px, 1.8vw, 12px);
        min-height: clamp(24px, 3vw, 28px);
        max-height: clamp(28px, 3.5vw, 35px);
        margin-bottom: clamp(4px, 0.8vw, 6px);
    }

    .classic-cases-grid .case-price {
        margin-top: -10px;
    }

    .classic-cases-grid .case-price span {
        font-size: clamp(12px, 2vw, 13px);
    }
}

/* Оптимізація для екранів менше 482×810 */
@media screen and (max-width: 482px) and (max-height: 810px) {

    /* Кнопки в мобільних сундуках - завжди в один ряд */
    .case-card .case-content .buttons-container,
    .case-content .buttons-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: 100%;
        justify-content: center;
        align-items: center;
        margin-top: 10px;
    }

    .case-card .case-content .buttons-container>*,
    .case-content .buttons-container>* {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        font-size: 12px !important;
        padding: 0 8px !important;
        height: 32px !important;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Специфічні стилі для кнопок в сундуках */
    .case-card #buy-case-button,
    .case-card #add-balance-button,
    .case-card #open-case-button,
    .case-content #buy-case-button,
    .case-content #add-balance-button,
    .case-content #open-case-button {
        font-size: 12px !important;
        padding: 0 8px !important;
        height: 32px !important;
        letter-spacing: 1px !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
    }

    .case-card {
        height: 300px;
    }

    .case-content {
        padding: 18px;
    }

    .case-card .case-card-title {
        font-size: 17px;
        min-height: 44px;
        margin-bottom: 14px;
    }

    .case-image {
        height: 180px;
        margin-bottom: 4px;
    }

    .case-price {
        padding: 8px 22px;
        margin-top: -18px;
    }

    .case-price span {
        font-size: 19px;
    }

    /* Оптимізація для featured cases */
    .featured-cases-grid .case-card {
        height: 260px;
    }

    .featured-cases-grid .case-image {
        height: 180px;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 22px;
        min-height: 52px;
    }

    .featured-cases-grid .case-price {
        margin-top: -20px;
    }

    .featured-cases-grid .case-price span {
        font-size: 24px;
    }

    /* Оптимізація для classic cases */
    .classic-cases-grid .case-card {
        height: 240px;
    }

    .classic-cases-grid .case-image {
        height: 140px;
        margin-bottom: -8px;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 16px;
        min-height: 40px;
        margin-bottom: 10px;
    }

    .classic-cases-grid .case-price {
        margin-top: -12px;
    }

    .classic-cases-grid .case-price span {
        font-size: 18px;
    }
}

/* Медиа-запрос для очень маленьких экранов (меньше 320px) */
@media screen and (max-width: 280px) {
    .hero-banner {
        margin: 12px auto 8px;
        height: auto;
        min-height: 140px;
        padding: 0 4px;
        border-radius: 10px;
    }

    .banner-content {
        padding: 8px;
        gap: 8px;
    }

    .hero-center.hero-center-mobile>div {
        min-height: 140px;
        padding: 8px 0;
    }

    .bonus-card {
        min-height: 220px;
        padding: 16px 12px;
        margin-bottom: 15px;
    }

    .bonus-card .bonus-header h3 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .bonus-card .percentage {
        font-size: 1.6rem;
    }

    .bonus-card .code {
        font-size: 0.9rem;
    }

    .bonus-card .copy-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
        height: 28px;
    }

    .lorem-block {
        min-height: 100px;
        padding: 12px;
        margin-bottom: 15px;
    }

    .lorem-block h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .invite-friends-bonus {
        min-height: 240px;
        padding: 12px;
        margin-bottom: 15px;
    }

    .invite-friends-bonus h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus a {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .invite-steps {
        gap: 8px;
        margin-top: 12px;
    }

    .cases-section {
        margin-top: 15px;
    }

    .filters {
        padding: 8px;
        margin-bottom: 15px;
        border-radius: 8px;
        gap: 8px;
    }

    .filters-row {
        gap: 8px;
        margin-bottom: 8px;
    }

    .search-container {
        height: 36px;
        border-radius: 6px;
    }

    .search-container:focus-within {
        border-color: #00ff88;
        box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
    }

    .search {
        font-size: 12px;
        padding: 0 8px;
    }

    .search::placeholder {
        font-size: 12px;
    }

    .search-container button {
        width: 36px;
        height: 36px;
    }

    .search-container button:hover {
        background-color: rgba(0, 255, 136, 0.1);
    }

    .filter-buttons {
        gap: 6px;
        flex-wrap: wrap;
    }

    .filter-btn {
        height: 32px;
        padding: 0 8px;
        font-size: 11px;
        border-radius: 6px;
        gap: 4px;
    }

    .filter-btn img {
        width: 14px;
        height: 14px;
    }

    .filter-btn:hover,
    .filter-btn:active {
        background-color: rgba(0, 255, 136, 0.15);
        transform: translateY(-1px);
    }

    .price-filter {
        margin-top: 8px;
        padding: 8px;
        border-radius: 6px;
    }

    .price-range {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .price-slider {
        height: 6px;
        border-radius: 3px;
    }

    .price-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
        border-radius: 50%;
    }

    .current-price {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 4px;
    }

    .section-title {
        margin: 20px 0 15px;
    }

    .section-title h2 {
        font-size: 16px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 10px;
        margin-bottom: 20px;
    }

    .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .case-content {
        padding: 10px;
    }

    .case-card .case-card-title {
        font-size: 12px;
        min-height: 32px;
        margin-bottom: 8px;
    }

    .case-image {
        height: auto;
        margin-bottom: -5px;
    }

    .case-price {
        padding: 4px 12px;
        margin-top: -8px;
    }

    .case-price span {
        font-size: 13px;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .featured-cases-grid .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .featured-cases-grid .case-image {
        height: auto;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 15px;
        min-height: 40px;
    }

    .featured-cases-grid .case-price {
        margin-top: -12px;
    }

    .featured-cases-grid .case-price span {
        font-size: 16px;
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .classic-cases-grid .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .classic-cases-grid .case-image {
        height: auto;
        margin-bottom: -5px;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 13px;
        min-height: 32px;
        margin-bottom: 8px;
    }

    .classic-cases-grid .case-price {
        margin-top: -8px;
    }

    .classic-cases-grid .case-price span {
        font-size: 14px;
    }
}

/* Hero Banner Inline Styles */
.hero-banner {
    margin-top: 20px;
    position: relative;
    max-width: 1700px;
    width: 100%;
    padding: 0 20px;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.banner-content {
    display: flex;
    width: 100%;
    gap: 20px;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    min-height: 0;
    flex-wrap: wrap;
    flex-direction: row;
}

.hero-left-col {
    flex: 1;
    min-width: 320px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
}

.lorem-block {
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    padding: 16px 18px;
    color: #fff;
    max-width: 420px;
    margin: 0 auto 0 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    height: auto;
    width: 100%;
    box-sizing: border-box;
}

.lorem-block>div {
    position: relative;
    z-index: 2;
}

.lorem-block h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.lorem-block p {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

#bonus-balance-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #bbf7d0;
    font-size: 1.08rem;
    font-family: monospace;
    outline: none;
    padding: 0;
    border-radius: 0;
    min-width: 0;
    font-weight: 400;
    letter-spacing: 0;
    opacity: 0;
    position: absolute;
    left: -9999px;
}

#bonus-balance-text {
    color: #bbf7d0;
    font-size: 1.08rem;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 6px;
    display: block;
}

#bonus-copied {
    display: none;
    color: #22c55e;
    font-size: 0.9rem;
    margin-top: 3px;
}

.lorem-block span[style*="color:#bbf7d0"] {
    color: #bbf7d0;
    font-size: 1.18rem;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 8px;
    display: block;
    line-height: 1.4;
}

#bonus-card-img {
    position: absolute;
    right: -50px;
    bottom: -50px;
    height: 200px;
    width: auto;
    opacity: 0.19;
    z-index: 1;
    pointer-events: none;
    user-select: none;
}

.invite-friends-bonus {
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    padding: 28px 24px;
    color: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.invite-friends-bonus>div {
    position: relative;
    z-index: 2;
}

.invite-friends-bonus h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.invite-friends-bonus .invite-steps {
    font-size: 0.98rem;
    margin-bottom: 14px;
    color: #d1fae5;
}

#invite-link-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #bbf7d0;
    font-size: 1.06rem;
    font-family: monospace;
    font-weight: 700;
    outline: none;
    padding: 0;
    border-radius: 0;
    min-width: 0;
    opacity: 0;
    position: absolute;
    left: -9999px;
}

#invite-link-text {
    color: #bbf7d0;
    font-size: 1.06rem;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 8px;
    display: block;
}

.invite-friends-bonus p[style*="margin-top:10px"] {
    margin-top: 10px;
    font-size: 13px;
    color: #d1fae5;
}

#invite-card-img {
    position: absolute;
    right: -80px;
    bottom: -80px;
    height: 300px;
    width: auto;
    opacity: 0.21;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 8px 32px #0008);
}

.hero-center.hero-center-mobile {
    flex: 2;
    min-width: 340px;
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 20;
    height: 100%;
    min-height: 0;
}

#slider-banner {
    width: 100%;
    height: 100%;
    flex: 1;
    text-align: center;
    padding: 32px 0;
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    position: relative;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    z-index: 20;
    isolation: isolate;
}

#slider-content {
    position: relative;
    z-index: 3;
    min-height: 120px;
    max-width: 100%;
    box-sizing: border-box;
    will-change: transform, opacity;
    transform-origin: center center;
    backface-visibility: hidden;
}

#slider-content .slider-highlight-green {
    color: #22c55e;
}

#slider-content .slider-highlight-gold {
    color: #f6c945;
    font-weight: 700;
    text-shadow: 0 0 9px rgba(246, 201, 69, 0.32);
}

#slider-dots {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    z-index: 3;
}

#slider-gradient {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    transition: background 0.3s ease;
}

.slider-arrows {
    display: flex;
    gap: 32px;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    z-index: 2;
}

#slider-arrow-left,
#slider-arrow-right {
    background: rgba(23, 19, 61, 0.7);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#logo-slideshow {
    position: absolute;
    right: -190px;
    bottom: -60px;
    max-width: 720px;
    max-height: 520px;
    opacity: 0.22;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, bottom 0.5s ease;
}

#logo-name-silver {
    position: absolute;
    right: 24px;
    bottom: 18px;
    max-width: 120px;
    height: auto;
    opacity: 1;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
}

.creator-promo-banner .banner-side-gradient {
    display: none !important;
    /* side gradients removed, using banner-gradient-layer on the right instead */
}

.creator-promo-banner .banner-side-gradient-left,
.creator-promo-banner .banner-side-gradient-right {
    display: none !important;
}

.hero-center img {
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .hero-banner {
        padding: 0 10px !important;
        margin: 20px auto !important;
    }

    .banner-content {
        flex-direction: column !important;
        gap: 20px !important;
        align-items: stretch !important;
        padding: 20px !important;
        margin-bottom: 40px !important;
    }

    .hero-left-col {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
        gap: 16px !important;
        order: 2;
    }

    .hero-center.hero-center-mobile {
        flex: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        order: 1;
    }

    .hero-center.hero-center-mobile>div {
        padding: 16px 0 !important;
        min-height: 140px !important;
    }

    .lorem-block,
    .invite-friends-bonus {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 12px !important;
    }

    .lorem-block {
        padding: 20px 16px !important;
        font-size: 0.9rem !important;
        min-height: 140px !important;
        height: auto !important;
    }

    .invite-friends-bonus {
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
        min-height: 180px !important;
        overflow: hidden !important;
    }

    #logo-slideshow {
        right: -80px !important;
        bottom: -30px !important;
        max-width: 450px !important;
        max-height: 350px !important;
        opacity: 0.18 !important;
    }

    #logo-name-silver {
        right: 20px !important;
        bottom: 15px !important;
        max-width: 120px !important;
    }

    #bonus-card-img {
        right: -20px !important;
        bottom: -30px !important;
        height: 100px !important;
        opacity: 0.15 !important;
    }

    #invite-card-img {
        right: -40px !important;
        bottom: -50px !important;
        height: 150px !important;
        opacity: 0.18 !important;
    }

    .slider-arrows button {
        width: 36px !important;
        height: 36px !important;
    }

    .slider-arrows {
        bottom: 16px !important;
    }

    /* Tablet: make Creator banner compact and stop layout shifts */
    @media (max-width: 1024px) {
        .creator-promo-banner {
            margin: 10px 0 !important;
            padding: 8px 12px !important;
            border-radius: 12px !important;
            max-height: 84px !important;
            align-items: center !important;
            box-sizing: border-box !important;
        }

        .creator-promo-banner .banner-gradient-layer {
            width: 24% !important;
            opacity: 0.6 !important;
            border-top-right-radius: 12px !important;
            border-bottom-right-radius: 12px !important;
        }

        .creator-promo-banner .banner-content-inner {
            padding-right: 16px !important;
        }

        .creator-promo-banner .banner-text {
            font-size: 13px !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
    }

    #slider-dots {
        top: 12px !important;
    }

    .case-card-title {
        font-size: 1rem !important;
    }
}

@media (max-width: 600px) {
    .hero-banner {
        padding: 0 8px !important;
        margin: 15px auto !important;
    }

    .banner-content {
        padding: 16px !important;
        gap: 16px !important;
        margin-bottom: 10px !important;
    }

    .hero-center.hero-center-mobile>div {
        padding: 12px 0 !important;
        min-height: 120px !important;
    }

    .lorem-block {
        padding: 16px 12px !important;
        font-size: 0.9rem !important;
        min-height: 120px !important;
        height: auto !important;
    }

    .invite-friends-bonus {
        padding: 8px 6px !important;
        font-size: 0.75rem !important;
        min-height: 200px !important;
    }

    .lorem-block h3 {
        font-size: 0.95rem !important;
    }

    .invite-friends-bonus h3 {
        font-size: 1rem !important;
    }

    #bonus-card-img {
        height: 80px !important;
        right: -15px !important;
        bottom: -25px !important;
    }

    #invite-card-img {
        height: 120px !important;
        right: -30px !important;
        bottom: -40px !important;
    }

    .slider-arrows button {
        width: 32px !important;
        height: 32px !important;
    }

    .case-card-title {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        padding: 0 5px !important;
        margin: 12px auto !important;
    }

    .banner-content {
        padding: 12px !important;
        gap: 12px !important;
        margin-bottom: 8px !important;
    }

    .hero-center.hero-center-mobile>div {
        padding: 16px 0 !important;
        min-height: 180px !important;
    }

    .lorem-block,
    .invite-friends-bonus {
        padding: 12px 10px !important;
        font-size: 0.85rem !important;
    }

    .lorem-block {
        min-height: 120px !important;
        height: auto !important;
    }

    .invite-friends-bonus {
        min-height: 120px !important;
    }

    .lorem-block h3 {
        font-size: 0.9rem !important;
    }

    .invite-friends-bonus h3 {
        font-size: 0.95rem !important;
    }

    #logo-slideshow {
        right: -60px !important;
        bottom: -25px !important;
        max-width: 380px !important;
        max-height: 280px !important;
        opacity: 0.22 !important;
    }

    #logo-name-silver {
        right: 10px !important;
        bottom: 8px !important;
        max-width: 100px !important;
    }

    #bonus-card-img {
        height: 60px !important;
        right: -10px !important;
        bottom: -20px !important;
    }

    #invite-card-img {
        height: 90px !important;
        right: -20px !important;
        bottom: -30px !important;
    }

    .slider-arrows button {
        width: 28px !important;
        height: 28px !important;
    }

    .slider-arrows {
        bottom: 12px !important;
        gap: 20px !important;
    }

    #slider-dots {
        top: 8px !important;
        gap: 8px !important;
    }

    .cases-section {
        margin-top: 5px !important;
    }

    .filters {
        margin-top: 4px !important;
    }

    .beginners-cases-grid .case-image {
        height: 220px;
    }

    .beginners-cases-grid .case-image img {
        transform: translateY(-18px) scale(1.38) !important;
        max-height: 135% !important;
    }

    .beginners-cases .case-image {
        height: 220px;
    }

    .beginners-cases .case-image img {
        transform: translateY(-18px) scale(1.38) !important;
        max-height: 135% !important;
    }

    .beginners-cases .case-price {
        margin-top: -10px;
    }

    .cases-grid .case-image img {
        transform: scale(1.20) !important;
        max-height: 122% !important;
    }

    .featured-cases-grid .case-image img {
        transform: scale(1.24) !important;
        max-height: 127% !important;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.16) !important;
        max-height: 120% !important;
    }

    .featured-cases-grid .case-card .case-card-title {
        text-transform: none !important;
        letter-spacing: 0.02em;
    }
}

@media (max-width: 500px) {
    .hero-banner {
        padding: 0 8px !important;
        margin: 15px auto !important;
    }

    .banner-content {
        padding: 16px !important;
        gap: 16px !important;
        margin-bottom: 8px !important;
    }

    .hero-left-col {
        gap: 20px !important;
    }

    .lorem-block {
        min-height: 160px !important;
        padding: 24px 20px !important;
        font-size: 0.9rem !important;
    }

    .invite-friends-bonus {
        min-height: 280px !important;
        padding: 35px 25px !important;
        font-size: 0.95rem !important;
    }

    .lorem-block h3 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }

    .lorem-block p {
        font-size: 0.9rem !important;
        margin-bottom: 14px !important;
    }

    .invite-friends-bonus h3 {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
    }

    .invite-friends-bonus p {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
    }

    .invite-steps {
        font-size: 0.9rem !important;
        margin-bottom: 16px !important;
    }

    .invite-steps li {
        margin-bottom: 6px !important;
    }

    #bonus-card-img {
        height: 120px !important;
        right: -30px !important;
        bottom: -40px !important;
        opacity: 0.2 !important;
    }

    #invite-card-img {
        height: 280px !important;
        right: -90px !important;
        bottom: -100px !important;
        opacity: 0.25 !important;
    }

    .cases-section {
        margin-top: 5px !important;
    }

    .filters {
        margin-top: 3px !important;
    }

    .search-container {
        margin-bottom: 20px !important;
    }
}

/* Reduce slider font size when side banner is expanded on PC */
#creator-promo-banner:not(.banner-closing):not([style*="display: none"])~#slider-banner #slider-content h1 {
    font-size: 1.8rem !important;
}

#creator-promo-banner:not(.banner-closing):not([style*="display: none"])~#slider-banner #slider-content p {
    font-size: 1rem !important;
}

@media (min-width: 1025px) and (max-width: 1300px) {
    #slider-content h1 {
        font-size: 1.9rem !important;
    }

    #slider-content p {
        font-size: 1rem !important;
    }
}

@media (max-width: 1024px) {
    #slider-banner {
        height: 100% !important;
        min-height: 550px !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    #slider-content {
        min-height: 400px !important;
        max-height: none !important;
        height: 100% !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
    }

    .hero-center.hero-center-mobile {
        height: 100% !important;
        min-height: 550px !important;
        max-height: none !important;
    }

    .hero-center.hero-center-mobile>div {
        height: 100% !important;
        min-height: 550px !important;
        max-height: none !important;
        padding: 16px 16px !important;
    }
}

@media (max-width: 768px) {
    #slider-banner {
        height: 100% !important;
        min-height: 500px !important;
        max-height: none !important;
    }

    #slider-content {
        min-height: 400px !important;
        max-height: none !important;
        height: 100% !important;
    }

    .hero-center.hero-center-mobile {
        height: 100% !important;
        min-height: 500px !important;
        max-height: none !important;
    }

    .hero-center.hero-center-mobile>div {
        height: 100% !important;
        min-height: 500px !important;
        max-height: none !important;
    }
}

@media (max-width: 480px) {
    #slider-banner {
        height: 100% !important;
        min-height: 460px !important;
        max-height: none !important;
    }

    #slider-content {
        min-height: 360px !important;
        max-height: none !important;
        height: 100% !important;
    }

    .hero-center.hero-center-mobile {
        height: 100% !important;
        min-height: 460px !important;
        max-height: none !important;
    }

    .hero-center.hero-center-mobile>div {
        height: 100% !important;
        min-height: 460px !important;
        max-height: none !important;
    }
}

/* Adjust classic cases price position around ~600x800 and similar portrait ranges */
@media screen and (min-width: 560px) and (max-width: 820px) {
    .classic-cases-grid .case-price {
        margin-top: -20px !important;
    }
}

/* Narrow portrait window like 600x800: tighten image and lift price */
@media screen and (min-width: 560px) and (max-width: 680px) and (min-height: 760px) and (orientation: portrait) {
    .classic-cases-grid .case-image {
        height: 150px !important;
    }

    .classic-cases-grid .case-price {
        margin-top: -16px !important;
    }
}

@media screen and (max-width: 800px) and (max-height: 420px) and (orientation: landscape) {
    .featured-cases-grid .case-image {
        height: 160px !important;
    }

    .featured-cases-grid .case-image img {
        transform: none !important;
        max-height: 100% !important;
    }

    .featured-cases-grid .case-price {
        margin-top: -10px !important;
    }

    .beginners-cases .case-image,
    .beginners-cases-grid .case-image {
        height: 150px !important;
    }

    .beginners-cases .case-image img,
    .beginners-cases-grid .case-image img {
        transform: none !important;
        max-height: 100% !important;
    }

    .beginners-cases .case-price,
    .beginners-cases-grid .case-price {
        margin-top: -8px !important;
    }

    .classic-cases-grid .case-image {
        height: 150px !important;
    }

    .classic-cases-grid .case-image img {
        transform: none !important;
        max-height: 100% !important;
    }

    .classic-cases-grid .case-price {
        margin-top: -25px !important;
    }
}

/* Mobile bottom search bar */
.mobile-search-bar {
    --mobile-search-keyboard-offset: 0px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 600px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px + var(--mobile-search-keyboard-offset));
    display: none;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
    border: 1px solid rgba(147, 51, 234, 0.35);
    border-radius: 20px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(147, 51, 234, 0.15);
    z-index: 50;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    padding: 4px;
}

.mobile-search-bar.mobile-search-bar--footer-hidden {
    transform: translateX(-50%) translateY(200%);
    opacity: 0;
    pointer-events: none;
}

.mobile-search-bar.mobile-search-bar--footer-hidden .mobile-scroll-top {
    opacity: 0;
    pointer-events: none;
}

.mobile-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 56px 10px 10px;
    border-radius: 18px;
}

.mobile-search-bar.input-active {
    z-index: 10010;
}

.mobile-search-keyboard-open .mobile-search-bar,
body.mobile-search-keyboard-open .mobile-search-bar {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px) + var(--mobile-search-keyboard-offset));
}

.mobile-search-bar.input-active .mobile-search-inner {
    display: block;
    width: 100%;
    min-width: 0;
    padding-right: 12px;
}

.mobile-search-bar.input-active .search-mode-toggle {
    display: none !important;
}

.mobile-search-bar.input-active #mobileSelectedSkinsContainer,
.mobile-search-bar.input-active .mobile-filter-row {
    display: none !important;
}

.mobile-search-bar.input-active .search-mode-row {
    display: block;
    width: 100%;
    gap: 0;
}

.mobile-search-bar.input-active .search-mode-panel {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    max-width: 100% !important;
}

.mobile-search-bar.input-active .mobile-skin-search-row,
.mobile-search-bar.input-active .mobile-case-search-row,
.mobile-search-bar.input-active .mobile-author-search-row {
    display: grid;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.mobile-search-bar.input-active .mobile-skin-search-row {
    grid-template-columns: 88px minmax(0, 1fr);
}

.mobile-search-bar.input-active .mobile-case-search-row,
.mobile-search-bar.input-active .mobile-author-search-row {
    grid-template-columns: minmax(0, 1fr);
}

.mobile-search-bar.input-active .mobile-skin-name-input-wrap,
.mobile-search-bar.input-active .mobile-skin-name-input-wrap.case-search-wrap,
.mobile-search-bar.input-active .mobile-skin-name-input-wrap.author-search-wrap {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
}

.mobile-search-bar.input-active .mobile-skin-type-select-wrap {
    flex: 0 0 88px;
    min-width: 88px;
    max-width: 88px;
}

.mobile-search-bar.input-active .mobile-skin-type-select-wrap .skin-type-selected {
    padding: 0 28px 0 10px;
    font-size: 12px;
}

.mobile-search-keyboard-open .mobile-search-bar .mobile-scroll-top,
body.mobile-search-keyboard-open .mobile-search-bar .mobile-scroll-top {
    opacity: 0 !important;
    pointer-events: none !important;
}

.mobile-filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 10px 12px 10px;
}

.mobile-filter-row .filter-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: space-between !important;
    width: 100% !important;
    overflow: visible !important;
}

.mobile-filter-row .filter-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    max-height: 34px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    background: linear-gradient(135deg, rgba(126, 34, 206, 0.35), rgba(147, 51, 234, 0.45)) !important;
    border: 1px solid rgba(147, 51, 234, 0.4) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

.mobile-filter-row .filter-btn svg {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
}

.mobile-filter-row .filter-btn span {
    font-size: 10px !important;
    font-weight: 600 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
}

.mobile-filter-row .filter-btn:hover,
.mobile-filter-row .filter-btn:active {
    background: linear-gradient(135deg, rgba(126, 34, 206, 0.5), rgba(147, 51, 234, 0.6)) !important;
    transform: translateY(-1px) !important;
}

.mobile-filter-row .filter-btn.clear {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.5), rgba(100, 116, 139, 0.6)) !important;
    border-color: rgba(100, 116, 139, 0.5) !important;
}

.mobile-filter-row .filter-btn.clear:hover,
.mobile-filter-row .filter-btn.clear:active {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.65), rgba(100, 116, 139, 0.75)) !important;
}

.mobile-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(147, 51, 234, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-search-input-wrap .search {
    flex: 1;
    height: 36px;
    background: transparent;
    border: none;
    outline: none;
    color: #e2e8f0;
    font-size: 15px;
}

.mobile-skin-name-input-wrap,
.mobile-skin-name-input-wrap input,
#mobile-skin-search-dropdown,
#mobile-skin-search-dropdown .search-dropdown-item {
    pointer-events: auto !important;
}

.mobile-skin-name-input-wrap {
    position: relative;
    z-index: 2;
    isolation: isolate;
    touch-action: manipulation;
}

.mobile-skin-name-input-wrap input {
    touch-action: manipulation;
}

#mobile-skin-search-dropdown {
    touch-action: pan-y;
}

#mobile-skin-search-dropdown .search-dropdown-item {
    touch-action: manipulation;
}

.mobile-search-icon {
    flex-shrink: 0;
}

.mobile-clear {
    background: transparent;
    border: none;
    padding: 4px;
    margin: 0;
    display: none;
    cursor: pointer;
}

.mobile-current-price {
    color: #e2e8f0;
    font-size: 13px;
    opacity: 0.85;
    min-width: 70px;
    text-align: right;
}

.mobile-safe-area {
    height: env(safe-area-inset-bottom, 0);
}

.mobile-scroll-top {
    position: absolute;
    right: 10px;
    top: 10px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(126, 34, 206, 0.35));
    border: 1px solid rgba(147, 51, 234, 0.45);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(126, 34, 206, 0.25);
}

.mobile-scroll-top:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.35), rgba(126, 34, 206, 0.45));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(126, 34, 206, 0.35);
}

.mobile-scroll-top:active {
    transform: translateY(0);
}

/* Collapsed state for mobile bottom search bar */
.mobile-search-bar.collapsed .mobile-filter-row,
.mobile-search-bar.collapsed .mobile-search-inner,
.mobile-search-bar.collapsed #search-dropdown-mobile,
.mobile-search-bar.collapsed .mobile-safe-area {
    display: none !important;
}

.mobile-search-bar.collapsed {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translateX(-50%) translateY(200%);
}

.mobile-search-bar.collapsed .mobile-scroll-top {
    position: fixed;
    right: 12px;
    bottom: 12px;
    top: auto;
}

/* Hide arrow button when near footer */
.mobile-search-bar[style*="translateY(100%)"] .mobile-scroll-top {
    opacity: 0;
    pointer-events: none;
}

/* Bonus Card and Invite Friend Blocks Animation */
#bonus-block,
#invite-block,
#creator-promo-banner,
.earn-stats-mobile {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.3s ease, border 0.3s ease;
    overflow: hidden;
    border: 2px solid transparent;
}

#bonus-block:hover,
#invite-block:hover,
#creator-promo-banner:hover,
.earn-stats-mobile:hover {
    box-shadow: 0 8px 20px rgba(107, 42, 163, 0.25);
    border: 2px solid rgba(147, 51, 234, 0.5);
}

#bonus-block:active,
#invite-block:active,
#creator-promo-banner:active,
.earn-stats-mobile:active {
    transform: scale(0.97);
}

#bonus-block::before,
#invite-block::before,
.earn-stats-mobile::before {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(107, 42, 163, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
}

#bonus-block:hover::before,
#invite-block:hover::before,
.earn-stats-mobile:hover::before {
    opacity: 1;
    transform: translateY(0);
}

#bonus-block::after,
#invite-block::after,
.earn-stats-mobile::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    border-radius: 50%;
}

#bonus-block:active::after,
#invite-block:active::after,
#creator-promo-banner:active::after,
.earn-stats-mobile:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0.3;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.mobile-search-bar .search-dropdown.mobile {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 56px;
    background: rgba(2, 6, 23, 0.95);
    border: 1px solid rgba(147, 51, 234, 0.25);
    border-radius: 12px;
    box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.35);
    display: none;
    max-height: 40vh;
    overflow: auto;
    z-index: 51;
}

.mobile-price-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-price-filter .price-slider {
    flex: 1;
}

.mobile-current-price-inline {
    color: #e2e8f0;
    font-weight: 700;
    min-width: 72px;
    text-align: right;
}

@media (max-width: 768px),
screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px),
screen and (max-width: 1024px) and (max-height: 480px) {

    .cases-section .filters {
        display: flex !important;
    }

    .filters .search-container,
    .filters .filters-row {
        display: none;
    }

    .mobile-search-bar {
        display: block;
    }

    /* Bottom spacer only for pages with .cases-section (home page) */
    .cases-section~.bottom-spacer {
        height: 74px;
    }
}

@media (max-width: 480px) {

    /* Bottom spacer only for pages with .cases-section (home page) */
    .cases-section~.bottom-spacer {
        height: 82px;
    }
}

/* Position promo popups above mobile bottom bar */
@media (max-width: 768px),
screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px),
screen and (max-width: 1024px) and (max-height: 480px) {
    .promo-popups {
        top: auto !important;
        bottom: var(--popup-bottom-offset, 84px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
}

@media (max-width: 480px) {
    .promo-popups {
        bottom: var(--popup-bottom-offset, 92px) !important;
    }
}

/* Mobile price fit and underline visibility across all grids */
@media (max-width: 768px),
screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px),
screen and (max-width: 1024px) and (max-height: 480px) {
    .cases-grid .case-price {
        padding: 4px 12px !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .cases-grid .case-price span {
        font-size: clamp(14px, 4.2vw, 20px) !important;
        line-height: 1.1 !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.85 !important;
    }

    .cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Force 3 columns on tablet width to avoid 2-in-row issue */
@media screen and (min-width: 769px) and (max-width: 991px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5,
    .featured-cases-grid,
    .classic-cases-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .cases-grid .case-card,
    .featured-cases-grid .case-card,
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .cases-grid .case-image,
    .featured-cases-grid .case-image,
    .classic-cases-grid .case-image {
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Narrow desktop: enforce 3/4 columns for ordinary/classic cases */
@media screen and (min-width: 992px) and (max-width: 1025px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .beginners-cases-grid,
    .beginners-cases-grid.cases-grid-cols-4,
    .beginners-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .classic-cases-grid,
    .classic-cases-grid.cases-grid-cols-4,
    .classic-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .beginners-cases-grid .case-card,
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Portrait tablets and large phones: classic cases 3 columns between 600–710px */
@media screen and (min-width: 600px) and (max-width: 710px) {
    .classic-cases-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

@media (max-width: 480px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(10px, 1.5vw, 15px) !important;
        grid-auto-flow: row !important;
    }

    .featured-cases-grid,
    .featured-cases-grid.cases-grid-cols-4,
    .featured-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(10px, 1.5vw, 15px) !important;
        grid-auto-flow: row !important;
    }

    .classic-cases-grid,
    .classic-cases-grid.cases-grid-cols-4,
    .classic-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(10px, 1.5vw, 15px) !important;
        grid-auto-flow: row !important;
    }

    .beginners-cases-grid,
    .beginners-cases-grid.cases-grid-cols-4,
    .beginners-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(10px, 1.5vw, 15px) !important;
        grid-auto-flow: row !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .cases-grid .case-card,
    .featured-cases-grid .case-card,
    .classic-cases-grid .case-card,
    .beginners-cases-grid .case-card {
        min-width: 0 !important;
        width: 100% !important;
        grid-column: auto !important;
        aspect-ratio: 1 !important;
        height: auto !important;
    }

    .cases-grid .case-price {
        padding: 3px 10px !important;
        gap: 6px !important;
    }

    .cases-grid .case-price span {
        font-size: clamp(12px, 4.6vw, 18px) !important;
        line-height: 1.05 !important;
    }

    .cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.9 !important;
    }

    .cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

@media (min-width: 995px) and (max-width: 1025px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5,
    .featured-cases-grid,
    .classic-cases-grid,
    .beginners-cases-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 15px !important;
    }

    .cases-grid .case-card,
    .featured-cases-grid .case-card,
    .classic-cases-grid .case-card,
    .beginners-cases-grid .case-card {
        aspect-ratio: 1 !important;
        min-height: 0 !important;
        height: auto !important;
    }
}

/* Skin Search Styles */
.skin-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filters>.selected-skins {
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    flex: 0 0 auto;
    align-self: center;
}

.skin-type-select-wrap {
    position: relative;
    min-width: 180px;
    display: flex;
    align-items: center;
}

.skin-type-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Trigger styled like Search Skin input */
.skin-type-selected {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.70), rgba(24, 20, 62, 0.65));
    color: #fff;
    padding: 0 48px 0 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skin-type-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skin-type-selected:focus,
.skin-type-selected.open {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(107, 42, 163, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 42, 163, 0.2);
}

.skin-type-selected .arrow {
    display: block;
    position: absolute;
    right: 14px;
    top: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    margin: auto 0;
    color: rgba(226, 232, 240, 0.96);
    pointer-events: none;
    flex-shrink: 0;
    transform-origin: center center;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.skin-type-selected.open .arrow {
    transform: rotate(180deg);
}

/* Skin Type dropdown uses same styles as .search-dropdown */
.skin-type-select-wrap .skin-type-dropdown {
    top: 100%;
    margin-top: -1px;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    z-index: 2000;
}

.skin-name-input-wrap {
    position: relative;
    flex: 1;
    min-width: 300px;
    display: flex;
    gap: 8px;
}

.skin-name-input-wrap input {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.70), rgba(24, 20, 62, 0.65));
    color: #fff;
    padding: 0 12px 0 40px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.skin-name-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.skin-name-input-wrap input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skin-name-input-wrap input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(107, 42, 163, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 42, 163, 0.2);
}

.skin-name-input-wrap.open input,
.mobile-skin-name-input-wrap.open input {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    z-index: 2001;
}

.skin-name-input-wrap button {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
    border: 1.5px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.skin-name-input-wrap button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.skin-name-input-wrap button:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.35));
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.skin-name-input-wrap button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.skin-name-input-wrap button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    margin-top: -1px;
    left: 0;
    right: 0;
    background: rgba(20, 17, 45, 0.98);
    border: 1.5px solid rgba(147, 51, 234, 0.4);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 420px;
    overflow-y: auto;
    z-index: 2000;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(107, 42, 163, 0.2);
    display: none;
}

/* Force upward opening ONLY on mobile (iOS Safari compatible) */
/* Desktop opens downward normally */
@media (max-width: 1024px) {

    #skin-search-dropdown,
    #mobile-skin-search-dropdown {
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        border-top: 1.5px solid rgba(147, 51, 234, 0.4);
        border-bottom: none;
        border-radius: 12px 12px 0 0;
        z-index: 10000 !important;
    }
}

/* Desktop: skin search dropdown opens downward */
@media (min-width: 1025px) {
    #skin-search-dropdown {
        top: 100% !important;
        bottom: auto !important;
        border-top: none;
        border-bottom: 1.5px solid rgba(147, 51, 234, 0.4);
        border-radius: 0 0 12px 12px;
        z-index: 2000;
    }
}

/* Prevent clipping by parent containers on mobile */
.skin-name-input-wrap,
.mobile-skin-name-input-wrap,
.mobile-search-inner {
    overflow: visible !important;
}

.search-dropdown.show,
.search-dropdown[style*="display: block"] {
    display: block !important;
}

.search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 4px 0;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(107, 42, 163, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(107, 42, 163, 0.2);
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 42, 163, 0.6);
}

.search-dropdown-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: none;
    transition: all 0.2s ease;
    background: transparent;
    color: #e2e8f0;
    /* Ensure text color matches */
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: rgba(126, 34, 206, 0.3);
}

.search-dropdown-item.skin-item:hover {
    background: linear-gradient(90deg, rgba(107, 42, 163, 0.2), rgba(107, 42, 163, 0.1));
}

.search-dropdown-item img {
    width: 72px;
    height: 54px;
    margin-right: 14px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.search-dropdown-item span {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.selected-skins {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    align-items: center;
}

.selected-skins:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.selected-skin-badge {
    display: flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.2);
    border: none;
    border-radius: 20px;
    padding: 0 16px 0 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    height: 44px;
    min-height: 44px;
}

/* Rarity-specific styles for selected skin badges */
.selected-skin-badge.chip-rarity-Red {
    background: rgba(235, 75, 75, 0.25) !important;
    box-shadow: 0 2px 8px rgba(235, 75, 75, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Pink {
    background: rgba(211, 44, 230, 0.25) !important;
    box-shadow: 0 2px 8px rgba(211, 44, 230, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Purple {
    background: rgba(136, 71, 255, 0.25) !important;
    box-shadow: 0 2px 8px rgba(136, 71, 255, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Blue {
    background: rgba(75, 105, 255, 0.25) !important;
    box-shadow: 0 2px 8px rgba(75, 105, 255, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Gold {
    background: rgba(228, 174, 57, 0.25) !important;
    box-shadow: 0 2px 8px rgba(228, 174, 57, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Light-Blue {
    background: rgba(94, 152, 217, 0.25) !important;
    box-shadow: 0 2px 8px rgba(94, 152, 217, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-White {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Grey,
.selected-skin-badge.chip-rarity-Gray {
    background: rgba(176, 195, 217, 0.2) !important;
    box-shadow: 0 2px 8px rgba(176, 195, 217, 0.25) !important;
    border: none !important;
}

.selected-skin-badge:hover {
    background: rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

/* Rarity hover states */
.selected-skin-badge.chip-rarity-Red:hover {
    background: rgba(235, 75, 75, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Pink:hover {
    background: rgba(211, 44, 230, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Purple:hover {
    background: rgba(136, 71, 255, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Blue:hover {
    background: rgba(75, 105, 255, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Gold:hover {
    background: rgba(228, 174, 57, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Light-Blue:hover {
    background: rgba(94, 152, 217, 0.35) !important;
}

.selected-skin-badge.chip-rarity-White:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.selected-skin-badge.chip-rarity-Grey:hover,
.selected-skin-badge.chip-rarity-Gray:hover {
    background: rgba(176, 195, 217, 0.3) !important;
}

.selected-skin-badge img {
    width: 44px;
    height: 32px;
    margin-right: 10px;
    object-fit: contain;
    background: transparent;
    border: none;
    padding: 0;
}

.selected-skin-badge span {
    color: #fff;
    font-size: 13px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-skin-badge button {
    margin-left: 8px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 6px;
    font-size: 20px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.selected-skin-badge button:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Custom Case Author Badge Container */
.case-author-badge-container {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 2;
}

/* Custom Case Author Avatar */
.case-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.case-card[class*="custom-case-gradient-"] .case-author-avatar {
    border-color: rgba(var(--main-color), 0.6);
    box-shadow: 0 2px 8px rgba(var(--main-color), 0.4);
}

.case-card[class*="custom-case-gradient-"]:hover .case-author-avatar {
    border-color: var(--hex-color);
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.6);
    transform: scale(1.1);
}

/* Custom Case Open Count Badge */
.case-opens-badge {
    position: relative;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #7c3aed;
    /* Default purple, will be overridden by gradient class */
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    pointer-events: none;
}

/* Use case color for badge */
.case-card[class*="custom-case-gradient-"] .case-opens-badge {
    background: var(--hex-color) !important;
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.5);
}

.case-card[class*="custom-case-gradient-"]:hover .case-opens-badge {
    box-shadow: 0 6px 16px rgba(var(--main-color), 0.7);
    transform: scale(1.05);
}

/* Use case color for price underline */
.case-card[class*="custom-case-gradient-"] .case-price::before {
    background: linear-gradient(90deg, transparent 0%, var(--hex-color) 40%, var(--hex-color) 60%, transparent 100%) !important;
    opacity: 0.8;
    filter: blur(1px);
}

.case-opens-badge svg {
    width: 14px;
    height: 14px;
    opacity: 1;
}

.case-opens-badge .case-opens-badge-icon {
    width: 14px;
    height: 9px;
    display: block;
}

/* Custom Case Hover - uses variables from case_gradients.css */
.case-card[class*="custom-case-gradient-"]:hover {
    transform: perspective(800px) rotateX(5deg) translateY(-10px) scale(1.03);
    border-color: var(--hex-color) !important;
    box-shadow: 0 15px 30px rgba(var(--main-color), 0.5), 0 0 20px rgba(var(--main-color), 0.7) inset;
    z-index: 3;
}

.case-card[class*="custom-case-gradient-"]:hover .case-image img {
    transform: translateY(-15px) scale(1.15);
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.6));
}

/* Additional responsive optimizations for all screen sizes */
@media (min-width: 1920px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        gap: clamp(25px, 2vw, 35px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 2560px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
        gap: clamp(30px, 2.5vw, 40px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 320px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
        gap: clamp(8px, 1vw, 12px);
    }

    .featured-cases-grid,
    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    }

    .case-content {
        padding: clamp(5px, 1vw, 8px);
    }

    .case-card .case-card-title {
        font-size: clamp(9px, 1.2vw, 11px);
        min-height: clamp(20px, 2.5vw, 24px);
        max-height: clamp(24px, 3vw, 28px);
    }

    .case-price span {
        font-size: clamp(10px, 1.5vw, 12px);
    }
}

@media screen and (max-width: 482px) {

    /* Responsive fix for case price line on very small screens */
    .cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.85 !important;
    }

    .cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Force 3 columns on tablet width to avoid 2-in-row issue */
@media screen and (min-width: 769px) and (max-width: 991px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5,
    .featured-cases-grid,
    .classic-cases-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .cases-grid .case-card,
    .featured-cases-grid .case-card,
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .cases-grid .case-image,
    .featured-cases-grid .case-image,
    .classic-cases-grid .case-image {
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Narrow desktop: enforce 3/4 columns for ordinary/classic cases */
@media screen and (min-width: 992px) and (max-width: 1025px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .beginners-cases-grid,
    .beginners-cases-grid.cases-grid-cols-4,
    .beginners-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .classic-cases-grid,
    .classic-cases-grid.cases-grid-cols-4,
    .classic-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .beginners-cases-grid .case-card,
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Portrait tablets and large phones: classic cases 3 columns between 600–710px */
@media screen and (min-width: 600px) and (max-width: 710px) {
    .classic-cases-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

@media (max-width: 480px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(10px, 1.5vw, 15px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .classic-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-grid .case-price {
        padding: 3px 10px !important;
        gap: 6px !important;
    }

    .cases-grid .case-price span {
        font-size: clamp(12px, 4.6vw, 18px) !important;
        line-height: 1.05 !important;
    }

    .cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.9 !important;
    }

    .cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Skin Search Styles */
.skin-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filters>.selected-skins {
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    flex: 0 0 auto;
    align-self: center;
}

.skin-type-select-wrap {
    position: relative;
    min-width: 180px;
    display: flex;
    align-items: center;
}

.skin-type-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Trigger styled like Search Skin input */
.skin-type-selected {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.70), rgba(24, 20, 62, 0.65));
    color: #fff;
    padding: 0 48px 0 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skin-type-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skin-type-selected:focus,
.skin-type-selected.open {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(107, 42, 163, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 42, 163, 0.2);
}

.skin-type-selected .arrow {
    display: block;
    position: absolute;
    right: 14px;
    top: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    margin: auto 0;
    color: rgba(226, 232, 240, 0.96);
    pointer-events: none;
    flex-shrink: 0;
    transform-origin: center center;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.skin-type-selected.open .arrow {
    transform: rotate(180deg);
}

/* Skin Type dropdown uses same styles as .search-dropdown */
.skin-type-select-wrap .skin-type-dropdown {
    top: 100%;
    margin-top: -1px;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    z-index: 2000;
}

.skin-name-input-wrap {
    position: relative;
    flex: 1;
    min-width: 300px;
    display: flex;
    gap: 8px;
}

.skin-name-input-wrap input {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.70), rgba(24, 20, 62, 0.65));
    color: #fff;
    padding: 0 12px 0 40px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.skin-name-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.skin-name-input-wrap input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skin-name-input-wrap input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(107, 42, 163, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 42, 163, 0.2);
}

.skin-name-input-wrap.open input,
.mobile-skin-name-input-wrap.open input {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    z-index: 2001;
}

.skin-name-input-wrap button {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
    border: 1.5px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.skin-name-input-wrap button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.skin-name-input-wrap button:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.35));
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.skin-name-input-wrap button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.skin-name-input-wrap button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    margin-top: -1px;
    left: 0;
    right: 0;
    background: rgba(20, 17, 45, 0.98);
    border: 1.5px solid rgba(147, 51, 234, 0.4);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 420px;
    overflow-y: auto;
    z-index: 2000;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(107, 42, 163, 0.2);
    display: none;
}

/* Force upward opening ONLY on mobile (iOS Safari compatible) */
/* Desktop opens downward normally */
@media (max-width: 1024px) {

    #skin-search-dropdown,
    #mobile-skin-search-dropdown {
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        border-top: 1.5px solid rgba(147, 51, 234, 0.4);
        border-bottom: none;
        border-radius: 12px 12px 0 0;
        z-index: 10000 !important;
    }
}

/* Desktop: skin search dropdown opens downward */
@media (min-width: 1025px) {
    #skin-search-dropdown {
        top: 100% !important;
        bottom: auto !important;
        border-top: none;
        border-bottom: 1.5px solid rgba(147, 51, 234, 0.4);
        border-radius: 0 0 12px 12px;
        z-index: 2000;
    }
}

/* Prevent clipping by parent containers on mobile */
.skin-name-input-wrap,
.mobile-skin-name-input-wrap,
.mobile-search-inner {
    overflow: visible !important;
}

.search-dropdown.show,
.search-dropdown[style*="display: block"] {
    display: block !important;
}

.search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 4px 0;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(107, 42, 163, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(107, 42, 163, 0.2);
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 42, 163, 0.6);
}

.search-dropdown-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: none;
    transition: all 0.2s ease;
    background: transparent;
    color: #e2e8f0;
    /* Ensure text color matches */
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: rgba(126, 34, 206, 0.3);
}

.search-dropdown-item.skin-item:hover {
    background: linear-gradient(90deg, rgba(107, 42, 163, 0.2), rgba(107, 42, 163, 0.1));
}

.search-dropdown-item img {
    width: 72px;
    height: 54px;
    margin-right: 14px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.search-dropdown-item span {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.selected-skins {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    align-items: center;
}

.selected-skin-badge {
    display: flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.2);
    border: none;
    border-radius: 20px;
    padding: 0 16px 0 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    height: 44px;
    min-height: 44px;
}

.selected-skin-badge:hover {
    background: rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.selected-skin-badge img {
    width: 44px;
    height: 32px;
    margin-right: 10px;
    object-fit: contain;
    background: transparent;
    border: none;
    padding: 0;
}

.selected-skin-badge span {
    color: #fff;
    font-size: 13px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-skin-badge button {
    margin-left: 8px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 6px;
    font-size: 20px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.selected-skin-badge button:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Custom Case Author Badge Container */
.case-author-badge-container {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 2;
}

/* Custom Case Author Avatar */
.case-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.case-card[class*="custom-case-gradient-"] .case-author-avatar {
    border-color: rgba(var(--main-color), 0.6);
    box-shadow: 0 2px 8px rgba(var(--main-color), 0.4);
}

.case-card[class*="custom-case-gradient-"]:hover .case-author-avatar {
    border-color: var(--hex-color);
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.6);
    transform: scale(1.1);
}

/* Custom Case Open Count Badge */
.case-opens-badge {
    position: relative;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #7c3aed;
    /* Default purple, will be overridden by gradient class */
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    pointer-events: none;
}

/* Use case color for badge */
.case-card[class*="custom-case-gradient-"] .case-opens-badge {
    background: var(--hex-color) !important;
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.5);
}

.case-card[class*="custom-case-gradient-"]:hover .case-opens-badge {
    box-shadow: 0 6px 16px rgba(var(--main-color), 0.7);
    transform: scale(1.05);
}

/* Use case color for price underline */
.case-card[class*="custom-case-gradient-"] .case-price::before {
    background: linear-gradient(90deg, transparent 0%, var(--hex-color) 40%, var(--hex-color) 60%, transparent 100%) !important;
    opacity: 0.8;
    filter: blur(1px);
}

.case-opens-badge svg {
    width: 14px;
    height: 14px;
    opacity: 1;
}

/* Custom Case Hover - uses variables from case_gradients.css */
.case-card[class*="custom-case-gradient-"]:hover {
    transform: perspective(800px) rotateX(5deg) translateY(-10px) scale(1.03);
    border-color: var(--hex-color) !important;
    box-shadow: 0 15px 30px rgba(var(--main-color), 0.5), 0 0 20px rgba(var(--main-color), 0.7) inset;
    z-index: 3;
}

.case-card[class*="custom-case-gradient-"]:hover .case-image img {
    transform: translateY(-15px) scale(1.15);
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.6));
}

/* Additional responsive optimizations for all screen sizes */
@media (min-width: 1920px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        gap: clamp(25px, 2vw, 35px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 2560px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
        gap: clamp(30px, 2.5vw, 40px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 320px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
        gap: clamp(8px, 1vw, 12px);
    }

    .featured-cases-grid,
    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    }

    .case-content {
        padding: clamp(5px, 1vw, 8px);
    }

    .case-card .case-card-title {
        font-size: clamp(9px, 1.2vw, 11px);
        min-height: clamp(20px, 2.5vw, 24px);
        max-height: clamp(24px, 3vw, 28px);
    }

    .case-price span {
        font-size: clamp(10px, 1.5vw, 12px);
    }
}

/* Mascot Positioning between hero-banner and cases-section */
.home-mascot-divider {
    position: relative;
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    height: 0;
    z-index: 100;
    pointer-events: none;
}

.home-mascot-img {
    position: absolute;
    bottom: -20px;
    left: clamp(330px, 21%, 420px);
    height: 220px;
    /* Reduced further from 250px */
    width: auto;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
    user-select: none;
    pointer-events: none;
    transition: all 0.3s ease;
    will-change: transform;
}

/* Shrink mascot when promo banner is present to prevent overlapping text */
body:has(#creator-promo-banner:not(.banner-closing):not([style*="display: none"])) .home-mascot-img {
    height: 185px !important;
    bottom: -15px !important;
}

/* Specific desktop adjustments for different widths */
@media (max-width: 1400px) {
    .home-mascot-img {
        left: clamp(280px, 18%, 340px);
        height: 190px;
        /* Reduced further from 220px */
        bottom: -15px;
    }
}

@media (max-width: 1025px) {
    .home-mascot-divider {
        display: none;
    }
}

/* Desktop skin search rail (Home only): line is part of the background */
body.page-home {
    --skin-rail-x: 26px;
    --skin-rail-thumb: 38px;
    --skin-rail-thumb-half: 19px;
}

@media (min-width: 1025px) {
    body.page-home.skin-rail-active {
        /* Draw rail line as a background layer (not a widget) */
        background-image:
            linear-gradient(to bottom,
                rgba(107, 42, 163, 0.0),
                rgba(107, 42, 163, 0.95),
                rgba(107, 42, 163, 0.0)),
            url("../img/backgrounds/case_background_1080p.jpg");
        background-size: 2px 100%, cover;
        background-position: var(--skin-rail-x) 0, center;
        background-repeat: no-repeat, no-repeat;
        background-attachment: fixed, fixed;
    }
}

.page-home .skin-results-rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 72px;
    display: none;
    z-index: 9990;
    pointer-events: none;
}

.page-home .skin-results-rail.is-active {
    display: block;
}

.page-home .skin-results-rail__jump {
    position: absolute;
    left: var(--skin-rail-x);
    top: 92px;
    transform: translateX(-50%);
    width: var(--skin-rail-thumb);
    height: var(--skin-rail-thumb);
    border-radius: 999px;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(107, 42, 163, 0.14);
    box-shadow: 0 8px 32px rgba(107, 42, 163, 0.22);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.page-home .skin-results-rail__jump:hover {
    transform: translateX(-50%) translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(107, 42, 163, 0.24);
    box-shadow: 0 12px 40px rgba(107, 42, 163, 0.32);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.page-home .skin-results-rail__jump svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.85);
}

.page-home .skin-results-rail__pips {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.page-home .skin-results-rail__pip {
    position: absolute;
    left: var(--skin-rail-x);
    width: 10px;
    height: 10px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: linear-gradient(120deg, rgba(107, 42, 163, 0.92) 0%, rgba(59, 19, 87, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.page-home .skin-results-rail__pip--active {
    width: 12px;
    height: 12px;
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 10px 28px rgba(107, 42, 163, 0.35);
}

.page-home .skin-results-rail__marker {
    position: absolute;
    left: var(--skin-rail-x);
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    outline: none;
    z-index: 2;
}

.page-home .skin-results-rail__thumb {
    width: var(--skin-rail-thumb);
    height: var(--skin-rail-thumb);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(107, 42, 163, 0.14);
    box-shadow: 0 8px 32px rgba(107, 42, 163, 0.22);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    pointer-events: none;
}

.page-home .skin-results-rail__thumb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
}

.page-home .skin-results-rail__stack {
    position: absolute;
    right: 2px;
    bottom: 2px;
    display: inline-flex;
    gap: 0;
    pointer-events: none;
}

.page-home .skin-results-rail__mini {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(107, 42, 163, 0.45);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-home .skin-results-rail__mini+.skin-results-rail__mini {
    margin-left: -4px;
}

.page-home .skin-results-rail__mini img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-home .skin-results-rail__mini--dot::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
}

.page-home .skin-results-rail__count {
    position: absolute;
    right: -8px;
    bottom: -8px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.2px;
}

@media (max-width: 1024px) {
    .page-home .skin-results-rail {
        display: none !important;
    }
}

/* Home: mute results while filtering/searching (keeps filters crisp) */
body.page-home .cases-section> :not(.filters) {
    transition: filter 0.18s ease, opacity 0.18s ease;
}

body.page-home.home-search-busy .cases-section> :not(.filters),
body.page-home.home-search-dim .cases-section> :not(.filters) {
    filter: grayscale(1) saturate(0.1) blur(1.6px);
    opacity: 0.55;
    pointer-events: none;
}

/* Search mode toggle (skins / cases / authors) */
.search-mode-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
}

.microheader-search .search-mode-row {
    max-width: 700px;
    width: 100%;
    flex-wrap: nowrap;
}

.search-mode-row--mobile {
    width: 100%;
    flex-wrap: nowrap;
}

.search-mode-panel {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 0;
    opacity: 0;
    transform: translateX(-10px) scale(0.985);
    pointer-events: none;
    overflow: visible;
    transition: max-width 0.32s cubic-bezier(0.2, 0.7, 0.2, 1),
        opacity 0.22s ease,
        transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.search-mode-panel .skin-search-row,
.search-mode-panel .case-search-row,
.search-mode-panel .author-search-row,
.search-mode-panel .mobile-skin-search-row,
.search-mode-panel .mobile-case-search-row {
    width: 100%;
}

body[data-search-mode="skins"] .search-mode-panel[data-search-panel="skins"] {
    flex: 1 1 auto;
    max-width: 100%;
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

body[data-search-mode="cases"] .search-mode-panel[data-search-panel="cases"] {
    flex: 0 1 360px;
    max-width: 360px;
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

body[data-search-mode="authors"] .search-mode-panel[data-search-panel="authors"] {
    flex: 0 1 340px;
    max-width: 340px;
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.search-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.7), rgba(24, 20, 62, 0.65));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 18px rgba(59, 19, 87, 0.2);
    flex-shrink: 0;
}

.search-mode-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.search-mode-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.search-mode-btn.is-active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(147, 51, 234, 0.45);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(107, 42, 163, 0.25);
}

.search-mode-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    overflow: visible;
    shape-rendering: geometricPrecision;
}

.search-mode-icon--cases {
    width: 18px;
    height: 12px;
    min-width: 18px;
    min-height: 12px;
}

.search-mode-icon--skins {
    width: 19px;
    height: 12px;
    min-width: 19px;
    min-height: 12px;
}

.search-mode-icon--authors {
    width: 18px;
    height: 14px;
    min-width: 18px;
    min-height: 14px;
}

.search-mode-icon--cases polygon,
.search-mode-icon--cases rect,
.search-mode-icon--authors path {
    vector-effect: none;
}

.search-mode-icon use,
.search-mode-icon path,
.search-mode-icon line,
.search-mode-icon polyline,
.search-mode-icon polygon,
.search-mode-icon rect,
.search-mode-icon circle,
.search-mode-icon ellipse {
    vector-effect: non-scaling-stroke;
}

.search-mode-icon--fill use,
.search-mode-icon--fill path,
.search-mode-icon--fill line,
.search-mode-icon--fill polyline,
.search-mode-icon--fill polygon,
.search-mode-icon--fill rect,
.search-mode-icon--fill circle,
.search-mode-icon--fill ellipse {
    vector-effect: none;
}

.case-search-row {
    position: relative;
    width: 100%;
}

.filters .case-search-row {
    z-index: 10;
}

.filters .case-search-wrap {
    flex: 0 1 300px;
    min-width: 220px;
    max-width: 340px;
}

.author-search-row {
    position: relative;
    width: 100%;
}

.author-search {
    display: flex;
    align-items: center;
}

.author-search-wrap {
    flex: 0 1 260px;
    min-width: 200px;
    max-width: 320px;
}

.author-search-dropdown .search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-search-dropdown .author-count {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.case-search-input {
    min-width: 0;
}

body[data-search-mode="cases"] .selected-skins,
body[data-search-mode="cases"] #microSelectedSkinsContainer,
body[data-search-mode="cases"] .skin-results-rail,
body[data-search-mode="authors"] .selected-skins,
body[data-search-mode="authors"] #microSelectedSkinsContainer,
body[data-search-mode="authors"] .skin-results-rail {
    display: none !important;
}

.microheader .search-mode-row {
    flex-wrap: nowrap;
    gap: 8px;
}

.microheader .search-mode-toggle {
    padding: 2px 3px;
    border-radius: 22px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    flex: 0 0 auto;
}

.microheader .search-mode-btn {
    width: 30px;
    height: 30px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
}

body[data-search-mode="cases"] .microheader .search-mode-panel[data-search-panel="cases"] {
    max-width: none;
}

body[data-search-mode="authors"] .microheader .search-mode-panel[data-search-panel="authors"] {
    max-width: none;
}

.microheader .search-mode-panel {
    flex: 1 1 auto;
    min-width: 0;
}

.microheader .skin-search-row {
    flex-wrap: nowrap;
    gap: 8px;
}

.microheader .skin-type-select-wrap {
    flex: 0 1 126px;
    width: auto;
    min-width: 92px;
}

.microheader .skin-name-input-wrap,
.microheader .case-search-wrap,
.microheader .author-search-wrap {
    flex: 1 1 auto;
    min-width: 130px;
    max-width: none;
}

@media (max-width: 1000px) {
    .microheader .search-mode-row {
        flex-wrap: wrap;
    }

    .microheader-search .search-mode-row {
        max-width: 500px;
    }
}

.mobile-search-bar .search-mode-row {
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.mobile-search-bar .search-mode-toggle {
    padding: 4px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.85), rgba(24, 20, 62, 0.75));
    border: 1px solid rgba(147, 51, 234, 0.4);
    box-shadow: 0 2px 8px rgba(59, 19, 87, 0.3);
}

.mobile-search-bar .search-mode-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-search-bar .search-mode-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(147, 51, 234, 0.3);
}

.mobile-search-bar .search-mode-btn.is-active {
    background: rgba(147, 51, 234, 0.4);
    border-color: rgba(147, 51, 234, 0.65);
    box-shadow: 0 2px 10px rgba(126, 34, 206, 0.35);
}

.mobile-search-bar .search-mode-panel {
    min-width: 0;
}

body[data-search-mode="skins"] .mobile-search-bar .search-mode-panel[data-search-panel="skins"],
body[data-search-mode="cases"] .mobile-search-bar .search-mode-panel[data-search-panel="cases"],
body[data-search-mode="authors"] .mobile-search-bar .search-mode-panel[data-search-panel="authors"] {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.mobile-search-bar .mobile-skin-search-row,
.mobile-search-bar .mobile-case-search-row,
.mobile-search-bar .mobile-author-search-row {
    display: grid;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

.mobile-search-bar .mobile-skin-search-row {
    grid-template-columns: 116px minmax(0, 1fr);
}

.mobile-search-bar .mobile-case-search-row,
.mobile-search-bar .mobile-author-search-row {
    grid-template-columns: minmax(0, 1fr);
}

.mobile-search-bar.input-active .mobile-skin-search-row {
    grid-template-columns: 96px minmax(0, 1fr);
}

.mobile-search-bar .mobile-skin-type-select-wrap {
    flex: 0 0 116px;
    min-width: 116px;
    max-width: 116px;
    height: 42px;
    display: flex;
    align-items: center;
}

.mobile-search-bar .mobile-skin-type-select-wrap .skin-type-selected {
    width: 100%;
    height: 42px;
    padding: 0 32px 0 12px;
    font-size: 13px;
    line-height: 1;
    box-sizing: border-box;
}

.mobile-search-bar .mobile-skin-type-select-wrap .skin-type-selected .arrow {
    right: 9px;
    width: 14px;
    height: 14px;
}

.mobile-search-bar .mobile-skin-type-select-wrap .skin-type-dropdown {
    left: 0;
    right: auto;
    width: max-content;
    min-width: min(240px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
}

.mobile-search-bar .mobile-skin-type-select-wrap .skin-type-dropdown .search-dropdown-item {
    white-space: normal;
    overflow-wrap: anywhere;
}

.mobile-search-bar .mobile-skin-name-input-wrap,
.mobile-search-bar .mobile-skin-name-input-wrap.case-search-wrap,
.mobile-search-bar .mobile-skin-name-input-wrap.author-search-wrap {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    overflow: visible;
}

.mobile-search-bar .mobile-skin-name-input-wrap input,
.mobile-search-bar .mobile-skin-name-input-wrap.case-search-wrap input,
.mobile-search-bar .mobile-skin-name-input-wrap.author-search-wrap input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    height: 42px;
    padding: 0 12px 0 38px;
    box-sizing: border-box;
}

#mobileSelectedSkinsContainer {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 12px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#mobileSelectedSkinsContainer::-webkit-scrollbar {
    display: none;
}

#mobileSelectedSkinsContainer .selected-skin-badge {
    flex: 0 0 auto;
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 17px;
    max-width: min(220px, calc(100vw - 72px));
}

#mobileSelectedSkinsContainer .selected-skin-badge img {
    display: none !important;
}

#mobileSelectedSkinsContainer .selected-skin-badge span {
    max-width: 160px;
    font-size: 12px;
}

#mobileSelectedSkinsContainer .selected-skin-badge button {
    margin-left: 6px;
    padding: 0 2px;
    font-size: 16px;
}

body[data-search-mode="skins"] .mobile-search-bar .search-mode-panel[data-search-panel="skins"],
body[data-search-mode="cases"] .mobile-search-bar .search-mode-panel[data-search-panel="cases"],
body[data-search-mode="authors"] .mobile-search-bar .search-mode-panel[data-search-panel="authors"] {
    flex: 1 1 auto;
    max-width: 100%;
}

.mobile-case-search-row {
    width: 100%;
}

#mobile-skin-search-dropdown .search-dropdown-item.skin-item {
    padding: 10px 12px;
    align-items: center;
    min-width: 0;
}

#mobile-skin-search-dropdown .search-dropdown-item.skin-item img {
    display: none !important;
}

#mobile-skin-search-dropdown .search-dropdown-item.skin-item span {
    display: block;
    min-width: 0;
    font-size: 13px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Desktop/Tablet microheader rebuild: compact, equal-size controls, no mode animation */
@media (min-width: 769px) {
    .search-mode-panel {
        display: none;
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        overflow: visible;
        transition: none;
    }

    body[data-search-mode="skins"] .search-mode-panel[data-search-panel="skins"],
    body[data-search-mode="cases"] .search-mode-panel[data-search-panel="cases"],
    body[data-search-mode="authors"] .search-mode-panel[data-search-panel="authors"] {
        display: block;
    }

    body[data-search-mode="cases"] .filters .search-mode-panel[data-search-panel="cases"] {
        flex: 0 1 360px;
        max-width: 360px;
    }

    body[data-search-mode="authors"] .filters .search-mode-panel[data-search-panel="authors"] {
        flex: 0 1 340px;
        max-width: 340px;
    }

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"],
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] {
        flex: 1 1 auto;
        max-width: 100%;
        min-width: 0;
    }

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row,
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row {
        flex-wrap: wrap;
        align-items: stretch;
        min-width: 0;
    }

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row>#selectedSkinsContainer,
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row>#selectedSkinsContainer {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin-top: 10px;
        align-self: stretch;
        justify-content: flex-start;
    }

    .microheader-content {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 8px;
        height: 56px;
        padding: 0 10px;
        position: relative;
        z-index: 3;
    }

    /* Keep nav docked to the right even on pages with simplified microheader */
    .microheader-content>.microheader-logo {
        grid-column: 1;
    }

    .microheader-content>.microheader-search {
        grid-column: 2;
    }

    .microheader-content>.microheader-filters {
        grid-column: 3;
    }

    .microheader-content>.microheader-nav {
        grid-column: 4;
        justify-self: end;
        margin-left: 0;
    }

    .microheader #microSelectedSkinsContainer {
        max-width: 1700px;
        width: 100%;
        margin: 0 auto;
        padding: 8px 12px 10px;
        box-sizing: border-box;
        display: none;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: wrap;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(59, 19, 87, 0.2);
        position: relative;
        z-index: 2;
    }

    .microheader #microSelectedSkinsContainer .selected-skin-badge {
        height: 34px;
        min-height: 34px;
        border-radius: 17px;
        padding: 0 10px 0 8px;
    }

    .microheader #microSelectedSkinsContainer .selected-skin-badge img {
        width: 34px;
        height: 22px;
        margin-right: 6px;
    }

    .microheader #microSelectedSkinsContainer .selected-skin-badge span {
        font-size: 12px;
    }

    .microheader-logo {
        min-width: 0;
    }

    .microheader-logo a {
        height: 34px;
        display: flex;
        align-items: center;
    }

    .microheader-logo-img {
        height: 34px;
    }

    .microheader-search {
        margin: 0;
        min-width: 0;
        width: 100%;
    }

    .microheader-search .search-mode-row {
        max-width: none;
        width: 100%;
        gap: 8px;
        flex-wrap: nowrap !important;
    }

    .microheader .search-mode-toggle {
        height: 36px;
        padding: 2px;
        border-radius: 18px;
        flex: 0 0 auto;
        overflow: hidden;
    }

    .microheader .search-mode-btn,
    .microheader-favorites-btn,
    .microheader-clear-btn,
    .microheader-social a {
        width: 36px;
        min-width: 36px;
        height: 36px;
        border-radius: 10px;
        padding: 0;
    }

    .microheader .search-mode-icon {
        width: 14px;
        height: 14px;
        font-size: 14px;
    }

    .microheader .search-mode-btn.is-active {
        box-shadow: none;
    }

    .microheader .search-mode-panel,
    body[data-search-mode="cases"] .microheader .search-mode-panel[data-search-panel="cases"],
    body[data-search-mode="authors"] .microheader .search-mode-panel[data-search-panel="authors"] {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }

    .microheader .skin-search-row,
    .microheader .case-search-row,
    .microheader .author-search-row {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .microheader .skin-type-select-wrap {
        flex: 0 0 clamp(86px, 10vw, 120px);
        min-width: 0;
        width: auto;
    }

    .microheader .skin-name-input-wrap,
    .microheader .case-search-wrap,
    .microheader .author-search-wrap {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }

    .microheader .skin-type-selected,
    .microheader .skin-name-input-wrap input {
        height: 36px;
        border-radius: 18px;
        font-size: 13px;
    }

    .microheader .skin-type-selected {
        padding: 0 34px 0 12px;
    }

    .microheader .skin-name-input-wrap input {
        padding: 0 12px 0 34px;
    }

    .microheader .skin-name-input-wrap .search-dropdown,
    .microheader .microheader-search-dropdown,
    .microheader .author-search-dropdown {
        z-index: 10060 !important;
        background: #1a143b;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .microheader-filters,
    .microheader-nav {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 0;
        min-width: 0;
    }

    .microheader-price-filter {
        min-width: 0;
    }

    .microheader-price-slider-container,
    .microheader-balance-block,
    .microheader-profile,
    .microheader-auth {
        height: 36px;
        border-radius: 10px;
    }

    .microheader-price-slider-container {
        width: clamp(120px, 14vw, 180px);
        padding: 0 8px;
        gap: 6px;
        min-width: 0;
        overflow: hidden;
    }

    .microheader-price-slider {
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
    }

    .microheader-current-price {
        min-width: 0;
        max-width: 86px;
        width: auto;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .microheader-balance-block {
        padding: 0 8px;
        gap: 4px;
    }

    .microheader-balance-coin {
        width: 16px;
        height: 16px;
        margin-right: 0;
    }

    .microheader-balance-value {
        font-size: 12px;
    }

    .microheader-profile {
        padding: 0 8px 0 6px;
        gap: 6px;
    }

    .microheader-profile-avatar {
        width: 24px;
        height: 24px;
        border-radius: 7px;
    }

    .microheader-profile-username {
        max-width: 84px;
        font-size: 12px;
    }

    .microheader-auth {
        padding: 0 10px;
    }

    .microheader-auth span {
        font-size: 11px;
        letter-spacing: 0.2px;
    }

    .microheader-auth i {
        font-size: 14px;
        margin-right: 4px;
    }
}

@media (min-width: 769px) and (max-width: 1420px) {
    .microheader-social {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1240px) {
    .microheader-balance {
        display: none;
    }

    .microheader-price-slider-container {
        width: clamp(108px, 16vw, 150px);
    }

    .microheader-profile-username {
        max-width: 64px;
    }

    .microheader .skin-type-select-wrap {
        flex-basis: 84px;
    }
}

@media (min-width: 769px) and (max-width: 1120px) {
    .microheader-current-price {
        display: none;
    }

    .microheader-price-slider-container {
        width: 98px;
        padding: 0 6px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .microheader-logo-full {
        display: none;
    }

    .microheader-logo-small {
        display: block;
    }

    .microheader-logo-img {
        height: 30px;
    }

    .microheader-content {
        gap: 6px;
        padding: 0 8px;
    }

    .microheader #microSelectedSkinsContainer {
        padding: 7px 8px 9px;
        gap: 6px;
    }

    .microheader #microSelectedSkinsContainer .selected-skin-badge {
        height: 32px;
        min-height: 32px;
        border-radius: 16px;
    }

    .microheader .search-mode-row {
        gap: 6px;
    }

    .microheader .search-mode-toggle {
        height: 38px;
        padding: 3px;
        border-radius: 10px;
        background: linear-gradient(145deg, rgba(34, 31, 72, 0.85), rgba(24, 20, 62, 0.75));
        border: 1px solid rgba(147, 51, 234, 0.35);
        box-shadow: 0 2px 8px rgba(59, 19, 87, 0.25);
    }

    .microheader .search-mode-btn {
        width: 32px;
        min-width: 32px;
        height: 32px;
        border-radius: 8px;
        border: 1px solid transparent;
    }

    .microheader .search-mode-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(147, 51, 234, 0.25);
    }

    .microheader .search-mode-btn.is-active {
        background: rgba(147, 51, 234, 0.35);
        border-color: rgba(147, 51, 234, 0.6);
        box-shadow: 0 2px 10px rgba(126, 34, 206, 0.3);
    }

    .microheader-favorites-btn,
    .microheader-clear-btn {
        width: 38px;
        min-width: 38px;
        height: 38px;
        border-radius: 10px;
        padding: 8px;
    }

    .microheader-clear-btn {
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.35);
    }

    .microheader-clear-btn:hover {
        background: rgba(239, 68, 68, 0.25);
        border-color: rgba(239, 68, 68, 0.5);
    }

    .microheader-filters,
    .microheader-nav {
        gap: 6px;
    }

    .microheader-price-slider-container {
        width: 120px;
        height: 38px;
        padding: 6px 10px;
    }

    .microheader-profile {
        height: 38px;
        padding: 0 8px;
        border-radius: 10px;
    }

    .microheader-profile-username {
        display: none;
    }

    .microheader-profile-avatar {
        width: 30px;
        height: 30px;
    }
}

@media (min-width: 1025px) {

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row,
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row {
        align-items: center;
    }

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row>#selectedSkinsContainer,
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row>#selectedSkinsContainer {
        flex: 1 0 520px;
        width: auto;
        min-width: min(100%, 520px);
        max-width: 100%;
        margin-top: 0;
        align-self: center;
    }
}

/* Mobile: case/author dropdowns open upward like skin dropdown */
@media (max-width: 1024px) {

    #search-dropdown-mobile,
    #mobile-author-search-dropdown {
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        margin-top: 0 !important;
        border-top: 1.5px solid rgba(147, 51, 234, 0.4) !important;
        border-bottom: none !important;
        border-radius: 12px 12px 0 0 !important;
        z-index: 10000 !important;
    }

    .mobile-skin-name-input-wrap.case-search-wrap.open input,
    .mobile-skin-name-input-wrap.author-search-wrap.open input {
        border-radius: 0 0 12px 12px !important;
        border-top-color: transparent !important;
        border-bottom-color: rgba(147, 51, 234, 0.4) !important;
        background: rgba(15, 23, 42, 0.95) !important;
    }
}

/* Upper widget: dropdown direction is decided dynamically in JS */
.filters #skin-search-dropdown.dropdown-open-up,
.filters #search-dropdown.dropdown-open-up,
.filters #author-search-dropdown.dropdown-open-up,
.filters .search-dropdown.dropdown-open-up,
.filters .skin-type-select-wrap .skin-type-dropdown.dropdown-open-up {
    top: auto !important;
    bottom: calc(100% + 6px) !important;
    margin-top: 0 !important;
    border-top: 1.5px solid rgba(147, 51, 234, 0.4) !important;
    border-bottom: none !important;
    border-radius: 12px 12px 0 0 !important;
    z-index: 10000 !important;
}

.filters #skin-search-dropdown.dropdown-open-down,
.filters #search-dropdown.dropdown-open-down,
.filters #author-search-dropdown.dropdown-open-down,
.filters .search-dropdown.dropdown-open-down,
.filters .skin-type-select-wrap .skin-type-dropdown.dropdown-open-down {
    top: 100% !important;
    bottom: auto !important;
    margin-top: -1px !important;
    border-top: none !important;
    border-bottom: 1.5px solid rgba(147, 51, 234, 0.4) !important;
    border-radius: 0 0 12px 12px !important;
    z-index: 10000 !important;
}

.filters .skin-name-input-wrap.open.dropdown-open-up input,
.filters .case-search-wrap.open.dropdown-open-up input,
.filters .author-search-wrap.open.dropdown-open-up input {
    border-radius: 0 0 12px 12px !important;
    border-top-color: transparent !important;
    border-bottom-color: rgba(147, 51, 234, 0.4) !important;
    background: rgba(15, 23, 42, 0.95) !important;
}

.filters .skin-name-input-wrap.open.dropdown-open-down input,
.filters .case-search-wrap.open.dropdown-open-down input,
.filters .author-search-wrap.open.dropdown-open-down input {
    border-radius: 12px 12px 0 0 !important;
    border-top-color: rgba(147, 51, 234, 0.4) !important;
    border-bottom-color: transparent !important;
    background: rgba(15, 23, 42, 0.95) !important;
}

.filters .skin-type-selected.open.dropdown-open-up {
    border-radius: 0 0 12px 12px !important;
    border-top-color: transparent !important;
    border-bottom-color: rgba(147, 51, 234, 0.4) !important;
}

.filters .skin-type-selected.open.dropdown-open-down {
    border-radius: 12px 12px 0 0 !important;
    border-top-color: rgba(147, 51, 234, 0.4) !important;
    border-bottom-color: transparent !important;
}

@media (max-width: 420px) {

    .filters #skin-search-dropdown .search-dropdown-item.skin-item,
    .filters #mobile-skin-search-dropdown .search-dropdown-item.skin-item,
    .filters .search-dropdown .search-dropdown-item.skin-item {
        padding: 10px 12px;
        align-items: flex-start;
    }

    .filters #skin-search-dropdown .search-dropdown-item.skin-item img,
    .filters #mobile-skin-search-dropdown .search-dropdown-item.skin-item img,
    .filters .search-dropdown .search-dropdown-item.skin-item img {
        display: none !important;
    }

    .filters #skin-search-dropdown .search-dropdown-item.skin-item span,
    .filters #mobile-skin-search-dropdown .search-dropdown-item.skin-item span,
    .filters .search-dropdown .search-dropdown-item.skin-item span {
        font-size: 13px;
        line-height: 1.25;
    }
}

/* Unified desktop dropdown geometry for all search inputs (skin/case/author) */
@media (min-width: 769px) {

    .skin-search-row .search-dropdown,
    .case-search-row .search-dropdown,
    .author-search-row .search-dropdown,
    .microheader-search .search-dropdown,
    #skin-search-dropdown,
    #search-dropdown,
    #micro-skin-search-dropdown,
    #microheader-search-dropdown,
    #author-search-dropdown,
    #micro-author-search-dropdown {
        top: 100% !important;
        bottom: auto !important;
        margin-top: -1px !important;
        border-top: none !important;
        border-radius: 0 0 12px 12px !important;
    }
}

body.page-home .case-price {
    z-index: 3;
}

body.page-home .case-price-value,
body.page-custom-cases-all .case-price-value {
    display: inline-block;
    justify-self: center;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
    word-break: break-word;
    line-height: 1.1;
}

body.page-home .case-price-meta,
body.page-custom-cases-all .case-price-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #ffffff;
    line-height: 1;
    position: relative;
    z-index: 4;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

body.page-home .case-price-meta--hidden,
body.page-custom-cases-all .case-price-meta--hidden {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.page-home .case-price-meta-value,
body.page-custom-cases-all .case-price-meta-value {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

body.page-home .case-price-meta-icon,
body.page-custom-cases-all .case-price-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.92;
}

body.page-home .case-price-meta-icon svg,
body.page-custom-cases-all .case-price-meta-icon svg {
    width: 16px;
    height: 16px;
}

body.page-home .case-price-meta--likes,
body.page-custom-cases-all .case-price-meta--likes {
    color: #ffffff;
}

body.page-home .case-price-favorite,
body.page-custom-cases-all .case-price-favorite {
    color: #ffffff;
}

body.page-home .case-price-meta--opens,
body.page-custom-cases-all .case-price-meta--opens {
    color: #ffffff;
}

body.page-home .case-price-meta--likes .case-price-meta-value,
body.page-custom-cases-all .case-price-meta--likes .case-price-meta-value,
body.page-home .case-price-meta--opens .case-price-meta-value,
body.page-custom-cases-all .case-price-meta--opens .case-price-meta-value {
    color: #ffffff;
    text-shadow: none;
}

body.page-home .case-price-favorite svg,
body.page-custom-cases-all .case-price-favorite svg,
body.page-home .case-price-meta-package-icon,
body.page-custom-cases-all .case-price-meta-package-icon {
    stroke: #ffffff !important;
    filter: none;
}

body.page-home .case-price-favorite:not(.active) svg,
body.page-custom-cases-all .case-price-favorite:not(.active) svg {
    fill: none !important;
}

body.page-home .case-price-favorite.active svg,
body.page-custom-cases-all .case-price-favorite.active svg {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
}

body.page-home .case-price-meta-search-icon,
body.page-custom-cases-all .case-price-meta-search-icon {
    width: 16px;
    height: 10px;
    display: block;
}

body.page-home .case-price-meta-package-icon,
body.page-custom-cases-all .case-price-meta-package-icon {
    width: 14px;
    height: 14px;
    display: block;
}

body.page-home .case-price-favorite,
body.page-custom-cases-all .case-price-favorite {
    padding: 0;
    margin: 0;
}

body.page-home .case-price-favorite svg,
body.page-custom-cases-all .case-price-favorite svg {
    width: 18px;
    height: 18px;
}

@media (hover: hover) and (pointer: fine) {

    body.page-home .case-card,
    body.page-custom-cases-all .case-card {
        isolation: isolate;
    }

    body.page-home .case-price,
    body.page-custom-cases-all .case-price {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 10px;
    }

    body.page-home .case-price-meta,
    body.page-custom-cases-all .case-price-meta {
        opacity: 1;
        transform: none;
        pointer-events: none;
    }

    body.page-home .case-price-meta--likes,
    body.page-custom-cases-all .case-price-meta--likes {
        justify-self: start;
        pointer-events: auto;
    }

    body.page-home .case-price-meta--likes.case-price-meta--icon-only,
    body.page-custom-cases-all .case-price-meta--likes.case-price-meta--icon-only {
        justify-self: end;
    }

    body.page-home .case-price-meta--opens,
    body.page-custom-cases-all .case-price-meta--opens {
        justify-self: end;
    }

    body.page-home .case-opens-badge,
    body.page-custom-cases-all .case-opens-badge {
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    body.page-home .case-opens-badge,
    body.page-custom-cases-all .case-opens-badge {
        opacity: 1;
    }

    body.page-home .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-custom-cases-all .case-card[data-case-id^="user_"] .case-author-badge-container {
        left: 12px !important;
        right: auto !important;
        align-items: flex-start !important;
    }

}

@media (max-width: 1024px) {

    body.page-home .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-home .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-home .featured-cases-grid .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-home .featured-cases-grid .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-custom-cases-all .featured-cases-grid .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-custom-cases-all .featured-cases-grid .case-card[data-case-id^="user_"] .case-author-badge-container {
        position: absolute !important;
        /* Фоллбек: если --custom-fit-pad не задан — используем 8px */
        top: calc(var(--custom-fit-pad, 8px) + 8px) !important;
        left: 6px !important;
        right: 6px !important;
        display: flex !important;
        flex-direction: row !important;
        /* center — аватар не падает вниз относительно бейджа */
        align-items: center !important;
        justify-content: space-between !important;
        width: auto !important;
        margin: 0 !important;
        z-index: 25 !important;
        pointer-events: none !important;
        /* Убираем overflow:hidden — он обрезал аватар */
        overflow: visible !important;
    }
}

@media (max-width: 768px) {

    body.page-home .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-home .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-home .featured-cases-grid .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-home .featured-cases-grid .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-custom-cases-all .featured-cases-grid .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-custom-cases-all .featured-cases-grid .case-card[data-case-id^="user_"] .case-author-badge-container {
        top: calc(var(--custom-fit-pad, 24px) + 24px) !important;
    }
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {

    body.page-home .case-card[data-case-id^="user_"] .case-opens-badge,
    body.page-custom-cases-all .case-card[data-case-id^="user_"] .case-opens-badge {
        display: none !important;
    }
}

@media (hover: none),
(pointer: coarse) {

    body.page-home .case-price,
    body.page-custom-cases-all .case-price {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    body.page-home .case-price-meta,
    body.page-custom-cases-all .case-price-meta {
        opacity: 1;
        transform: none;
    }

    body.page-home .case-price-meta--opens,
    body.page-custom-cases-all .case-price-meta--opens,
    body.page-home .case-price-meta--guest,
    body.page-custom-cases-all .case-price-meta--guest {
        display: none !important;
    }

    body.page-home .case-price-meta--likes,
    body.page-custom-cases-all .case-price-meta--likes {
        display: inline-flex;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        position: relative;
        order: 2;
        z-index: 30;
    }

    body.page-home .case-price-meta--likes.case-price-meta--guest {
        display: none !important;
    }

    body.page-home .case-price-value,
    body.page-custom-cases-all .case-price-value {
        order: 1;
    }

    body.page-home .case-price-favorite,
    body.page-custom-cases-all .case-price-favorite {
        padding: 4px;
        margin: 0;
    }

    body.page-home .case-price-meta--likes .case-price-meta-value,
    body.page-custom-cases-all .case-price-meta--likes .case-price-meta-value,
    body.page-home .case-price-meta--likes .case-price-meta-icon--heart,
    body.page-custom-cases-all .case-price-meta--likes .case-price-meta-icon--heart {
        display: none !important;
    }
}

@media screen and (max-width: 768px),
screen and (orientation: landscape) and (max-height: 600px),
screen and (max-height: 480px) {

    body.page-home .case-price,
    body.page-custom-cases-all .case-price {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    body.page-home .case-price-meta--opens,
    body.page-custom-cases-all .case-price-meta--opens,
    body.page-home .case-price-meta--guest,
    body.page-custom-cases-all .case-price-meta--guest {
        display: none !important;
    }

    body.page-home .case-price-meta--likes,
    body.page-custom-cases-all .case-price-meta--likes,
    body.page-home .case-price-favorite,
    body.page-custom-cases-all .case-price-favorite {
        display: none !important;
    }

    body.page-home .case-price-value,
    body.page-custom-cases-all .case-price-value {
        order: 0 !important;
        max-width: 100% !important;
        font-size: clamp(15px, 4.1vw, 20px) !important;
    }

    .classic-cases-grid .case-price span,
    .classic-cases-grid .case-price-value {
        max-width: 100% !important;
    }

    body.page-home .case-card[data-case-id^="user_"] .case-opens-badge,
    body.page-custom-cases-all .case-card[data-case-id^="user_"] .case-opens-badge {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Tablet containment: keep home case grids centered inside the viewport. */
@media screen and (min-width: 769px) and (max-width: 991px) {

    body.page-home,
    body.page-home .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.page-home .cases-section {
        width: min(100%, 1700px) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: clamp(12px, 2vw, 18px) !important;
        padding-right: clamp(12px, 2vw, 18px) !important;
        box-sizing: border-box !important;
        overflow-x: clip;
    }

    body.page-home .cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .featured-cases-grid,
    body.page-home .classic-cases-grid,
    body.page-home .beginners-cases-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: clamp(12px, 1.6vw, 16px) !important;
        box-sizing: border-box !important;
    }

    body.page-home .case-card {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Аватар автора не должен обрезаться у пользовательских кейсов */
    body.page-home .case-card[data-case-id^="user_"],
    body.page-home .case-card[id^="case-card-user-"] {
        overflow: visible !important;
    }
}

@media screen and (min-width: 992px) and (max-width: 1025px) {

    body.page-home,
    body.page-home .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.page-home .cases-section {
        width: min(100%, 1700px) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: clamp(14px, 2vw, 20px) !important;
        padding-right: clamp(14px, 2vw, 20px) !important;
        box-sizing: border-box !important;
        overflow-x: clip;
    }

    body.page-home .cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .featured-cases-grid,
    body.page-home .beginners-cases-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: clamp(14px, 1.8vw, 18px) !important;
        box-sizing: border-box !important;
    }

    body.page-home .classic-cases-grid,
    body.page-home .classic-cases-grid.cases-grid-cols-4,
    body.page-home .classic-cases-grid.cases-grid-cols-5 {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: clamp(12px, 1.4vw, 16px) !important;
        box-sizing: border-box !important;
    }

    body.page-home .case-card {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Аватар автора не должен обрезаться у пользовательских кейсов */
    body.page-home .case-card[data-case-id^="user_"],
    body.page-home .case-card[id^="case-card-user-"] {
        overflow: visible !important;
    }
}

/* Admin column preference: applied from 1026px and up. */
@media screen and (min-width: 1200px) and (max-width: 1399px) {

    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-4.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.beginners-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.classic-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .cases-grid.cases-grid-cols-5.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.beginners-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.classic-cases-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

/* Mid-range: 1026px–1199px — cap at 4 columns so cards stay readable */
@media screen and (min-width: 1026px) and (max-width: 1199px) {

    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-4.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.beginners-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.classic-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .cases-grid.cases-grid-cols-5.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.beginners-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.classic-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* Admin column preference: only on wide desktop; tablet/narrow PC keep responsive rules above. */
@media (min-width: 1400px) {

    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-4.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.classic-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.beginners-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .cases-grid.cases-grid-cols-5.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.classic-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.beginners-cases-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}


/* Creator Promo Banner (Elegantly Softened Gold Style) */
.creator-promo-banner {
    width: 100%;
    background: linear-gradient(110deg, rgba(32, 26, 60, 0.96) 0%, rgba(145, 95, 20, 0.70) 42%, rgba(185, 125, 25, 0.75) 58%, rgba(28, 22, 54, 0.96) 100%) !important;
    border-radius: 16px;
    border: 1px solid rgba(245, 160, 20, 0.6) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 25px rgba(245, 160, 20, 0.25) inset !important;
    margin-bottom: 12px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 25;
    flex-shrink: 0;
    box-sizing: border-box !important;
    touch-action: pan-y;
    user-select: none;
    max-height: 64px;
    opacity: 1;
}

/* Further reduce size on medium screens to avoid pushing slider */
@media (max-width: 1200px) {
    .creator-promo-banner {
        max-height: 56px !important;
        padding: 6px 12px !important;
        margin-bottom: 8px !important;
    }

    .creator-promo-banner .banner-text {
        font-size: 12px !important;
    }

    .creator-promo-banner:not([style*="display: none"])+#slider-banner {
        padding-top: 14px !important;
    }
}


.creator-promo-banner.banner-closing {
    opacity: 0 !important;
    max-height: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    transform: translateY(-30px) scaleY(0.5) !important;
    pointer-events: none !important;
}

.creator-promo-banner:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 35px rgba(245, 175, 25, 0.35) inset !important;
    border: 1px solid rgba(245, 175, 25, 0.8) !important;
    background: linear-gradient(110deg, rgba(34, 28, 65, 0.96) 0%, rgba(165, 110, 22, 0.80) 42%, rgba(205, 140, 28, 0.85) 58%, rgba(30, 24, 58, 0.96) 100%) !important;
}

.creator-promo-banner:active {
    transform: scale(0.99);
}

.creator-promo-banner::before {
    display: none !important;
    content: none !important;
}

.creator-promo-banner .banner-gradient-layer {
    /* Right-side gradient layer (filled dynamically by JS to match slider color) */
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.8s ease, background 0.8s ease;
    mix-blend-mode: overlay;
}

.creator-promo-banner .banner-slide-visual {
    position: absolute;
    display: none;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    opacity: 0.22;
    transition: opacity 0.4s ease;
    will-change: opacity;
}

/* Adjust slider spacing based on creator banner visibility to avoid layout shift */
.creator-promo-banner:not([style*="display: none"])+#slider-banner {
    padding-top: 18px;
    /* Keep slider rounded even when banner visible */
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.creator-promo-banner[style*="display: none"]+#slider-banner {
    padding-top: 0;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

/* (Selectors for creator banner merged into bonus/invite block styles above) */

.creator-promo-banner .banner-content-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 3;
    width: 100%;
    text-align: center;
}

.creator-promo-banner .banner-text {
    font-size: 13.5px;
    color: rgba(243, 244, 246, 0.95) !important;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
}

.creator-promo-banner .banner-text span {
    color: rgba(243, 244, 246, 0.95) !important;
}

.creator-promo-banner .banner-text strong {
    color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 900 !important;
    letter-spacing: 0.8px;
    margin-right: 6px;
    text-transform: uppercase;
}

/* Pull-up handle indicator (Pill under text) */
.creator-promo-banner .banner-pull-handle {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 4px;
    cursor: grab;
    z-index: 10;
}



.creator-promo-banner .banner-pull-handle .pull-pill {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.2s ease;
}

@media (min-width: 1025px) {
    .hero-center-mobile.creator-banner-dismissed #slider-banner {
        flex: 1 1 100%;
        min-height: 0;
        height: 100%;
        padding-top: 0 !important;
    }

    .hero-center-mobile.creator-banner-dismissed #logo-slideshow {
        bottom: -104px;
    }
}

@media (min-width: 1025px) {
    .creator-promo-banner .banner-slide-visual {
        display: block;
    }

    .creator-promo-banner .banner-gradient-layer {
        z-index: 2;
    }

    .creator-promo-banner .snow-container {
        z-index: 4 !important;
    }

    .creator-promo-banner .banner-content-inner,
    .creator-promo-banner .banner-pull-handle {
        position: relative;
        z-index: 5;
    }
}

.creator-promo-banner:hover .banner-pull-handle .pull-pill {
    background: rgba(255, 255, 255, 0.6);
    width: 44px;
}

/* Earnings stats block for mobile (10% + 12%) */
.earn-stats-mobile {
    display: none;
}



/* Creator Program Tab Toggle */
.creator-program-tab {
    display: none;
}

@media (min-width: 901px) and (max-width: 1024px) {
    .earn-stats-mobile-wrapper {
        margin-bottom: 20px;
    }

    .earn-stats-mobile {
        order: 3;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
        border-radius: 12px;
        border: 1px solid rgba(107, 42, 163, 0.12);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
        padding: 10px 16px;
        color: #fff;
        margin-top: 4px;
        cursor: pointer;
    }

    .earn-stats-left {
        display: flex;
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    .earn-stats-right {
        display: flex;
        align-items: center;
        padding-right: 100px;
        /* Space for the "Click here" badge */
    }

    .earn-stats-mobile h3 {
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
        color: #ffffff !important;
    }

    .earn-stats-row {
        display: flex;
        flex-direction: row;
        gap: 16px;
        margin: 0;
        align-items: center;
    }

    .earn-stat-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }

    .earn-stat-percent {
        font-weight: 700;
        color: #0ea5e9;
        font-size: 16px;
    }

    .earn-stat-label {
        font-size: 12px;
        opacity: 0.9;
    }

    .earn-stats-note {
        margin: 0;
        font-size: 11.5px;
        opacity: 0.7;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .creator-program-tab {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        position: relative;
        width: 160px;
        margin: -23px auto 0;
        padding: 6px 16px;
        background: linear-gradient(180deg, rgba(91, 65, 18, 0.98), rgba(42, 29, 9, 0.98));
        border: 1px solid rgba(255, 205, 64, 0.9);
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        border-top: none;
        text-align: center;
        color: #ffe58a;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        letter-spacing: 0.5px;
        transition: all 0.2s ease;
        box-shadow: 0 4px 14px rgba(235, 174, 20, 0.3), inset 0 1px 0 rgba(255, 239, 174, 0.18);
        text-shadow: 0 1px 5px rgba(255, 204, 55, 0.25);
        z-index: 10;
        user-select: none;
    }

    .creator-program-tab-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

    .creator-program-tab svg {
        width: 12px;
        height: 12px;
    }

    .creator-program-tab.active .creator-program-tab-arrow {
        transform: rotate(180deg);
    }

    .creator-program-tab:hover {
        background: linear-gradient(180deg, rgba(116, 83, 20, 0.98), rgba(53, 36, 8, 0.98));
        border-color: #ffd75d;
        box-shadow: 0 5px 17px rgba(235, 174, 20, 0.42), inset 0 1px 0 rgba(255, 243, 185, 0.22);
    }

    .creator-program-tab:active {
        transform: translateY(-1px);
    }

    .creator-program-tab.active {
        background: linear-gradient(180deg, rgba(116, 83, 20, 0.98), rgba(53, 36, 8, 0.98));
        border-color: #ffd75d;
        box-shadow: 0 5px 17px rgba(235, 174, 20, 0.42), inset 0 1px 0 rgba(255, 243, 185, 0.22);
    }

    .earn-stats-mobile {
        order: 3;
        display: none;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
        border-radius: 12px;
        border: 1px solid rgba(107, 42, 163, 0.12);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
        padding: 16px;
        margin-bottom: 20px;
        margin-top: -12px;
        color: #fff;
        position: relative;
        overflow: hidden;
        cursor: default;
    }

    .earn-stats-mobile.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

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

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

    .earn-stats-left,
    .earn-stats-right {
        position: relative;
        z-index: 2;
        width: 100%;
    }

    .earn-stats-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 16px;
    }

    .earn-stats-mobile h3 {
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.5px;
        margin: 0;
        text-align: center;
        color: #ffffff !important;
    }

    .earn-stats-row {
        display: flex;
        justify-content: space-around;
        gap: 12px;
        margin-bottom: 12px;
    }

    .earn-stat-item {
        flex: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .earn-stat-percent {
        font-size: 24px;
        font-weight: 900;
        color: #06b6d4;
        line-height: 1;
    }

    .earn-stat-label {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.85);
        font-weight: 500;
    }

    .earn-stats-note {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.75);
        margin: 6px 0 0 0;
        text-align: center;
        font-weight: 400;
    }
}

@media (max-width: 1024px) {
    .creator-promo-banner {
        display: none !important;
    }
}

/* Desktop typography for admin-created custom promo sliders. */
@media (min-width: 1081px) {
    .drpskwnpromo-wrap .drpskwnpromo__title {
        font-size: 40px !important;
    }

    .drpskwnpromo-wrap .drpskwnpromo__text {
        font-size: 20px !important;
        line-height: 1.55 !important;
    }
}

@import url('case_gradients.css');

/* Microheader Styles */
.microheader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    /* Increased to be definitely on top of most elements */
    background: #1a0b2e !important;
    /* solid fallback */
    background: linear-gradient(120deg, var(--purple-darker) 0%, var(--purple-dark) 100%) !important;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 2px solid rgba(107, 42, 163, 0.25);
    box-shadow: 0 8px 32px 0 rgba(59, 19, 87, 0.25);
    transform: translateY(-100%);
    transition: transform 0.25s ease-out;
    display: block;
    will-change: transform;
}

.microheader.visible {
    transform: translateY(0);
    display: block;
}

.microheader-content {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 1% 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    background: rgba(59, 19, 87, 0.10);
    box-shadow: 0 2px 12px rgba(107, 42, 163, 0.10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.microheader-logo {
    flex-shrink: 0;
    /* Prevent logo from shrinking */
    display: flex;
    align-items: center;
    min-width: 120px;
    /* Minimum width to prevent squashing */
}

.microheader-logo a {
    display: block;
    height: 40px;
    /* Fixed height for logo container */
}

.microheader-logo-img {
    height: 40px;
    width: auto;
    /* Maintain aspect ratio */
    max-width: none;
    /* Allow full width */
    transform: none;
    transition: transform 0.3s ease;
    object-fit: contain;
    /* Ensure proper scaling */
}

.microheader-logo-full {
    display: block;
}

.microheader-logo-small {
    display: none;
}

.microheader-logo:hover .microheader-logo-img {
    transform: scale(1.05);
}

/* Microheader Search */
.microheader-search {
    flex: 1;
    margin: 0 12px;
    position: relative;
    display: flex;
    align-items: center;
}

/* Limit width only for skin search on home.html */
.microheader-search .skin-search-row {
    max-width: 700px;
    width: 100%;
    flex-wrap: nowrap;
}

/* Unify styles for SkinType dropdown and Search input in microheader */
.microheader .skin-type-select-wrap,
.microheader .skin-name-input-wrap {
    flex-shrink: 1;
    min-width: 0;
}

.microheader .skin-type-select-wrap {
    flex: 0 1 auto;
    width: 150px;
    min-width: 100px;
}

.microheader .skin-name-input-wrap {
    flex: 1 1 auto;
    min-width: 120px;
}

/* Make SkinType dropdown and Search input identical in microheader - matching static pages */
.microheader .skin-type-selected,
.microheader .skin-name-input-wrap input {
    height: 40px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 48px 8px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.microheader .skin-name-input-wrap input {
    padding: 8px 16px 8px 40px;
}

.microheader .skin-name-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.microheader .skin-type-selected:hover,
.microheader .skin-name-input-wrap input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.microheader .skin-type-selected.open,
.microheader .skin-type-selected:focus,
.skin-type-selected.open {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    box-shadow: 0 0 20px rgba(126, 34, 206, 0.1);
    outline: none;
}

.skin-type-selected.open {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    /* Hide bottom border to merge with dropdown */
    z-index: 2001;
    /* Ensure it stays above dropdown border */
}

/* Specific override for microheader open state to fix border radius */
.microheader .skin-type-selected.open,
.microheader .skin-name-input-wrap.open input {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    z-index: 2001;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
}

/* Ensure selected skin badges align with 36px controls in microheader */
.microheader .selected-skins {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.microheader .selected-skin-badge {
    height: 40px;
    min-height: 40px;
    border-radius: 20px;
    padding: 0 12px 0 8px;
}

.microheader .selected-skin-badge img {
    width: 40px;
    height: 28px;
    margin-right: 8px;
}

.microheader .selected-skin-badge span {
    font-size: 13px;
}

.microheader .skin-type-selected .arrow {
    right: 16px;
}

.microheader .skin-name-input-wrap .search-dropdown {
    top: calc(100% + 6px);
}

/* Responsive behavior for microheader search */
@media (max-width: 1200px) {
    .microheader .skin-type-select-wrap {
        width: 150px;
    }

    .microheader .skin-name-input-wrap {
        min-width: 150px;
    }
}

@media (max-width: 1000px) {
    .microheader-search .skin-search-row {
        max-width: 500px;
    }

    .microheader .skin-type-select-wrap {
        width: 130px;
    }

    .microheader .skin-name-input-wrap {
        min-width: 120px;
    }

    .microheader .skin-type-selected,
    .microheader .skin-name-input-wrap input {
        font-size: 13px;
        height: 34px;
    }
}


.microheader-search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 8px 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.microheader-search-container:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.microheader-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: "Outfit", "Montserrat", sans-serif;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    padding: 0;
    margin-right: 8px;
}

.microheader-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.microheader-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.microheader-search-btn:hover {
    color: #fff;
}

.microheader-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
}

/* Hide all microheader dropdowns when microheader is not visible */
.microheader:not(.visible) .microheader-search-dropdown,
.microheader:not(.visible) #micro-skin-search-dropdown,
.microheader:not(.visible) #micro-author-search-dropdown,
.microheader:not(.visible) .author-search-dropdown {
    display: none !important;
}

.microheader-search-dropdown.show {
    display: block;
}

/* Selected skins bar under microheader */
.selected-skins.micro-selected {
    padding: 8px 2rem 8px 2rem;
    gap: 10px;
    background: rgba(34, 31, 72, 0.65);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 18px rgba(59, 19, 87, 0.18);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: none;
}

.selected-skins.micro-selected:has(.skin-chip) {
    display: flex;
    top: 60px;
}

/* No margin-top needed - microheader is fixed and floats above content */

.microheader-search-item {
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

.microheader-search-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.microheader-search-item:last-child {
    border-bottom: none;
}

/* Page search results counter */
.microheader-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(59, 19, 87, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(107, 42, 163, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.microheader-search-results.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#search-result-count {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    display: block;
    text-align: center;
    min-width: 120px;
}

.search-nav-btn {
    background: none;
    border: none;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.search-nav-btn:hover {
    opacity: 0.7;
}

.search-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.search-nav-btn svg {
    width: 18px;
    height: 18px;
}

/* Clear search button */
.microheader-clear-search-btn {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.microheader-clear-search-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.microheader-clear-search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.microheader-clear-search-btn svg {
    width: 14px;
    height: 14px;
}

/* Microheader search dropdown items */
.microheader-search-dropdown .search-dropdown-item {
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.microheader-search-dropdown .search-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.microheader-search-dropdown .search-dropdown-item:last-child {
    border-bottom: none;
}

.microheader-search-dropdown .search-dropdown-price {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* Microheader Filters */
.microheader-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

/* Microheader skin search dropdown needs spacing */
.microheader-search .search-dropdown,
#micro-skin-search-dropdown {
    margin-top: 8px;
}

.microheader-favorites-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
}

.microheader-favorites-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.microheader-favorites-btn.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.microheader-favorites-btn:active {
    transform: scale(0.95);
}

.microheader-price-filter {
    display: flex;
    align-items: center;
}

.microheader-price-slider-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0 12px;
    backdrop-filter: none;
    transition: all 0.3s ease;
    height: 40px;
    width: 180px;
}

.microheader-price-slider-container:hover {
    background: transparent;
    border-color: transparent;
}

.microheader-price-slider {
    width: 90px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    flex: none;
}

.microheader-price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.microheader-price-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.microheader-price-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.microheader-price-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.microheader-current-price {
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
    width: 50px;
    min-width: 50px;
    text-align: right;
    flex: none;
}

.microheader-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.microheader-clear-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.microheader-clear-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;

    transform: translateY(0);
}

.microheader-social {
    display: flex;
    align-items: center;
    gap: 4px;
}

.microheader-social a {
    background-color: rgba(107, 42, 163, 0.13);
    padding: 0 8px;
    height: 40px;
    width: 40px;
    min-width: 40px;
    border-radius: 6px;
    border: 1.5px solid rgba(107, 42, 163, 0.18);
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 19, 87, 0.06);
    margin: 0;
}

.microheader-social a:hover {
    background-color: rgba(107, 42, 163, 0.22);
    box-shadow: 0 4px 16px rgba(107, 42, 163, 0.10);
    transform: none;
}

.microheader-social a img {
    filter: brightness(0) invert(1) !important;
    -webkit-filter: brightness(0) invert(1) !important;
    width: 16px;
    height: 16px;
}

.microheader-balance-block {
    display: flex;
    align-items: center;
    background-color: rgba(107, 42, 163, 0.13);
    padding: 0 12px;
    height: 40px;
    min-width: 40px;
    border-radius: 6px;
    border: 1.5px solid rgba(107, 42, 163, 0.18);
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(59, 19, 87, 0.06);
    margin-right: 0;
    margin-left: 0;
    font-weight: 600;
    font-size: 0.9em;
    color: #22c55e;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.microheader-balance-block:hover {
    background-color: rgba(107, 42, 163, 0.22);
    box-shadow: 0 4px 16px rgba(107, 42, 163, 0.10);
}

.microheader-balance-label {
    font-size: 0.9em;
    color: #22c55e;
    margin-right: 2px;
}

.microheader-balance-value {
    font-size: 0.9em;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 6px rgba(34, 197, 94, 0.10);
}

.microheader-balance-coin {
    height: 22px;
    width: 22px;
    margin-right: 4px;
    vertical-align: middle;
    display: inline-block;
}

.microheader-profile {
    border-radius: 6px;
    background: rgba(107, 42, 163, 0.18);
    border: 1.5px solid rgba(107, 42, 163, 0.22);
    box-shadow: 0 2px 8px rgba(59, 19, 87, 0.10);
    padding: 0 12px 0 8px;
    height: 40px;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 8px;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    justify-content: center;
    text-decoration: none;
}

.microheader-profile:hover {
    background: rgba(107, 42, 163, 0.28);
    box-shadow: 0 4px 16px rgba(107, 42, 163, 0.13);
}

.microheader-profile-username {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.92;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    user-select: text;
    text-shadow: 0 1px 6px rgba(59, 19, 87, 0.18);
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.microheader-profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: #2a0e41;
    border: 1.5px solid rgba(107, 42, 163, 0.22);
}

.microheader-auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    padding: 0 16px;
    background: #22c55e;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
    position: relative;
    overflow: hidden;
}

.microheader-auth span {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

.microheader-auth i {
    font-size: 16px;
    margin-right: 6px;
    position: relative;
    z-index: 2;
}

.microheader-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
    background-size: 200% 100%;
}

.microheader-auth:hover {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
    transform: translateY(-1px) scale(1.03);
}

.microheader-auth:hover::before {
    opacity: 1;
    animation: shine 2s linear infinite;
}

/* Microheader Responsive Design */

/* Large screens (1200px+) */
@media (min-width: 1200px) {
    .microheader-search {
        max-width: 900px;
        margin: 0 50px;
    }

    .microheader-filters {
        margin-left: 40px;
    }

    .microheader-nav {
        margin-left: 40px;
    }

    /* Show social media and balance on very large screens */
    .microheader-social {
        display: flex;
    }

    .microheader-balance-block {
        display: flex;
    }

    /* Show the full logo on large screens. */
    .microheader-logo-full {
        display: block;
    }

    .microheader-logo-small {
        display: none;
    }

    .microheader-logo {
        min-width: 150px;
        /* More space for the full logo */
    }
}

/* Extra large screens (1400px+) */
@media (min-width: 1400px) {
    .microheader-search {
        max-width: 1000px;
        margin: 0 60px;
    }

    .microheader-filters {
        margin-left: 50px;
    }

    .microheader-nav {
        margin-left: 50px;
    }

    /* Show all elements on very large screens */
    .microheader-social {
        display: flex;
    }

    .microheader-balance-block {
        display: flex;
    }

    .microheader-logo-full {
        display: block;
    }

    .microheader-logo-small {
        display: none;
    }

    .microheader-social a {
        width: 40px;
        height: 40px;
    }

    .microheader-balance-block {
        padding: 8px 16px;
    }

    .microheader-balance-value {
        font-size: 15px;
    }

    .microheader-profile-username {
        font-size: 15px;
    }
}

/* Desktop screens (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .microheader-search {
        max-width: 700px;
        margin: 0 35px;
    }

    .microheader-filters {
        margin-left: 25px;
    }

    .microheader-nav {
        margin-left: 25px;
    }

    /* Hide social media and balance on desktop screens */
    .microheader-social {
        display: none;
    }

    .microheader-balance-block {
        display: none;
    }

    .microheader-logo {
        min-width: 80px;
    }
}

/* Medium screens (768px - 991px) - Hide social media and balance */
@media (min-width: 768px) and (max-width: 991px) {
    .microheader-social {
        display: none;
    }

    .microheader-balance-block {
        display: none;
    }

    .microheader-logo-full {
        display: none;
    }

    .microheader-logo-small {
        display: block;
    }

    .microheader-logo {
        min-width: 70px;
    }
}

/* Tablet landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .microheader-search {
        max-width: 500px;
        margin: 0 25px;
    }

    .microheader-filters {
        margin-left: 20px;
        gap: 8px;
    }

    .microheader-nav {
        margin-left: 20px;
        gap: 15px;
    }

    .microheader-social {
        gap: 8px;
    }

    .microheader-social a {
        width: 32px;
        height: 32px;
    }

    .microheader-balance-block {
        padding: 6px 12px;
    }

    .microheader-balance-value {
        font-size: 13px;
    }

    .microheader-profile-username {
        font-size: 13px;
    }
}

/* Tablet portrait (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .microheader-search {
        max-width: 400px;
        margin: 0 20px;
    }

    .microheader-filters {
        margin-left: 15px;
        gap: 6px;
    }

    .microheader-nav {
        margin-left: 15px;
        gap: 12px;
    }

    /* Hide social media and balance on smaller screens */
    .microheader-social {
        display: none;
    }

    .microheader-balance-block {
        display: none;
    }

    /* Switch to small logo */
    .microheader-logo-full {
        display: none;
    }

    .microheader-logo-small {
        display: block;
    }

    .microheader-social a {
        width: 28px;
        height: 28px;
    }

    .microheader-balance-block {
        padding: 5px 10px;
    }

    .microheader-balance-value {
        font-size: 12px;
    }

    .microheader-profile-username {
        font-size: 12px;
    }

    .microheader-favorites-btn,
    .microheader-clear-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
    }

    .microheader-price-slider-container {
        min-width: 80px;
    }

    .microheader-current-price {
        font-size: 11px;
    }
}

/* Small tablets (481px - 600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .microheader-search {
        max-width: 300px;
        margin: 0 15px;
    }

    .microheader-filters {
        margin-left: 10px;
        gap: 4px;
    }

    .microheader-nav {
        margin-left: 10px;
        gap: 8px;
    }

    /* Hide social media and balance on very small screens */
    .microheader-social {
        display: none;
    }

    .microheader-balance-block {
        display: none;
    }

    /* Switch to small logo */
    .microheader-logo-full {
        display: none;
    }

    .microheader-logo-small {
        display: block;
    }

    .microheader-social a {
        width: 24px;
        height: 24px;
    }

    .microheader-balance-block {
        padding: 4px 8px;
    }

    .microheader-balance-value {
        font-size: 11px;
    }

    .microheader-profile-username {
        font-size: 11px;
    }

    .microheader-favorites-btn,
    .microheader-clear-btn {
        width: 28px;
        height: 28px;
        padding: 4px;
    }

    .microheader-price-slider-container {
        min-width: 60px;
    }

    .microheader-current-price {
        font-size: 10px;
    }
}

/* Hide microheader on mobile */
@media (max-width: 768px),
screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px),
screen and (max-width: 1024px) and (max-height: 480px) {
    .microheader {
        display: none !important;
    }
}

/* Completely hide micro-top-loot if it exists */
.micro-top-loot,
.micro-top-loot-items,
.micro-top-loot-item,
.micro-top-loot-toggle,
.micro-best-drop,
.micro-best-drop-badge {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Base Styles & Background */
body,
html {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

body {
    background: url("../img/backgrounds/case_background_1080p.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    color: #ffffff;
}

@media screen and (max-width: 1024px) {
    body {
        background: transparent !important;
    }

    body::before {
        display: block !important;
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        background: url("../img/backgrounds/case_background_1080p.jpg");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        pointer-events: none;
    }
}

body::before {
    display: none;
}

/* Removed - effects are now in the background image */

@keyframes smokeEffect {

    0%,
    50%,
    100% {
        background-position: center, center, top center, center, center 75%, 0% 0%;
    }
}

@keyframes nebulaFloat2 {
    0% {
        transform: translate(0, 0);
        opacity: 0.4;
    }

    25% {
        transform: translate(5%, -5%);
        opacity: 0.5;
    }

    50% {
        transform: translate(7%, -7%);
        opacity: 0.4;
    }

    75% {
        transform: translate(-5%, -5%);
        opacity: 0.5;
    }

    100% {
        transform: translate(0, 0);
        opacity: 0.4;
    }
}

@keyframes camoFloat {

    0%,
    100% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0 0, 0 0, 0% 0%;
    }
}

/* Override container styles from base.css only for home page elements */
.hero-banner,
.cases-section {
    max-width: 1700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* Regular container should use the original settings */
.container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    min-height: 100vh;
    overflow: hidden;
}

/* Hero Banner Section */
.hero-banner {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto 20px;
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: stretch;
    height: 420px;
    min-height: 420px;
    padding: 0 10px;
}

#slider-gradient-back,
#slider-gradient-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.8s ease;
    pointer-events: none;
    border-radius: 16px;
}

#slider-gradient-back {
    z-index: 0;
}

#slider-gradient-front {
    z-index: 1;
}

/* On mobile/tablet hide slider side gradient */
@media (max-width: 1024px) {

    #slider-gradient-back,
    #slider-gradient-front {
        display: none !important;
    }
}

#slider-content {
    position: relative;
    z-index: 2;
}

.hero-banner::before,
.hero-banner::after,
.banner-content::before,
.banner-content::after {
    display: none !important;
    content: none !important;
}

.banner-content {
    display: flex;
    width: 100%;
    padding: 20px;
    align-items: flex-end;
    justify-content: space-between;
    background-image: none;
    background-size: 33% auto;
    background-position: right;
    background-repeat: no-repeat;
}

.left-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 300px;
    max-width: 350px;
}

.center-section {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    text-align: center;
    align-items: center;
}

.right-side {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 420px;
    width: 350px;
    min-width: 340px;
    max-width: 420px;
    overflow: hidden;
}

.center-section h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: 2px;
    background: linear-gradient(to right, #4a99e0 0%, #7dd3fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.center-section p {
    margin: 0 0 25px;
    font-size: 16px;
    line-height: 1.5;
    color: #e2e8f0;
    text-align: center;
    max-width: 450px;
}

.countdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.countdown span {
    font-size: 14px;
    color: #94a3b8;
}

.time-blocks {
    display: flex;
    gap: 12px;
}

.time-block {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(147, 51, 234, 0.4);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.time-block span {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.time-block small {
    font-size: 12px;
    color: #94a3b8;
}

.promo-bonus {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bonus-card {
    background: linear-gradient(to right, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.bonus-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-image: url('../img/percent.webp');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}

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

.bonus-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #e2e8f0;
}

.percentage {
    font-size: 28px;
    font-weight: 800;
    color: #3b82f6;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.code {
    background: rgba(15, 23, 42, 0.8);
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.2);
    margin: 0 0 15px;
}

.copy-btn {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.8), rgba(96, 165, 250, 0.7));
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.copy-btn:hover {
    background: linear-gradient(to right, rgba(96, 165, 250, 0.8), rgba(59, 130, 246, 0.7));
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.daily-bonus,
.invite-friends-bonus {
    min-height: unset;
    height: auto;
    padding: 24px 20px 20px 20px;
    border-radius: 16px;
    margin-top: 0;
    margin-bottom: 18px;
    width: 100%;
    max-width: 370px;
    box-sizing: border-box;
    overflow: hidden;
}

.daily-bonus {
    background: linear-gradient(139deg, #2d064d 60%, #7e22ce 100%);
    border: 1.5px solid rgba(126, 34, 206, 0.25);
    color: #fff;
    text-shadow: 0 1px 8px rgba(126, 34, 206, 0.18);
}

.daily-bonus h3,
.daily-bonus p,
.daily-bonus a {
    color: #fff !important;
    text-shadow: 0 1px 8px rgba(126, 34, 206, 0.18);
}

.invite-friends-bonus {
    background: linear-gradient(139deg, #2d064d 60%, #7e22ce 100%);
    border: 1.5px solid rgba(126, 34, 206, 0.25);
    color: #fff;
    text-shadow: 0 1px 8px rgba(126, 34, 206, 0.18);
    padding: 36px 28px 28px 28px;
    margin-bottom: 0;
    max-width: 100%;
    font-size: 1.08rem;
    overflow: hidden;
}

.invite-friends-bonus h3 {
    font-size: 1.18rem;
    margin-bottom: 10px;
}

.invite-friends-bonus p,
.invite-friends-bonus ol {
    font-size: 1.08rem;
    margin-bottom: 14px;
}

.invite-friends-bonus a {
    color: #fff !important;
    text-shadow: 0 1px 8px rgba(59, 130, 246, 0.18);
}

.invite-friends-bonus .event-btn {
    background: #22c55e;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 17px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
    transition: all 0.2s;
    margin-top: 18px;
    margin-bottom: 0;
    outline: none;
    letter-spacing: 0.5px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.invite-friends-bonus .event-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 8px;
}

.invite-friends-bonus .event-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

.invite-friends-bonus .event-btn:hover::before {
    opacity: 1;
    animation: shine 2s linear infinite;
}

.claim-btn,
.copy-invite-btn {
    background: linear-gradient(90deg, #fde047 60%, #fbbf24 100%);
    color: #22223b;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-weight: 700;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.10);
    transition: all 0.2s;
    margin-top: 18px;
    margin-bottom: 0;
    outline: none;
    letter-spacing: 0.5px;
    display: inline-block;
}

.claim-btn:hover {
    background: linear-gradient(90deg, #fbbf24 60%, #fde047 100%);
    color: #18181b;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.18);
    transform: translateY(-2px) scale(1.04);
}

/* optimized: removed earlier invite-link styles in favor of consolidated block below */

.invite-steps {
    margin: 0 0 18px 0;
    padding: 0 0 0 18px;
    color: #d1fae5;
    font-size: 15px;
    list-style: decimal;
}

.invite-link-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #192a44;
    border-radius: 10px;
    padding: 14px 18px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    margin-top: 14px;
    margin-bottom: 10px;
    width: 100%;
    min-width: 0;
}

.invite-link {
    flex: 1;
    background: transparent;
    border: none;
    color: #bbf7d0;
    font-size: 1.08rem;
    font-family: monospace;
    outline: none;
    padding: 6px 8px;
    border-radius: 6px;
    min-width: 0;
}

.copy-invite-btn {
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.08rem;
    font-weight: 700;
    cursor: pointer;
    padding: 12px 28px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 110px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.copy-invite-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a, #22c55e);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 8px;
}

.copy-invite-btn:hover::before {
    opacity: 1;
    animation: shine 2s linear infinite;
}

.copy-invite-btn:hover {
    background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
    transform: scale(1.05);
}

/* Cases Section */
.cases-section {
    max-width: 1700px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.filters {
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(147, 51, 234, 0.2);
    position: relative;
    background: linear-gradient(to right, rgba(38, 35, 78, 0.8), rgba(23, 19, 61, 0.7));
}

.filters-bg-back,
.filters-bg-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.filters-bg-back {
    z-index: 0;
}

.filters-bg-front {
    z-index: 1;
}

.filters .skin-search-row {
    position: relative;
    z-index: 10;
}

.filters .skin-name-input-wrap {
    flex: 0 1 300px;
    min-width: 220px;
    max-width: 340px;
}

.filters .search-mode-row {
    position: relative;
    z-index: 10;
}

.filters .filters-row {
    position: relative;
    z-index: 2;
}

.filters-custom-cases-link {
    position: relative;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.3);
    background-color: rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.5);
    color: rgba(255, 255, 255, 0.96);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.18);
    z-index: 1;
    transition: background-color 0.8s ease, border-color 0.8s ease, box-shadow 0.8s ease, transform 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.filters-custom-cases-link:hover {
    color: #fff;
    border-color: rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.44);
    box-shadow: 0 7px 16px rgba(var(--current-slide-color-rgb, 126, 34, 206), 0.24);
    transform: translateY(-1px);
}

.filters-custom-cases-link:focus-visible {
    outline: 2px solid rgba(216, 180, 254, 0.9);
    outline-offset: 2px;
}

.filters-custom-cases-link:active {
    transform: translateY(0);
}

.filters-custom-cases-link .filters-custom-cases-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.filters-custom-cases-link span {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.2px;
}

.filters-custom-cases-link:hover .filters-custom-cases-icon {
    transform: translateX(1px);
}

.filters-custom-cases-link-desktop {
    position: absolute;
    right: 16px;
    bottom: 10px;
    z-index: 20;
}

.filters-custom-cases-row {
    display: none;
}

@media (max-width: 1100px) {
    .filters-custom-cases-link-desktop {
        right: 10px;
        bottom: 8px;
    }
}

@media (max-width: 768px) {
    .page-home .cases-section .filters-custom-cases-link-desktop {
        display: none !important;
    }

    .page-home .cases-section .filters-custom-cases-row {
        display: flex;
        justify-content: center;
        margin: 0 auto 18px;
        padding: 0 12px;
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link {
        display: flex !important;
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        max-width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 14px 20px;
        justify-content: center;
        border-radius: 12px;
        background: linear-gradient(135deg, #16a34a, #22c55e);
        border: 1px solid rgba(34, 197, 94, 0.3);
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
        color: #fff;
        z-index: 1;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link span {
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link .filters-custom-cases-icon {
        width: 18px;
        height: 18px;
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link:hover {
        background: linear-gradient(135deg, #15803d, #16a34a);
        border-color: rgba(34, 197, 94, 0.5);
        box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
        color: #fff;
        transform: translateY(-2px);
    }

    .page-home .cases-section .filters-custom-cases-row .filters-custom-cases-link:active {
        transform: translateY(0);
    }

    /* Optimize microheader clear button for mobile */
    .microheader-clear-btn {
        min-width: 42px;
        height: 42px;
        padding: 8px;
        border-radius: 12px;
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .microheader-clear-btn:hover {
        background: rgba(239, 68, 68, 0.25);
        border-color: rgba(239, 68, 68, 0.5);
    }
}

.filters::before,
.filters::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            rgba(147, 51, 234, 0.4),
            rgba(168, 85, 247, 0.5),
            rgba(147, 51, 234, 0.4),
            transparent);
}

.filters::before {
    top: 0;
}

.filters::after {
    bottom: 0;
}

.search-container {
    flex: 1;
    min-width: 250px;
    display: flex;
    height: 46px;
    border: 1px solid rgba(147, 51, 234, 0.4);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.7);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: rgba(147, 51, 234, 0.7);
    box-shadow: 0 0 10px rgba(126, 34, 206, 0.2);
}

.search {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: "Outfit", "Montserrat", sans-serif;
    color: #e2e8f0;
    font-size: 15px;
    padding: 0 15px;
}

.search::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.search-container button {
    background: transparent;
    border: none;
    width: 46px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-container button img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.search-container button:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* optimized: removed duplicate visible layout for .filter-tabs; hidden version is defined later */

.filter-tab {
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(51, 65, 85, 0.4);
}

.filter-tab.active,
.filter-tab:hover {
    background: rgba(147, 51, 234, 0.2);
    color: #e2e8f0;
    border-color: rgba(147, 51, 234, 0.4);
}

/* optimized: removed early .filter-buttons block; consolidated later */

/* optimized: removed duplicated .section-title block (already defined above) */

/* optimized: removed duplicated cases grid/card block (already defined above) */

/* optimized: removed duplicated responsive block (already defined above) */

.price-filter {
    flex: 1;
    padding: 10px 0;
}

.price-slider-container {
    width: 100%;
    padding: 0 15px;
}

.price-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 14px;
    gap: 10px;
}

.price-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: linear-gradient(to right, rgba(79, 17, 147, 0.6), rgba(126, 34, 206, 0.8));
    outline: none;
    margin: 0;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(126, 34, 206, 0.5);
    transition: all 0.3s ease;
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(126, 34, 206, 0.5);
    transition: all 0.3s ease;
}

.price-slider::-webkit-slider-thumb:hover,
.price-slider::-moz-range-thumb:hover {
    background: #9333ea;
    transform: scale(1.1);
}

.current-price {
    text-align: center;
    font-size: 14px;
    color: #e2e8f0;
    margin-top: 5px;
    font-weight: 500;
    transition: opacity 0.15s ease;
}

/* Price slider tooltip bubble (desktop main header only) */
.price-slider-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.price-slider-wrap .price-slider {
    width: 100%;
}

.price-slider-tooltip {
    position: absolute;
    bottom: calc(100% + 14px);
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7e22ce, #a855f7);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(126, 34, 206, 0.5);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
    letter-spacing: 0.3px;
}

.price-slider-tooltip.visible {
    opacity: 1;
}

.price-slider-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #a855f7;
}

.filter-tabs {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(51, 65, 85, 0.4);
}

.filter-tab.active,
.filter-tab:hover {
    background: rgba(147, 51, 234, 0.2);
    color: #e2e8f0;
    border-color: rgba(147, 51, 234, 0.4);
}

.filters-row {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0 15px;
    height: 38px;
    background: linear-gradient(to right, rgba(79, 17, 147, 0.6), rgba(126, 34, 206, 0.5));
    border: 1px solid rgba(147, 51, 234, 0.4);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    outline: 2px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(to right, rgba(79, 17, 147, 0.75), rgba(126, 34, 206, 0.65));
}

.filter-btn img {
    width: 16px;
    opacity: 0.8;
}

.filter-btn:hover {
    background: linear-gradient(to right, rgba(126, 34, 206, 0.6), rgba(147, 51, 234, 0.5));
    box-shadow: 0 0 10px rgba(126, 34, 206, 0.3);
}

.filter-btn.clear {
    background: linear-gradient(to right, rgba(51, 65, 85, 0.6), rgba(71, 85, 105, 0.5));
    border-color: rgba(100, 116, 139, 0.4);
}

.filter-btn.clear:hover {
    background: linear-gradient(to right, rgba(71, 85, 105, 0.6), rgba(100, 116, 139, 0.5));
}

.section-title {
    margin: 40px 0 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-small {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-small img {
    width: 100%;
    height: auto;
}

.logo-small.default-logo {
    color: #cbd5e1;
}

.logo-small.default-logo.gold {
    color: #fbbf24;
}

.section-title[style*="--group-color"] .logo-small.default-logo {
    color: var(--group-color);
}

.logo-small-icon {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    filter:
        drop-shadow(0 0 5px rgba(255, 255, 255, 0.18)) drop-shadow(0 0 10px color-mix(in srgb, currentColor, transparent 72%));
}

.logo-small-icon-tint {
    position: absolute;
    inset: 0;
    background-color: currentColor;
    -webkit-mask-image: url('/static/img/Logo/Logo_silver.webp');
    mask-image: url('/static/img/Logo/Logo_silver.webp');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    opacity: 0.78;
}

.logo-small-icon-detail {
    position: absolute;
    inset: 0;
    display: block;
    background-image: url('/static/img/Logo/Logo_silver.webp');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.76;
    mix-blend-mode: normal;
    filter: brightness(1.08) contrast(1.06);
    pointer-events: none;
}

.section-title h2 {
    font-size: 24px;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(147, 51, 234, 0.4);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(to right,
            transparent,
            rgba(147, 51, 234, 0.7),
            rgba(168, 85, 247, 0.8),
            rgba(147, 51, 234, 0.7),
            transparent);
}

.section-title.bonus-cases h2 {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.section-title.bonus-cases::after {
    background: linear-gradient(to right,
            transparent,
            rgba(245, 158, 11, 0.7),
            rgba(234, 179, 8, 0.8),
            rgba(245, 158, 11, 0.7),
            transparent);
}

.section-title[style*="--group-color"] h2 {
    color: var(--group-color) !important;
    text-shadow: 0 0 12px color-mix(in srgb, var(--group-color), transparent 35%) !important;
}

.section-title[style*="--group-color"]::after {
    background: linear-gradient(to right,
            transparent,
            var(--group-color),
            var(--group-color),
            var(--group-color),
            transparent) !important;
    opacity: 0.85;
    height: 3px;
    box-shadow: 0 0 10px color-mix(in srgb, var(--group-color), transparent 20%);
}

.custom-group-header h2 {
    color: var(--group-color) !important;
}

.custom-group-header::after {
    background: linear-gradient(to right,
            transparent,
            var(--group-color),
            var(--group-color),
            var(--group-color),
            transparent);
    opacity: 0.8;
    height: 3px;
    /* Slightly thicker for visibility */
    box-shadow: 0 0 10px var(--group-color);
    /* Add glow to underline too */
}

/* Custom Group Case Card Styles */
/* Custom Group Case Card Styles */
.custom-group-case:hover {
    border-color: color-mix(in srgb, var(--group-color), transparent 60%) !important;
    box-shadow: 0 6px 15px color-mix(in srgb, var(--group-color), transparent 70%), 0 0 8px color-mix(in srgb, var(--group-color), transparent 70%) inset !important;
}

.custom-group-case:hover .case-card-title {
    text-shadow: 0 0 12px color-mix(in srgb, var(--group-color), transparent 20%) !important;
}

.custom-group-case .case-price::before {
    background: linear-gradient(90deg, transparent 0%, var(--group-color) 40%, var(--group-color) 60%, transparent 100%) !important;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(15px, 2.5vw, 30px);
    margin-bottom: clamp(20px, 3vw, 40px);
}

.case-card {
    position: relative;
    border-radius: 12px;
    overflow: visible;
    aspect-ratio: 1;
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 116, 139, 0.2);
    transform: perspective(800px) rotateX(0deg);
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(147, 51, 234, 0.4);
    box-shadow: 0 6px 15px rgba(126, 34, 206, 0.3), 0 0 8px rgba(147, 51, 234, 0.3) inset;
    z-index: 2;
}

.case-content {
    padding: clamp(12px, 2vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    overflow: visible;
    flex: 1;
    min-height: 0;
}

.case-card .case-card-title {
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 clamp(8px, 1vw, 15px);
    text-align: center;
    transition: all 0.3s ease;
    min-height: clamp(36px, 4vw, 48px);
    max-height: clamp(48px, 5vw, 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.case-card:hover .case-card-title {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(147, 51, 234, 0.8);
}

.case-image {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: all 0.4s ease;
}

.case-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

.case-card:hover .case-image img {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.4));
}

.case-price {
    padding: 8px 25px;
    border-radius: 6px;
    margin-top: -20px;
    transition: all 0.3s ease;
    position: relative;
    min-height: 40px;
    overflow: visible;
}

.case-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.favorite-heart {
    background: transparent;
    border: none;
    padding: 4px;
    margin-left: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    position: relative;
    pointer-events: auto;
    touch-action: manipulation;
}

.favorite-heart svg {
    transition: transform 0.15s ease, fill 0.15s ease, stroke 0.15s ease;
}

.favorite-heart.active svg {
    fill: #ef4444;
    stroke: #ef4444;
    transform: scale(1.08);
}

.favorite-heart.favorite-yt-like svg {
    animation: favoriteYoutubePop 0.46s cubic-bezier(.2, 1.2, .25, 1) both;
}

@keyframes favoriteYoutubePop {
    0% {
        transform: scale(1);
    }

    38% {
        transform: scale(0.78);
    }

    68% {
        transform: scale(1.22);
    }

    100% {
        transform: scale(1);
    }
}

.favorite-heart--disabled {
    cursor: default;
}

.favorite-heart--disabled svg {
    opacity: 0.72;
}

.case-price::before {
    content: '';
    display: block;
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 99.5%;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, transparent 0%, #a855f7 40%, #9333ea 60%, transparent 100%);
    opacity: 0.7;
    filter: blur(1px);
    pointer-events: none;
    z-index: 2;
}

.case-price span {
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
    word-break: break-word;
    line-height: 1.1;
}

.case-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.case-price-meta--likes,
.case-price-favorite {
    position: relative;
    z-index: 30;
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .banner-content {
        flex-direction: column;
        background-position: center;
        padding: 30px;
    }

    .left-side,
    .center-section,
    .right-side {
        max-width: 100%;
        width: 100%;
    }

    .right-side {
        display: none;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
        gap: clamp(15px, 2vw, 25px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .event-info {
        padding: 15px 0;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs,
    .filter-buttons {
        justify-content: center;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
        gap: clamp(12px, 2vw, 20px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    }
}

/* Адаптация для маленьких экранов - скрываем текст, оставляем только иконки */
@media (max-width: 380px) {
    .mobile-filter-row .filter-btn span {
        display: none !important;
    }

    .mobile-filter-row .filter-btn {
        padding: 0 10px !important;
        justify-content: center !important;
    }

    .mobile-filter-row .filter-btn svg {
        margin: 0 !important;
    }
}

@media (min-width: 769px) {
    .featured-cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    }
}

@media (min-width: 1400px) {
    .classic-cases-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

.featured-cases-grid .case-card {
    aspect-ratio: 1;
}

/* optimized: removed earlier height override; consolidated below */

.featured-cases-grid .case-image img {
    max-height: 117%;
    max-width: 117%;
    object-fit: contain;
    transform: scale(1.1);
}

.featured-cases-grid .case-card:hover {
    transform: perspective(800px) rotateX(5deg) translateY(-10px) scale(1.03);
    border-color: rgba(168, 85, 247, 0.8);
    box-shadow: 0 15px 30px rgba(126, 34, 206, 0.5), 0 0 20px rgba(168, 85, 247, 0.7) inset;
    z-index: 3;
}

.featured-cases-grid .case-card:hover .case-image img {
    transform: translateY(-15px) scale(1.15);
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.6));
}

.featured-cases-grid .case-content {
    padding: clamp(10px, 1.5vw, 12px) clamp(15px, 2vw, 20px);
}

.featured-cases-grid .case-image {
    margin-bottom: clamp(6px, 0.8vw, 8px);
    flex: 1;
    min-height: 0;
}

.featured-cases-grid .case-price {
    margin-top: -30px;
}

.featured-cases-grid .case-card .case-card-title {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 clamp(10px, 1.2vw, 15px);
    text-align: center;
    transition: all 0.3s ease;
    min-height: clamp(40px, 4.5vw, 56px);
    max-height: clamp(56px, 6vw, 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    padding: 0 clamp(3px, 0.5vw, 5px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-cases-grid .case-price span {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    color: #22c55e;
    word-break: break-word;
    line-height: 1.1;
}

.featured-cases-grid .case-price::before {
    height: 4px;
}

.classic-cases-grid .case-card:hover {
    transform: perspective(800px) rotateX(5deg) translateY(-10px) scale(1.03);
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.4), 0 0 20px rgba(234, 179, 8, 0.7) inset;
    z-index: 3;
}

.classic-cases-grid .case-card:hover .case-image img {
    transform: translateY(-15px) scale(1.15);
    filter: drop-shadow(0 20px 20px rgba(245, 158, 11, 0.7));
}

.classic-cases-grid .case-card:hover .case-card-title {
    color: #ffffff;
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.9);
}

.classic-cases-grid .case-card .case-card-title {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    min-height: clamp(40px, 4.5vw, 52px);
    max-height: clamp(52px, 6vw, 65px);
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    padding: 0 5px;
}

.classic-cases-grid .case-price span {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
}

.classic-cases-grid .case-price::before {
    background: linear-gradient(90deg, transparent 0%, #fbbf24 40%, #f59e0b 60%, transparent 100%);
}

.classic-cases-grid .case-price {
    margin-top: -25px;
}

/* optimized: removed duplicate .hero-banner block */
.hero-banner .right-side {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 420px;
    /* фиксированная высота для слайдшоу */
    width: 350px;
    /* фиксированная ширина для слайдшоу */
    min-width: 340px;
    max-width: 420px;
    overflow: hidden;
    /* чтобы изображения не выходили за пределы */
}

.hero-banner .right-side img {
    position: static;
    /* убираем absolute */
    right: unset;
    bottom: unset;
    height: 100%;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* чтобы изображение не выходило за пределы */
    z-index: 2;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.5s, transform 0.5s;
}

/* BEGINNERS CASES SECTION */
.beginners-cases {
    margin: 40px 0 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.beginners-cases h2 {
    font-size: 24px;
    font-weight: 700;
    color: #38bdf8;
    margin: 0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    position: relative;
    display: inline-block;
}

.beginners-cases .logo-small img {
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

/*
.beginners-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.beginners-cases-grid .case-card {
    border: 2px solid #38bdf8;
    background: linear-gradient(120deg, rgba(56,189,248,0.10) 0%, rgba(23,19,61,0.85) 100%);
    box-shadow: 0 5px 20px rgba(56,189,248,0.10);
    transition: all 0.3s;
}
.beginners-cases-grid .case-card:hover {
    border-color: #0ea5e9;
    box-shadow: 0 12px 24px rgba(56,189,248,0.18), 0 0 15px rgba(56,189,248,0.18) inset;
    transform: translateY(-5px) scale(1.03);
    z-index: 2;
}
.beginners-cases-grid .case-card .case-card-title {
    color: #38bdf8;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(56,189,248,0.18);
}
.beginners-cases-grid .case-price span {
    color: #38bdf8;
    font-size: 20px;
    font-weight: 700;
}
*/
.lorem-block img[alt="Bonus Cards"] {
    height: 64px;
    width: auto;
    margin-right: 14px;
    display: block;
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 600px) {
    .lorem-block img[alt="Bonus Cards"] {
        height: 44px;
        margin-right: 8px;
    }
}

@keyframes pulse-pop {

    0%,
    100% {
        transform: scale(1);
    }
}

.pulse-pop {
    animation: pulse-pop 1.1s cubic-bezier(.22, 1, .36, 1) 1;
}

.home-bg-weapon-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 50vw;
    height: 140vh;
    background: url('/static/img/weapon.webp') no-repeat left center;
    background-size: cover;
    opacity: 0.3;
    z-index: 0 !important;
    pointer-events: none;
}

.home-bg-weapon-right {
    position: absolute;
    top: 3600px;
    right: 0;
    width: 50vw;
    height: 140vh;
    background: url('/static/img/weapon2.webp') no-repeat right center;
    background-size: cover;
    opacity: 0.3;
    z-index: 0 !important;
    pointer-events: none;
}

.home-bg-weapon-left-lower {
    position: absolute;
    top: 7200px;
    left: 0;
    width: 50vw;
    height: 140vh;
    background: url('/static/img/weapon.webp') no-repeat left center;
    background-size: cover;
    opacity: 0.3;
    z-index: 0 !important;
    pointer-events: none;
}

.home-content {
    position: relative;
    z-index: 0;
}


@media screen and (max-width: 1024px) {

    #slider-arrow-left,
    #slider-arrow-right {
        display: none !important;
    }

    .hero-banner {
        margin: 20px auto 15px;
        height: auto;
        min-height: 280px;
        padding: 0 12px;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(126, 34, 206, 0.15);
        overflow: visible;
    }

    .banner-content {
        padding: 20px;
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        height: auto;
        min-height: auto;
    }

    .hero-left-col {
        max-width: 100%;
        width: 100%;
        order: 2;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .hero-center.hero-center-mobile {
        order: 1;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        height: auto;
    }

    .hero-center.hero-center-mobile>div:not(.creator-promo-banner) {
        min-height: auto;
        height: auto;
        padding: 20px 0;
        border-radius: 12px;
    }

    .bonus-card {
        min-height: 360px;
        padding: 28px 24px;
        margin-bottom: 24px;
        border-radius: 16px;
        box-shadow: 0 6px 24px rgba(126, 34, 206, 0.15);
    }

    .bonus-card .bonus-header h3 {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }

    .bonus-card .percentage {
        font-size: 2.4rem;
    }

    .bonus-card .code {
        font-size: 1.2rem;
        padding: 14px;
        margin-bottom: 20px;
    }

    .bonus-card .copy-btn {
        font-size: 1.2rem;
        padding: 14px 20px;
    }

    .lorem-block,
    .invite-friends-bonus {
        padding: 20px 16px;
        margin-bottom: 0;
        max-width: 100%;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(126, 34, 206, 0.12);
        height: auto;
    }

    .lorem-block {
        min-height: auto;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 12px;
    }

    .invite-friends-bonus {
        min-height: auto;
        height: auto;
        padding: 24px 20px;
        font-size: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 14px;
    }

    .invite-friends-bonus h3 {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus ol {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .cases-section {
        padding: 0 15px;
        margin-bottom: 30px;
    }

    .filters {
        padding: 15px;
        gap: 15px;
        margin-bottom: 30px;
        border-radius: 16px;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.85), rgba(23, 19, 61, 0.8));
        box-shadow: 0 4px 20px rgba(126, 34, 206, 0.15);
    }

    .filters-row {
        flex-direction: column;
        gap: 18px;
    }

    .search-container {
        height: 48px;
        width: 100%;
        border-radius: 12px;
        border: 2px solid rgba(147, 51, 234, 0.3);
        background: rgba(15, 23, 42, 0.8);
        box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.1) inset;
        transition: all 0.3s ease;
    }

    .search-container:focus-within {
        border-color: rgba(147, 51, 234, 0.7);
        box-shadow: 0 0 20px rgba(126, 34, 206, 0.3);
        transform: translateY(-1px);
    }

    .search {
        font-size: 16px;
        padding: 0 18px;
        height: 44px;
        border-radius: 10px;
        color: #ffffff;
        letter-spacing: 0.3px;
    }

    .search::placeholder {
        color: rgba(148, 163, 184, 0.7);
        font-size: 15px;
    }

    .search-container button {
        width: 48px;
        height: 44px;
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.6), rgba(126, 34, 206, 0.7));
        transition: all 0.3s ease;
    }

    .search-container button:hover {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.8), rgba(126, 34, 206, 0.9));
        transform: scale(1.05);
    }

    .filter-buttons {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0 16px;
        height: 44px;
        font-size: 14px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(79, 17, 147, 0.7), rgba(126, 34, 206, 0.6));
        border: 1px solid rgba(147, 51, 234, 0.4);
        color: #ffffff;
        font-weight: 600;
        letter-spacing: 0.3px;
        transition: all 0.3s ease;
        flex: 1;
        min-width: 120px;
        max-width: 150px;
    }

    .filter-btn:hover,
    .filter-btn:active {
        background: linear-gradient(135deg, rgba(126, 34, 206, 0.8), rgba(147, 51, 234, 0.7));
        box-shadow: 0 4px 15px rgba(126, 34, 206, 0.4);
        transform: translateY(-2px);
    }

    .price-filter {
        background: rgba(15, 23, 42, 0.6);
        border-radius: 12px;
        padding: 16px;
        border: 1px solid rgba(147, 51, 234, 0.2);
    }

    .price-range {
        margin-bottom: 8px;
    }

    .price-slider {
        height: 8px;
        border-radius: 4px;
        background: linear-gradient(to right, rgba(79, 17, 147, 0.7), rgba(126, 34, 206, 0.9));
    }

    .price-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        border: 3px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 10px rgba(126, 34, 206, 0.6);
    }

    .current-price {
        text-align: center;
        font-size: 15px;
        font-weight: 600;
        color: #ffffff;
        margin-top: 8px;
    }

    .section-title {
        margin: 30px 0 20px;
    }

    .section-title h2 {
        font-size: 18px;
    }

    .center-section h1 {
        font-size: 24px;
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }

    .case-card {
        height: 200px;
    }

    .case-content {
        padding: 15px;
    }

    .case-card .case-card-title {
        font-size: 16px;
        min-height: 40px;
        margin-bottom: 12px;
    }

    .case-image {
        height: 170px;
        margin-bottom: 2px;
    }

    .case-price {
        padding: 6px 20px;
        margin-top: -15px;
    }

    .case-price span {
        font-size: 18px;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-cases-grid .case-card {
        height: 360px;
    }

    .featured-cases-grid .case-image {
        height: 250px;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 20px;
        min-height: 48px;
        text-transform: none !important;
        letter-spacing: 0.02em;
    }

    .featured-cases-grid .case-price span {
        font-size: 22px;
    }

    .classic-cases-grid .case-image {
        height: 230px;
    }

    .cases-grid .case-image img {
        transform: scale(1.18) !important;
        max-height: 120% !important;
    }

    .featured-cases-grid .case-image img {
        transform: scale(1.22) !important;
        max-height: 125% !important;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.14) !important;
        max-height: 118% !important;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 18px;
        min-height: 44px;
    }

    .classic-cases-grid .case-price span {
        font-size: 20px;
    }

    .beginners-cases-grid .case-image {
        height: 210px;
    }

    .beginners-cases-grid .case-image img {
        transform: translateY(-16px) scale(1.35) !important;
        max-height: 132% !important;
    }

    .beginners-cases .case-image {
        height: 210px;
    }

    .beginners-cases .case-image img {
        transform: translateY(-16px) scale(1.35) !important;
        max-height: 132% !important;
    }

    .beginners-cases .case-price {
        margin-top: -8px;
    }
}


/* Variables */
:root {
    --skeleton-bg: rgba(148, 163, 184, 0.16);
    --skeleton-highlight: rgba(255, 255, 255, 0.28);
    --skeleton-radius: 10px;
}

/* Shimmer animation */
@keyframes skeletonShimmerHome {

    0%,
    100% {
        background-position: -200% 0;
    }
}

/* Primitive blocks */
.skeleton-block {
    background: linear-gradient(90deg,
            var(--skeleton-bg) 25%,
            var(--skeleton-highlight) 37%,
            var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
    border-radius: var(--skeleton-radius);
    color: transparent !important;
}

.skeleton-text {
    height: 1em;
    line-height: 1;
    border-radius: 6px;
}

.skeleton-text.sm {
    height: 0.8em;
}

.skeleton-text.lg {
    height: 1.2em;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-block {
        animation: none;
    }
}

/* Helpers: allow multiple toggles */
.is-loading .as-skeleton,
[data-loading="true"] .as-skeleton {
    position: relative;
}

.is-loading .as-skeleton::before,
[data-loading="true"] .as-skeleton::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg,
            var(--skeleton-bg) 25%,
            var(--skeleton-highlight) 37%,
            var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

/* Toggle on body for home page */
body.loading-home .banner-content .left-side>*,
body.loading-home .banner-content .center-section>* {
    color: transparent;
}

/* Hero: title, paragraph, countdown block become skeletons */
body.loading-home .center-section h1,
body.loading-home .center-section p {
    min-height: 1.2em;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

body.loading-home .center-section h1 {
    height: 1.6em;
}

body.loading-home .center-section p {
    height: 1.1em;
    max-width: 520px;
}

/* Hero right-side slideshow placeholder */
body.loading-home .hero-banner .right-side img {
    opacity: 0;
}

body.loading-home .hero-banner .right-side::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

/* Bonus cards as a whole get an overlay skeleton */
body.loading-home .daily-bonus,
body.loading-home .invite-friends-bonus,
body.loading-home .lorem-block {
    position: relative;
}

body.loading-home .daily-bonus::before,
body.loading-home .invite-friends-bonus::before,
body.loading-home .lorem-block::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

/* Cases grid skeletons */
body.loading-home .cases-grid .case-card {
    pointer-events: none;
}

body.loading-home .cases-grid .case-card .case-card-title {
    color: transparent;
    min-height: 18px;
    height: 18px;
    width: 80%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

body.loading-home .cases-grid .case-card .case-image {
    position: relative;
}

body.loading-home .cases-grid .case-card .case-image img {
    opacity: 0;
}

body.loading-home .cases-grid .case-card .case-image::before {
    content: '';
    display: block;
    width: 72%;
    height: 78%;
    margin: 0 auto;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
}

body.loading-home .cases-grid .case-card .case-price {
    position: relative;
    min-height: 40px;
}

body.loading-home .cases-grid .case-card .case-price>* {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.loading-home .cases-grid .case-card .case-price::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(72%, 190px);
    height: 16px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--skeleton-bg) 25%, var(--skeleton-highlight) 37%, var(--skeleton-bg) 63%);
    background-size: 400% 100%;
    animation: skeletonShimmerHome 1.1s ease-in-out infinite;
    pointer-events: none;
    z-index: 5;
}

/* Subtle randomization for better realism */
body.loading-home .cases-grid .case-card:nth-child(3n) .case-card-title {
    width: 70%;
}

body.loading-home .cases-grid .case-card:nth-child(4n) .case-card-title {
    width: 85%;
}

body.loading-home .cases-grid .case-card:nth-child(5n) .case-image::before {
    width: 80%;
    height: 74%;
}

/* Smaller screens adjust skeleton block sizing automatically */
@media (max-width: 768px) {
    body.loading-home .center-section h1 {
        height: 1.4em;
    }

    body.loading-home .center-section p {
        height: 1em;
    }

    body.loading-home .cases-grid .case-card .case-card-title {
        height: 16px;
    }

    body.loading-home .cases-grid .case-card .case-price::after {
        height: 14px;
        width: min(76%, 150px);
    }
}

@media (max-width: 480px) {
    body.loading-home .cases-grid .case-card .case-image::before {
        width: 86%;
        height: 70%;
    }
}

@media screen and (max-width: 768px) {
    body {
        background-attachment: fixed !important;
        background-size: cover !important;
        background-position: center !important;
    }

    .hero-banner {
        margin: 20px auto 15px;
        height: auto;
        min-height: 220px;
        padding: 0 12px;
        border-radius: 16px;
    }

    .banner-content {
        padding: 20px;
        gap: 20px;
    }

    .hero-center.hero-center-mobile>div {
        min-height: 220px;
        padding: 20px 0;
    }

    .bonus-card {
        min-height: 320px;
        padding: 24px 20px;
        margin-bottom: 20px;
    }

    .bonus-card .bonus-header h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .bonus-card .percentage {
        font-size: 2.2rem;
    }

    .bonus-card .code {
        font-size: 1.1rem;
        padding: 12px;
        margin-bottom: 18px;
    }

    .bonus-card .copy-btn {
        font-size: 1.1rem;
        padding: 12px 18px;
    }

    .lorem-block {
        min-height: 160px;
        padding: 20px 16px;
        font-size: 1rem;
    }

    .lorem-block h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .invite-friends-bonus {
        min-height: 420px;
        padding: 24px 20px;
        font-size: 1rem;
    }

    .invite-friends-bonus h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus ol {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .invite-steps {
        margin: 0 0 18px 0;
        padding: 0 0 0 20px;
        font-size: 0.95rem;
    }

    .cases-section {
        padding: 0 10px;
        margin-bottom: 25px;
    }

    .filters {
        padding: 16px 12px;
        gap: 16px;
        margin-bottom: 25px;
        border-radius: 14px;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.9), rgba(23, 19, 61, 0.85));
        box-shadow: 0 6px 25px rgba(126, 34, 206, 0.18);
    }

    .filters-row {
        flex-direction: column;
        gap: 20px;
    }

    .search-container {
        height: 52px;
        width: 100%;
        border-radius: 14px;
        border: 2px solid rgba(147, 51, 234, 0.4);
        background: rgba(15, 23, 42, 0.85);
        box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.15) inset;
        transition: all 0.3s ease;
    }

    .search-container:focus-within {
        border-color: rgba(147, 51, 234, 0.8);
        box-shadow: 0 0 25px rgba(126, 34, 206, 0.4);
        transform: translateY(-2px);
    }

    .search {
        font-size: 16px;
        padding: 0 20px;
        height: 48px;
        border-radius: 12px;
        color: #ffffff;
        letter-spacing: 0.4px;
        font-weight: 500;
    }

    .search::placeholder {
        color: rgba(148, 163, 184, 0.8);
        font-size: 15px;
    }

    .search-container button {
        width: 52px;
        height: 48px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.7), rgba(126, 34, 206, 0.8));
        transition: all 0.3s ease;
    }

    .search-container button:hover {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.9), rgba(126, 34, 206, 1));
        transform: scale(1.08);
    }

    .filter-buttons {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0 14px;
        height: 48px;
        font-size: 14px;
        border-radius: 14px;
        background: linear-gradient(135deg, rgba(79, 17, 147, 0.75), rgba(126, 34, 206, 0.65));
        border: 1px solid rgba(147, 51, 234, 0.5);
        color: #ffffff;
        font-weight: 700;
        letter-spacing: 0.4px;
        transition: all 0.3s ease;
        flex: 1;
        min-width: 110px;
        max-width: 140px;
        text-transform: uppercase;
        box-shadow: 0 2px 8px rgba(126, 34, 206, 0.15);
    }

    .filter-btn:hover,
    .filter-btn:active {
        background: linear-gradient(135deg, rgba(126, 34, 206, 0.85), rgba(147, 51, 234, 0.75));
        box-shadow: 0 6px 20px rgba(126, 34, 206, 0.5);
        transform: translateY(-3px) scale(1.02);
    }

    .price-filter {
        background: rgba(15, 23, 42, 0.7);
        border-radius: 14px;
        padding: 18px;
        border: 1px solid rgba(147, 51, 234, 0.3);
        box-shadow: 0 2px 12px rgba(126, 34, 206, 0.1);
    }

    .price-range {
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 600;
    }

    .price-slider {
        height: 10px;
        border-radius: 5px;
        background: linear-gradient(to right, rgba(79, 17, 147, 0.8), rgba(126, 34, 206, 1));
    }

    .price-slider::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
        border: 3px solid rgba(255, 255, 255, 1);
        box-shadow: 0 3px 12px rgba(126, 34, 206, 0.7);
    }

    .current-price {
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: #ffffff;
        margin-top: 10px;
        text-shadow: 0 1px 3px rgba(126, 34, 206, 0.3);
    }

    .section-title {
        margin: 25px 0 15px;
    }

    .section-title h2 {
        font-size: 18px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin-bottom: 25px;
    }

    .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    }

    .featured-cases-grid .case-card {
        height: auto !important;
        min-height: auto;
        aspect-ratio: 1;
    }

    .featured-cases-grid .case-image {
        height: auto;
    }

    .case-content {
        padding: 12px;
    }

    .case-card .case-card-title {
        font-size: 15px;
        min-height: 36px;
        margin-bottom: 10px;
    }

    .case-image {
        height: auto;
    }

    .case-price {
        padding: 5px 18px;
        margin-top: -12px;
    }

    .case-price span {
        font-size: 16px;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .featured-cases-grid .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .featured-cases-grid .case-image {
        height: auto;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 18px;
        min-height: 44px;
    }

    .featured-cases-grid .case-price span {
        font-size: 20px;
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 16px;
        min-height: 40px;
    }

    .classic-cases-grid .case-price span {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .hero-banner {
        margin: 18px auto 12px;
        height: auto;
        min-height: 200px;
        padding: 0 8px;
        border-radius: 14px;
    }

    .banner-content {
        padding: 16px;
        gap: 16px;
    }

    .hero-center.hero-center-mobile>div {
        min-height: 200px;
        padding: 16px 0;
    }

    .bonus-card {
        min-height: 280px;
        padding: 24px 20px;
        margin-bottom: 20px;
    }

    .bonus-card .bonus-header h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .bonus-card .percentage {
        font-size: 2rem;
    }

    .bonus-card .code {
        font-size: 1rem;
        padding: 12px;
        margin-bottom: 18px;
    }

    .bonus-card .copy-btn {
        font-size: 1rem;
        padding: 12px 16px;
    }

    .lorem-block {
        min-height: 140px;
        padding: 18px 14px;
        font-size: 0.95rem;
    }

    .lorem-block h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .invite-friends-bonus {
        min-height: 300px;
        padding: 18px 14px;
        font-size: 0.9rem;
    }

    .invite-friends-bonus h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus ol {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .invite-steps {
        margin: 0 0 12px 0;
        padding: 0 0 0 16px;
        font-size: 0.85rem;
    }

    .cases-section {
        padding: 0 10px;
        margin-bottom: 25px;
    }

    .filters {
        padding: 16px 12px;
        gap: 16px;
        margin-bottom: 25px;
        border-radius: 14px;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.9), rgba(23, 19, 61, 0.85));
        box-shadow: 0 6px 25px rgba(126, 34, 206, 0.18);
    }

    .filters-row {
        flex-direction: column;
        gap: 20px;
    }

    .search-container {
        height: 52px;
        width: 100%;
        border-radius: 14px;
        border: 2px solid rgba(147, 51, 234, 0.4);
        background: rgba(15, 23, 42, 0.85);
        box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.15) inset;
        transition: all 0.3s ease;
    }

    .search-container:focus-within {
        border-color: rgba(147, 51, 234, 0.8);
        box-shadow: 0 0 25px rgba(126, 34, 206, 0.4);
        transform: translateY(-2px);
    }

    .search {
        font-size: 16px;
        padding: 0 20px;
        height: 48px;
        border-radius: 12px;
        color: #ffffff;
        letter-spacing: 0.4px;
        font-weight: 500;
    }

    .search::placeholder {
        color: rgba(148, 163, 184, 0.8);
        font-size: 15px;
    }

    .search-container button {
        width: 52px;
        height: 48px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.7), rgba(126, 34, 206, 0.8));
        transition: all 0.3s ease;
    }

    .search-container button:hover {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.9), rgba(126, 34, 206, 1));
        transform: scale(1.08);
    }

    .filter-buttons {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0 14px;
        height: 48px;
        font-size: 14px;
        border-radius: 14px;
        background: linear-gradient(135deg, rgba(79, 17, 147, 0.75), rgba(126, 34, 206, 0.65));
        border: 1px solid rgba(147, 51, 234, 0.5);
        color: #ffffff;
        font-weight: 700;
        letter-spacing: 0.4px;
        transition: all 0.3s ease;
        flex: 1;
        min-width: 110px;
        max-width: 140px;
        text-transform: uppercase;
        box-shadow: 0 2px 8px rgba(126, 34, 206, 0.15);
    }

    .filter-btn:hover,
    .filter-btn:active {
        background: linear-gradient(135deg, rgba(126, 34, 206, 0.85), rgba(147, 51, 234, 0.75));
        box-shadow: 0 6px 20px rgba(126, 34, 206, 0.5);
        transform: translateY(-3px) scale(1.02);
    }

    .price-filter {
        background: rgba(15, 23, 42, 0.7);
        border-radius: 14px;
        padding: 18px;
        border: 1px solid rgba(147, 51, 234, 0.3);
        box-shadow: 0 2px 12px rgba(126, 34, 206, 0.1);
    }

    .price-range {
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 600;
    }

    .price-slider {
        height: 10px;
        border-radius: 5px;
        background: linear-gradient(to right, rgba(79, 17, 147, 0.8), rgba(126, 34, 206, 1));
    }

    .price-slider::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
        border: 3px solid rgba(255, 255, 255, 1);
        box-shadow: 0 3px 12px rgba(126, 34, 206, 0.7);
    }

    .current-price {
        text-align: center;
        font-size: 16px;
        font-weight: 700;
        color: #ffffff;
        margin-top: 10px;
        text-shadow: 0 1px 3px rgba(126, 34, 206, 0.3);
    }

    .section-title {
        margin: 25px 0 15px;
    }

    .section-title h2 {
        font-size: 18px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
        gap: clamp(12px, 1.5vw, 15px);
        margin-bottom: clamp(15px, 2vw, 25px);
    }

    .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .case-content {
        padding: clamp(10px, 1.2vw, 12px);
    }

    .case-card .case-card-title {
        font-size: clamp(13px, 1.8vw, 15px);
        min-height: clamp(30px, 3.5vw, 36px);
        max-height: clamp(36px, 4.5vw, 45px);
        margin-bottom: clamp(6px, 1vw, 10px);
    }

    .case-image {
        flex: 1;
        min-height: 0;
    }

    .case-price {
        padding: 5px 18px;
        margin-top: -12px;
    }

    .case-price span {
        font-size: 16px;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    }

    .featured-cases-grid .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .featured-cases-grid .case-image {
        flex: 1;
        min-height: 0;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 18px;
        min-height: 44px;
    }

    .featured-cases-grid .case-price span {
        font-size: 20px;
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 16px;
        min-height: 40px;
    }

    .classic-cases-grid .case-price span {
        font-size: 18px;
    }
}

/* Ensure classic cases are always readable on mobile */
@media (max-width: 768px) {
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .classic-cases-grid .case-image {
        flex: 1.3 !important;
        min-height: 0 !important;
        margin-bottom: 4px !important;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.1) !important;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 13px !important;
        line-height: 1.25 !important;
        min-height: 44px !important;
        white-space: normal !important;
        padding: 0 2px !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .classic-cases-grid .case-price {
        margin-top: 2px !important;
        padding: 4px 10px !important;
        gap: 6px !important;
    }

    .classic-cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.8 !important;
    }

    .classic-cases-grid .case-price span {
        font-size: clamp(13px, 4vw, 18px) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }

    .classic-cases-grid .favorite-heart svg {
        width: 16px !important;
        height: 16px !important;
    }
}

@media (max-width: 480px) {
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .classic-cases-grid .case-image {
        flex: 1.3 !important;
        min-height: 0 !important;
        margin-bottom: 4px !important;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.15) !important;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 12px !important;
        min-height: 40px !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
        padding: 0 2px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .classic-cases-grid .case-price {
        margin-top: 0 !important;
        padding: 3px 8px !important;
        gap: 6px !important;
    }

    .classic-cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.85 !important;
    }

    .classic-cases-grid .case-price span {
        font-size: clamp(12px, 4.6vw, 17px) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: calc(100% - 24px) !important;
    }

    .classic-cases-grid .favorite-heart svg {
        width: 15px !important;
        height: 15px !important;
    }
}

@media screen and (max-width: 320px) {
    .hero-banner {
        margin: 15px auto 10px;
        height: auto;
        min-height: 180px;
        padding: 0 6px;
        border-radius: 12px;
    }

    .banner-content {
        padding: 12px;
        gap: 12px;
    }

    .hero-center.hero-center-mobile>div {
        min-height: 180px;
        padding: 12px 0;
    }

    .bonus-card {
        min-height: 260px;
        padding: 20px 16px;
        margin-bottom: 18px;
    }

    .bonus-card .bonus-header h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .bonus-card .percentage {
        font-size: 1.8rem;
    }

    .bonus-card .code {
        font-size: 0.95rem;
        padding: 10px;
        margin-bottom: 15px;
    }

    .bonus-card .copy-btn {
        font-size: 0.95rem;
        padding: 10px 14px;
    }

    .lorem-block {
        min-height: 120px;
        padding: 14px 10px;
        font-size: 0.9rem;
    }

    .lorem-block h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .invite-friends-bonus {
        min-height: 280px;
        padding: 14px 10px;
        font-size: 0.85rem;
    }

    .invite-friends-bonus h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus ol {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .invite-steps {
        margin: 0 0 10px 0;
        padding: 0 0 0 14px;
        font-size: 0.75rem;
    }

    .cases-section {
        padding: 0 6px;
        margin-bottom: 18px;
    }

    .filters {
        padding: 12px 10px;
        gap: 12px;
        margin-bottom: 18px;
        border-radius: 12px;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.9), rgba(23, 19, 61, 0.85));
        box-shadow: 0 4px 20px rgba(126, 34, 206, 0.18);
    }

    .filters-row {
        flex-direction: column;
        gap: 16px;
    }

    .search-container {
        height: 44px;
        width: 100%;
        border-radius: 12px;
        border: 2px solid rgba(147, 51, 234, 0.4);
        background: rgba(15, 23, 42, 0.85);
        box-shadow: 0 0 0 1px rgba(147, 51, 234, 0.15) inset;
        transition: all 0.3s ease;
    }

    .search-container:focus-within {
        border-color: rgba(147, 51, 234, 0.8);
        box-shadow: 0 0 20px rgba(126, 34, 206, 0.4);
        transform: translateY(-1px);
    }

    .search {
        font-size: 14px;
        padding: 0 16px;
        height: 40px;
        border-radius: 10px;
        color: #ffffff;
        letter-spacing: 0.3px;
        font-weight: 500;
    }

    .search::placeholder {
        color: rgba(148, 163, 184, 0.8);
        font-size: 13px;
    }

    .search-container button {
        width: 44px;
        height: 40px;
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.7), rgba(126, 34, 206, 0.8));
        transition: all 0.3s ease;
    }

    .search-container button:hover {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.9), rgba(126, 34, 206, 1));
        transform: scale(1.05);
    }

    .filter-buttons {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        padding: 0 12px;
        height: 40px;
        font-size: 12px;
        border-radius: 12px;
        background: linear-gradient(135deg, rgba(79, 17, 147, 0.75), rgba(126, 34, 206, 0.65));
        border: 1px solid rgba(147, 51, 234, 0.5);
        color: #ffffff;
        font-weight: 700;
        letter-spacing: 0.3px;
        transition: all 0.3s ease;
        flex: 1;
        min-width: 90px;
        max-width: 120px;
        text-transform: uppercase;
        box-shadow: 0 2px 6px rgba(126, 34, 206, 0.15);
    }

    .filter-btn:hover,
    .filter-btn:active {
        background: linear-gradient(135deg, rgba(126, 34, 206, 0.85), rgba(147, 51, 234, 0.75));
        box-shadow: 0 4px 16px rgba(126, 34, 206, 0.5);
        transform: translateY(-2px) scale(1.02);
    }

    .price-filter {
        background: rgba(15, 23, 42, 0.7);
        border-radius: 12px;
        padding: 14px;
        border: 1px solid rgba(147, 51, 234, 0.3);
        box-shadow: 0 2px 10px rgba(126, 34, 206, 0.1);
    }

    .price-range {
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 600;
    }

    .price-slider {
        height: 8px;
        border-radius: 4px;
        background: linear-gradient(to right, rgba(79, 17, 147, 0.8), rgba(126, 34, 206, 1));
    }

    .price-slider::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
        border: 2px solid rgba(255, 255, 255, 1);
        box-shadow: 0 2px 10px rgba(126, 34, 206, 0.7);
    }

    .current-price {
        text-align: center;
        font-size: 14px;
        font-weight: 700;
        color: #ffffff;
        margin-top: 8px;
        text-shadow: 0 1px 2px rgba(126, 34, 206, 0.3);
    }

    .section-title {
        margin: 20px 0 12px;
    }

    .section-title h2 {
        font-size: 16px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
        gap: clamp(10px, 1.2vw, 12px);
        margin-bottom: clamp(15px, 2vw, 20px);
    }

    .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .case-content {
        padding: clamp(6px, 1vw, 8px);
    }

    .case-card .case-card-title {
        font-size: clamp(10px, 1.5vw, 11px);
        min-height: clamp(24px, 3vw, 28px);
        max-height: clamp(28px, 3.5vw, 35px);
        margin-bottom: clamp(4px, 0.8vw, 6px);
    }

    .case-image {
        flex: 1;
        min-height: 0;
        margin-bottom: -8px;
    }

    .case-price {
        padding: clamp(2px, 0.5vw, 3px) clamp(8px, 1.2vw, 10px);
        margin-top: -10px;
    }

    .case-price span {
        font-size: clamp(11px, 1.8vw, 12px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    }

    .featured-cases-grid .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .featured-cases-grid .case-image {
        flex: 1;
        min-height: 0;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: clamp(13px, 2vw, 15px);
        min-height: clamp(30px, 3.5vw, 36px);
        max-height: clamp(36px, 4.5vw, 45px);
    }

    .featured-cases-grid .case-price span {
        font-size: clamp(14px, 2.2vw, 16px);
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    }

    .classic-cases-grid .case-card {
        aspect-ratio: 1;
        height: auto;
    }

    .classic-cases-grid .case-image {
        flex: 1.25;
        min-height: 0;
        margin-bottom: -8px;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.1);
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: clamp(11px, 1.8vw, 12px);
        min-height: clamp(24px, 3vw, 28px);
        max-height: clamp(28px, 3.5vw, 35px);
        margin-bottom: clamp(4px, 0.8vw, 6px);
    }

    .classic-cases-grid .case-price {
        margin-top: -10px;
    }

    .classic-cases-grid .case-price span {
        font-size: clamp(12px, 2vw, 13px);
    }
}

/* Оптимізація для екранів менше 482×810 */
@media screen and (max-width: 482px) and (max-height: 810px) {

    /* Кнопки в мобільних сундуках - завжди в один ряд */
    .case-card .case-content .buttons-container,
    .case-content .buttons-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: 100%;
        justify-content: center;
        align-items: center;
        margin-top: 10px;
    }

    .case-card .case-content .buttons-container>*,
    .case-content .buttons-container>* {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        font-size: 12px !important;
        padding: 0 8px !important;
        height: 32px !important;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Специфічні стилі для кнопок в сундуках */
    .case-card #buy-case-button,
    .case-card #add-balance-button,
    .case-card #open-case-button,
    .case-content #buy-case-button,
    .case-content #add-balance-button,
    .case-content #open-case-button {
        font-size: 12px !important;
        padding: 0 8px !important;
        height: 32px !important;
        letter-spacing: 1px !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        width: auto !important;
    }

    .case-card {
        height: 300px;
    }

    .case-content {
        padding: 18px;
    }

    .case-card .case-card-title {
        font-size: 17px;
        min-height: 44px;
        margin-bottom: 14px;
    }

    .case-image {
        height: 180px;
        margin-bottom: 4px;
    }

    .case-price {
        padding: 8px 22px;
        margin-top: -18px;
    }

    .case-price span {
        font-size: 19px;
    }

    /* Оптимізація для featured cases */
    .featured-cases-grid .case-card {
        height: 260px;
    }

    .featured-cases-grid .case-image {
        height: 180px;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 22px;
        min-height: 52px;
    }

    .featured-cases-grid .case-price {
        margin-top: -20px;
    }

    .featured-cases-grid .case-price span {
        font-size: 24px;
    }

    /* Оптимізація для classic cases */
    .classic-cases-grid .case-card {
        height: 240px;
    }

    .classic-cases-grid .case-image {
        height: 140px;
        margin-bottom: -8px;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 16px;
        min-height: 40px;
        margin-bottom: 10px;
    }

    .classic-cases-grid .case-price {
        margin-top: -12px;
    }

    .classic-cases-grid .case-price span {
        font-size: 18px;
    }
}

/* Медиа-запрос для очень маленьких экранов (меньше 320px) */
@media screen and (max-width: 280px) {
    .hero-banner {
        margin: 12px auto 8px;
        height: auto;
        min-height: 140px;
        padding: 0 4px;
        border-radius: 10px;
    }

    .banner-content {
        padding: 8px;
        gap: 8px;
    }

    .hero-center.hero-center-mobile>div {
        min-height: 140px;
        padding: 8px 0;
    }

    .bonus-card {
        min-height: 220px;
        padding: 16px 12px;
        margin-bottom: 15px;
    }

    .bonus-card .bonus-header h3 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .bonus-card .percentage {
        font-size: 1.6rem;
    }

    .bonus-card .code {
        font-size: 0.9rem;
    }

    .bonus-card .copy-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
        height: 28px;
    }

    .lorem-block {
        min-height: 100px;
        padding: 12px;
        margin-bottom: 15px;
    }

    .lorem-block h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .invite-friends-bonus {
        min-height: 240px;
        padding: 12px;
        margin-bottom: 15px;
    }

    .invite-friends-bonus h3 {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .invite-friends-bonus p,
    .invite-friends-bonus a {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .invite-steps {
        gap: 8px;
        margin-top: 12px;
    }

    .cases-section {
        margin-top: 15px;
    }

    .filters {
        padding: 8px;
        margin-bottom: 15px;
        border-radius: 8px;
        gap: 8px;
    }

    .filters-row {
        gap: 8px;
        margin-bottom: 8px;
    }

    .search-container {
        height: 36px;
        border-radius: 6px;
    }

    .search-container:focus-within {
        border-color: #00ff88;
        box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
    }

    .search {
        font-size: 12px;
        padding: 0 8px;
    }

    .search::placeholder {
        font-size: 12px;
    }

    .search-container button {
        width: 36px;
        height: 36px;
    }

    .search-container button:hover {
        background-color: rgba(0, 255, 136, 0.1);
    }

    .filter-buttons {
        gap: 6px;
        flex-wrap: wrap;
    }

    .filter-btn {
        height: 32px;
        padding: 0 8px;
        font-size: 11px;
        border-radius: 6px;
        gap: 4px;
    }

    .filter-btn img {
        width: 14px;
        height: 14px;
    }

    .filter-btn:hover,
    .filter-btn:active {
        background-color: rgba(0, 255, 136, 0.15);
        transform: translateY(-1px);
    }

    .price-filter {
        margin-top: 8px;
        padding: 8px;
        border-radius: 6px;
    }

    .price-range {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .price-slider {
        height: 6px;
        border-radius: 3px;
    }

    .price-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
        border-radius: 50%;
    }

    .current-price {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 4px;
    }

    .section-title {
        margin: 20px 0 15px;
    }

    .section-title h2 {
        font-size: 16px;
    }

    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 10px;
        margin-bottom: 20px;
    }

    .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .case-content {
        padding: 10px;
    }

    .case-card .case-card-title {
        font-size: 12px;
        min-height: 32px;
        margin-bottom: 8px;
    }

    .case-image {
        height: auto;
        margin-bottom: -5px;
    }

    .case-price {
        padding: 4px 12px;
        margin-top: -8px;
    }

    .case-price span {
        font-size: 13px;
    }

    .featured-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .featured-cases-grid .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .featured-cases-grid .case-image {
        height: auto;
    }

    .featured-cases-grid .case-card .case-card-title {
        font-size: 15px;
        min-height: 40px;
    }

    .featured-cases-grid .case-price {
        margin-top: -12px;
    }

    .featured-cases-grid .case-price span {
        font-size: 16px;
    }

    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .classic-cases-grid .case-card {
        height: auto;
        aspect-ratio: 1;
    }

    .classic-cases-grid .case-image {
        height: auto;
        margin-bottom: -5px;
    }

    .classic-cases-grid .case-card .case-card-title {
        font-size: 13px;
        min-height: 32px;
        margin-bottom: 8px;
    }

    .classic-cases-grid .case-price {
        margin-top: -8px;
    }

    .classic-cases-grid .case-price span {
        font-size: 14px;
    }
}

/* Hero Banner Inline Styles */
.hero-banner {
    margin-top: 20px;
    position: relative;
    max-width: 1700px;
    width: 100%;
    padding: 0 20px;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.banner-content {
    display: flex;
    width: 100%;
    gap: 20px;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    min-height: 0;
    flex-wrap: wrap;
    flex-direction: row;
}

.hero-left-col {
    flex: 1;
    min-width: 320px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
}

.lorem-block {
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    padding: 16px 18px;
    color: #fff;
    max-width: 420px;
    margin: 0 auto 0 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    height: auto;
}

.lorem-block>div {
    position: relative;
    z-index: 2;
}

.lorem-block h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.lorem-block p {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

#bonus-balance-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #bbf7d0;
    font-size: 1.08rem;
    font-family: monospace;
    outline: none;
    padding: 0;
    border-radius: 0;
    min-width: 0;
    font-weight: 400;
    letter-spacing: 0;
    opacity: 0;
    position: absolute;
    left: -9999px;
}

#bonus-balance-text {
    color: #bbf7d0;
    font-size: 1.08rem;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 6px;
    display: block;
}

#bonus-copied {
    display: none;
    color: #22c55e;
    font-size: 0.9rem;
    margin-top: 3px;
}

.lorem-block span[style*="color:#bbf7d0"] {
    color: #bbf7d0;
    font-size: 1.18rem;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 8px;
    display: block;
    line-height: 1.4;
}

#bonus-card-img {
    position: absolute;
    right: -50px;
    bottom: -50px;
    height: 200px;
    width: auto;
    opacity: 0.19;
    z-index: 1;
    pointer-events: none;
    user-select: none;
}

.invite-friends-bonus {
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    padding: 28px 24px;
    color: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.invite-friends-bonus>div {
    position: relative;
    z-index: 2;
}

.invite-friends-bonus h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.invite-friends-bonus .invite-steps {
    font-size: 0.98rem;
    margin-bottom: 14px;
    color: #d1fae5;
}

#invite-link-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #bbf7d0;
    font-size: 1.06rem;
    font-family: monospace;
    font-weight: 700;
    outline: none;
    padding: 0;
    border-radius: 0;
    min-width: 0;
    opacity: 0;
    position: absolute;
    left: -9999px;
}

#invite-link-text {
    color: #bbf7d0;
    font-size: 1.06rem;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 8px;
    display: block;
}

.invite-friends-bonus p[style*="margin-top:10px"] {
    margin-top: 10px;
    font-size: 13px;
    color: #d1fae5;
}

#invite-card-img {
    position: absolute;
    right: -80px;
    bottom: -80px;
    height: 300px;
    width: auto;
    opacity: 0.21;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 8px 32px #0008);
}

.hero-center.hero-center-mobile {
    flex: 2;
    min-width: 340px;
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 20;
    height: 100%;
    min-height: 0;
}

#slider-banner {
    width: 100%;
    height: 100%;
    flex: 1;
    text-align: center;
    padding: 32px 0;
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    position: relative;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    z-index: 20;
    isolation: isolate;
}

#slider-content {
    position: relative;
    z-index: 3;
    min-height: 120px;
    max-width: 100%;
    box-sizing: border-box;
    will-change: transform, opacity;
    transform-origin: center center;
    backface-visibility: hidden;
}

#slider-dots {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    z-index: 3;
}

#slider-gradient {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    transition: background 0.3s ease;
}

.slider-arrows {
    display: flex;
    gap: 32px;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    z-index: 2;
}

#slider-arrow-left,
#slider-arrow-right {
    background: rgba(23, 19, 61, 0.7);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

#logo-slideshow {
    position: absolute;
    right: -190px;
    bottom: -60px;
    max-width: 720px;
    max-height: 520px;
    opacity: 0.22;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#logo-name-silver {
    position: absolute;
    right: 24px;
    bottom: 18px;
    max-width: 120px;
    height: auto;
    opacity: 1;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
}

.creator-promo-banner .banner-side-gradient {
    display: none !important;
    /* side gradients removed, using banner-gradient-layer on the right instead */
}

.creator-promo-banner .banner-side-gradient-left,
.creator-promo-banner .banner-side-gradient-right {
    display: none !important;
}

.hero-center img {
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .hero-banner {
        padding: 0 10px !important;
        margin: 20px auto !important;
    }

    .banner-content {
        flex-direction: column !important;
        gap: 20px !important;
        align-items: stretch !important;
        padding: 20px !important;
        margin-bottom: 40px !important;
    }

    .hero-left-col {
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
        gap: 16px !important;
        order: 2;
    }

    .hero-center.hero-center-mobile {
        flex: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        order: 1;
    }

    .hero-center.hero-center-mobile>div {
        padding: 16px 0 !important;
        min-height: 140px !important;
    }

    .lorem-block,
    .invite-friends-bonus {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 12px !important;
    }

    .lorem-block {
        padding: 20px 16px !important;
        font-size: 0.9rem !important;
        min-height: 140px !important;
        height: auto !important;
    }

    .invite-friends-bonus {
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
        min-height: 180px !important;
        overflow: hidden !important;
    }

    #logo-slideshow {
        right: -80px !important;
        bottom: -30px !important;
        max-width: 450px !important;
        max-height: 350px !important;
        opacity: 0.18 !important;
    }

    #logo-name-silver {
        right: 20px !important;
        bottom: 15px !important;
        max-width: 120px !important;
    }

    #bonus-card-img {
        right: -20px !important;
        bottom: -30px !important;
        height: 100px !important;
        opacity: 0.15 !important;
    }

    #invite-card-img {
        right: -40px !important;
        bottom: -50px !important;
        height: 150px !important;
        opacity: 0.18 !important;
    }

    .slider-arrows button {
        width: 36px !important;
        height: 36px !important;
    }

    .slider-arrows {
        bottom: 16px !important;
    }

    /* Tablet: make Creator banner compact and stop layout shifts */
    @media (max-width: 1024px) {
        .creator-promo-banner {
            margin: 10px 0 !important;
            padding: 8px 12px !important;
            border-radius: 12px !important;
            max-height: 84px !important;
            align-items: center !important;
            box-sizing: border-box !important;
        }

        .creator-promo-banner .banner-gradient-layer {
            width: 24% !important;
            opacity: 0.6 !important;
            border-top-right-radius: 12px !important;
            border-bottom-right-radius: 12px !important;
        }

        .creator-promo-banner .banner-content-inner {
            padding-right: 16px !important;
        }

        .creator-promo-banner .banner-text {
            font-size: 13px !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
    }

    #slider-dots {
        top: 12px !important;
    }

    .case-card-title {
        font-size: 1rem !important;
    }
}

@media (max-width: 600px) {
    .hero-banner {
        padding: 0 8px !important;
        margin: 15px auto !important;
    }

    .banner-content {
        padding: 16px !important;
        gap: 16px !important;
        margin-bottom: 10px !important;
    }

    .hero-center.hero-center-mobile>div {
        padding: 12px 0 !important;
        min-height: 120px !important;
    }

    .lorem-block {
        padding: 16px 12px !important;
        font-size: 0.9rem !important;
        min-height: 120px !important;
        height: auto !important;
    }

    .invite-friends-bonus {
        padding: 8px 6px !important;
        font-size: 0.75rem !important;
        min-height: 200px !important;
    }

    .lorem-block h3 {
        font-size: 0.95rem !important;
    }

    .invite-friends-bonus h3 {
        font-size: 1rem !important;
    }

    #bonus-card-img {
        height: 80px !important;
        right: -15px !important;
        bottom: -25px !important;
    }

    #invite-card-img {
        height: 120px !important;
        right: -30px !important;
        bottom: -40px !important;
    }

    .slider-arrows button {
        width: 32px !important;
        height: 32px !important;
    }

    .case-card-title {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        padding: 0 5px !important;
        margin: 12px auto !important;
    }

    .banner-content {
        padding: 12px !important;
        gap: 12px !important;
        margin-bottom: 8px !important;
    }

    .hero-center.hero-center-mobile>div {
        padding: 16px 0 !important;
        min-height: 180px !important;
    }

    .lorem-block,
    .invite-friends-bonus {
        padding: 12px 10px !important;
        font-size: 0.85rem !important;
    }

    .lorem-block {
        min-height: 120px !important;
        height: auto !important;
    }

    .invite-friends-bonus {
        min-height: 120px !important;
    }

    .lorem-block h3 {
        font-size: 0.9rem !important;
    }

    .invite-friends-bonus h3 {
        font-size: 0.95rem !important;
    }

    #logo-slideshow {
        right: -60px !important;
        bottom: -25px !important;
        max-width: 380px !important;
        max-height: 280px !important;
        opacity: 0.22 !important;
    }

    #logo-name-silver {
        right: 10px !important;
        bottom: 8px !important;
        max-width: 100px !important;
    }

    #bonus-card-img {
        height: 60px !important;
        right: -10px !important;
        bottom: -20px !important;
    }

    #invite-card-img {
        height: 90px !important;
        right: -20px !important;
        bottom: -30px !important;
    }

    .slider-arrows button {
        width: 28px !important;
        height: 28px !important;
    }

    .slider-arrows {
        bottom: 12px !important;
        gap: 20px !important;
    }

    #slider-dots {
        top: 8px !important;
        gap: 8px !important;
    }

    .cases-section {
        margin-top: 5px !important;
    }

    .filters {
        margin-top: 4px !important;
    }

    .beginners-cases-grid .case-image {
        height: 220px;
    }

    .beginners-cases-grid .case-image img {
        transform: translateY(-18px) scale(1.38) !important;
        max-height: 135% !important;
    }

    .beginners-cases .case-image {
        height: 220px;
    }

    .beginners-cases .case-image img {
        transform: translateY(-18px) scale(1.38) !important;
        max-height: 135% !important;
    }

    .beginners-cases .case-price {
        margin-top: -10px;
    }

    .cases-grid .case-image img {
        transform: scale(1.20) !important;
        max-height: 122% !important;
    }

    .featured-cases-grid .case-image img {
        transform: scale(1.24) !important;
        max-height: 127% !important;
    }

    .classic-cases-grid .case-image img {
        transform: scale(1.16) !important;
        max-height: 120% !important;
    }

    .featured-cases-grid .case-card .case-card-title {
        text-transform: none !important;
        letter-spacing: 0.02em;
    }
}

@media (max-width: 500px) {
    .hero-banner {
        padding: 0 8px !important;
        margin: 15px auto !important;
    }

    .banner-content {
        padding: 16px !important;
        gap: 16px !important;
        margin-bottom: 8px !important;
    }

    .hero-left-col {
        gap: 20px !important;
    }

    .lorem-block {
        min-height: 160px !important;
        padding: 24px 20px !important;
        font-size: 0.9rem !important;
    }

    .invite-friends-bonus {
        min-height: 280px !important;
        padding: 35px 25px !important;
        font-size: 0.95rem !important;
    }

    .lorem-block h3 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }

    .lorem-block p {
        font-size: 0.9rem !important;
        margin-bottom: 14px !important;
    }

    .invite-friends-bonus h3 {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
    }

    .invite-friends-bonus p {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
    }

    .invite-steps {
        font-size: 0.9rem !important;
        margin-bottom: 16px !important;
    }

    .invite-steps li {
        margin-bottom: 6px !important;
    }

    #bonus-card-img {
        height: 120px !important;
        right: -30px !important;
        bottom: -40px !important;
        opacity: 0.2 !important;
    }

    #invite-card-img {
        height: 280px !important;
        right: -90px !important;
        bottom: -100px !important;
        opacity: 0.25 !important;
    }

    .cases-section {
        margin-top: 5px !important;
    }

    .filters {
        margin-top: 3px !important;
    }

    .search-container {
        margin-bottom: 20px !important;
    }
}

/* Reduce slider font size when side banner is expanded on PC */
#creator-promo-banner:not(.banner-closing):not([style*="display: none"])~#slider-banner #slider-content h1 {
    font-size: 1.8rem !important;
}

#creator-promo-banner:not(.banner-closing):not([style*="display: none"])~#slider-banner #slider-content p {
    font-size: 1rem !important;
}

@media (min-width: 1025px) and (max-width: 1300px) {
    #slider-content h1 {
        font-size: 1.9rem !important;
    }

    #slider-content p {
        font-size: 1rem !important;
    }
}

@media (max-width: 1024px) {
    #slider-banner {
        height: 100% !important;
        min-height: 550px !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    #slider-content {
        min-height: 400px !important;
        max-height: none !important;
        height: 100% !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
    }

    .hero-center.hero-center-mobile {
        height: 100% !important;
        min-height: 550px !important;
        max-height: none !important;
    }

    .hero-center.hero-center-mobile>div {
        height: 100% !important;
        min-height: 550px !important;
        max-height: none !important;
        padding: 16px 16px !important;
    }
}

@media (max-width: 768px) {
    #slider-banner {
        height: 100% !important;
        min-height: 500px !important;
        max-height: none !important;
    }

    #slider-content {
        min-height: 400px !important;
        max-height: none !important;
        height: 100% !important;
    }

    .hero-center.hero-center-mobile {
        height: 100% !important;
        min-height: 500px !important;
        max-height: none !important;
    }

    .hero-center.hero-center-mobile>div {
        height: 100% !important;
        min-height: 500px !important;
        max-height: none !important;
    }
}

@media (max-width: 480px) {
    #slider-banner {
        height: 100% !important;
        min-height: 460px !important;
        max-height: none !important;
    }

    #slider-content {
        min-height: 360px !important;
        max-height: none !important;
        height: 100% !important;
    }

    .hero-center.hero-center-mobile {
        height: 100% !important;
        min-height: 460px !important;
        max-height: none !important;
    }

    .hero-center.hero-center-mobile>div {
        height: 100% !important;
        min-height: 460px !important;
        max-height: none !important;
    }
}

/* Adjust classic cases price position around ~600x800 and similar portrait ranges */
@media screen and (min-width: 560px) and (max-width: 820px) {
    .classic-cases-grid .case-price {
        margin-top: -20px !important;
    }
}

/* Narrow portrait window like 600x800: tighten image and lift price */
@media screen and (min-width: 560px) and (max-width: 680px) and (min-height: 760px) and (orientation: portrait) {
    .classic-cases-grid .case-image {
        height: 150px !important;
    }

    .classic-cases-grid .case-price {
        margin-top: -16px !important;
    }
}

@media screen and (max-width: 800px) and (max-height: 420px) and (orientation: landscape) {
    .featured-cases-grid .case-image {
        height: 160px !important;
    }

    .featured-cases-grid .case-image img {
        transform: none !important;
        max-height: 100% !important;
    }

    .featured-cases-grid .case-price {
        margin-top: -10px !important;
    }

    .beginners-cases .case-image,
    .beginners-cases-grid .case-image {
        height: 150px !important;
    }

    .beginners-cases .case-image img,
    .beginners-cases-grid .case-image img {
        transform: none !important;
        max-height: 100% !important;
    }

    .beginners-cases .case-price,
    .beginners-cases-grid .case-price {
        margin-top: -8px !important;
    }

    .classic-cases-grid .case-image {
        height: 150px !important;
    }

    .classic-cases-grid .case-image img {
        transform: none !important;
        max-height: 100% !important;
    }

    .classic-cases-grid .case-price {
        margin-top: -25px !important;
    }
}

/* Mobile bottom search bar */
.mobile-search-bar {
    --mobile-search-keyboard-offset: 0px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 600px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px + var(--mobile-search-keyboard-offset));
    display: none;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
    border: 1px solid rgba(147, 51, 234, 0.35);
    border-radius: 20px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(147, 51, 234, 0.15);
    z-index: 50;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    padding: 4px;
}

.mobile-search-bar.mobile-search-bar--footer-hidden {
    transform: translateX(-50%) translateY(200%);
    opacity: 0;
    pointer-events: none;
}

.mobile-search-bar.mobile-search-bar--footer-hidden .mobile-scroll-top {
    opacity: 0;
    pointer-events: none;
}

.mobile-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 56px 10px 10px;
    border-radius: 18px;
}

.mobile-search-bar.input-active {
    z-index: 10010;
}

.mobile-search-keyboard-open .mobile-search-bar,
body.mobile-search-keyboard-open .mobile-search-bar {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px) + var(--mobile-search-keyboard-offset));
}

.mobile-search-bar.input-active .mobile-search-inner {
    display: block;
    width: 100%;
    min-width: 0;
    padding-right: 12px;
}

.mobile-search-bar.input-active .search-mode-toggle {
    display: none !important;
}

.mobile-search-bar.input-active #mobileSelectedSkinsContainer,
.mobile-search-bar.input-active .mobile-filter-row {
    display: none !important;
}

.mobile-search-bar.input-active .search-mode-row {
    display: block;
    width: 100%;
    gap: 0;
}

.mobile-search-bar.input-active .search-mode-panel {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    max-width: 100% !important;
}

.mobile-search-bar.input-active .mobile-skin-search-row,
.mobile-search-bar.input-active .mobile-case-search-row,
.mobile-search-bar.input-active .mobile-author-search-row {
    display: grid;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.mobile-search-bar.input-active .mobile-skin-search-row {
    grid-template-columns: 88px minmax(0, 1fr);
}

.mobile-search-bar.input-active .mobile-case-search-row,
.mobile-search-bar.input-active .mobile-author-search-row {
    grid-template-columns: minmax(0, 1fr);
}

.mobile-search-bar.input-active .mobile-skin-name-input-wrap,
.mobile-search-bar.input-active .mobile-skin-name-input-wrap.case-search-wrap,
.mobile-search-bar.input-active .mobile-skin-name-input-wrap.author-search-wrap {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
}

.mobile-search-bar.input-active .mobile-skin-type-select-wrap {
    flex: 0 0 88px;
    min-width: 88px;
    max-width: 88px;
}

.mobile-search-bar.input-active .mobile-skin-type-select-wrap .skin-type-selected {
    padding: 0 28px 0 10px;
    font-size: 12px;
}

.mobile-search-keyboard-open .mobile-search-bar .mobile-scroll-top,
body.mobile-search-keyboard-open .mobile-search-bar .mobile-scroll-top {
    opacity: 0 !important;
    pointer-events: none !important;
}

.mobile-filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 10px 12px 10px;
}

.mobile-filter-row .filter-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: space-between !important;
    width: 100% !important;
    overflow: visible !important;
}

.mobile-filter-row .filter-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    max-height: 34px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    background: linear-gradient(135deg, rgba(126, 34, 206, 0.35), rgba(147, 51, 234, 0.45)) !important;
    border: 1px solid rgba(147, 51, 234, 0.4) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

.mobile-filter-row .filter-btn svg {
    width: 13px !important;
    height: 13px !important;
    flex-shrink: 0 !important;
}

.mobile-filter-row .filter-btn span {
    font-size: 10px !important;
    font-weight: 600 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
}

.mobile-filter-row .filter-btn:hover,
.mobile-filter-row .filter-btn:active {
    background: linear-gradient(135deg, rgba(126, 34, 206, 0.5), rgba(147, 51, 234, 0.6)) !important;
    transform: translateY(-1px) !important;
}

.mobile-filter-row .filter-btn.clear {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.5), rgba(100, 116, 139, 0.6)) !important;
    border-color: rgba(100, 116, 139, 0.5) !important;
}

.mobile-filter-row .filter-btn.clear:hover,
.mobile-filter-row .filter-btn.clear:active {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.65), rgba(100, 116, 139, 0.75)) !important;
}

.mobile-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(147, 51, 234, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-search-input-wrap .search {
    flex: 1;
    height: 36px;
    background: transparent;
    border: none;
    outline: none;
    color: #e2e8f0;
    font-size: 15px;
}

.mobile-skin-name-input-wrap,
.mobile-skin-name-input-wrap input,
#mobile-skin-search-dropdown,
#mobile-skin-search-dropdown .search-dropdown-item {
    pointer-events: auto !important;
}

.mobile-skin-name-input-wrap {
    position: relative;
    z-index: 2;
    isolation: isolate;
    touch-action: manipulation;
}

.mobile-skin-name-input-wrap input {
    touch-action: manipulation;
}

#mobile-skin-search-dropdown {
    touch-action: pan-y;
}

#mobile-skin-search-dropdown .search-dropdown-item {
    touch-action: manipulation;
}

.mobile-search-icon {
    flex-shrink: 0;
}

.mobile-clear {
    background: transparent;
    border: none;
    padding: 4px;
    margin: 0;
    display: none;
    cursor: pointer;
}

.mobile-current-price {
    color: #e2e8f0;
    font-size: 13px;
    opacity: 0.85;
    min-width: 70px;
    text-align: right;
}

.mobile-safe-area {
    height: env(safe-area-inset-bottom, 0);
}

.mobile-scroll-top {
    position: absolute;
    right: 10px;
    top: 10px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(126, 34, 206, 0.35));
    border: 1px solid rgba(147, 51, 234, 0.45);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(126, 34, 206, 0.25);
}

.mobile-scroll-top:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.35), rgba(126, 34, 206, 0.45));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(126, 34, 206, 0.35);
}

.mobile-scroll-top:active {
    transform: translateY(0);
}

/* Collapsed state for mobile bottom search bar */
.mobile-search-bar.collapsed .mobile-filter-row,
.mobile-search-bar.collapsed .mobile-search-inner,
.mobile-search-bar.collapsed #search-dropdown-mobile,
.mobile-search-bar.collapsed .mobile-safe-area {
    display: none !important;
}

.mobile-search-bar.collapsed {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translateX(-50%) translateY(200%);
}

.mobile-search-bar.collapsed .mobile-scroll-top {
    position: fixed;
    right: 12px;
    bottom: 12px;
    top: auto;
}

/* Hide arrow button when near footer */
.mobile-search-bar[style*="translateY(100%)"] .mobile-scroll-top {
    opacity: 0;
    pointer-events: none;
}

/* Bonus Card and Invite Friend Blocks Animation */
#bonus-block,
#invite-block,
#creator-promo-banner,
.earn-stats-mobile {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.3s ease, border 0.3s ease;
    overflow: hidden;
    border: 2px solid transparent;
}

#bonus-block:hover,
#invite-block:hover,
#creator-promo-banner:hover,
.earn-stats-mobile:hover {
    box-shadow: 0 8px 20px rgba(107, 42, 163, 0.25);
    border: 2px solid rgba(147, 51, 234, 0.5);
}

#bonus-block:active,
#invite-block:active,
#creator-promo-banner:active,
.earn-stats-mobile:active {
    transform: scale(0.97);
}

#bonus-block::before,
#invite-block::before,
.earn-stats-mobile::before {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(107, 42, 163, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
}

#bonus-block:hover::before,
#invite-block:hover::before,
.earn-stats-mobile:hover::before {
    opacity: 1;
    transform: translateY(0);
}

#bonus-block::after,
#invite-block::after,
.earn-stats-mobile::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    border-radius: 50%;
}

#bonus-block:active::after,
#invite-block:active::after,
#creator-promo-banner:active::after,
.earn-stats-mobile:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0.3;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.mobile-search-bar .search-dropdown.mobile {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 56px;
    background: rgba(2, 6, 23, 0.95);
    border: 1px solid rgba(147, 51, 234, 0.25);
    border-radius: 12px;
    box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.35);
    display: none;
    max-height: 40vh;
    overflow: auto;
    z-index: 51;
}

.mobile-price-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-price-filter .price-slider {
    flex: 1;
}

.mobile-current-price-inline {
    color: #e2e8f0;
    font-weight: 700;
    min-width: 72px;
    text-align: right;
}

@media (max-width: 768px),
screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px),
screen and (max-width: 1024px) and (max-height: 480px) {

    .cases-section .filters {
        display: flex !important;
    }

    .filters .search-container,
    .filters .filters-row {
        display: none;
    }

    .mobile-search-bar {
        display: block;
    }

    /* Bottom spacer only for pages with .cases-section (home page) */
    .cases-section~.bottom-spacer {
        height: 74px;
    }
}

@media (max-width: 480px) {

    /* Bottom spacer only for pages with .cases-section (home page) */
    .cases-section~.bottom-spacer {
        height: 82px;
    }
}

/* Position promo popups above mobile bottom bar */
@media (max-width: 768px),
screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px),
screen and (max-width: 1024px) and (max-height: 480px) {
    .promo-popups {
        top: auto !important;
        bottom: var(--popup-bottom-offset, 84px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
}

@media (max-width: 480px) {
    .promo-popups {
        bottom: var(--popup-bottom-offset, 92px) !important;
    }
}

/* Mobile price fit and underline visibility across all grids */
@media (max-width: 768px),
screen and (max-width: 1024px) and (orientation: landscape) and (max-height: 600px),
screen and (max-width: 1024px) and (max-height: 480px) {
    .cases-grid .case-price {
        padding: 4px 12px !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .cases-grid .case-price span {
        font-size: clamp(14px, 4.2vw, 20px) !important;
        line-height: 1.1 !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.85 !important;
    }

    .cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Force 3 columns on tablet width to avoid 2-in-row issue */
@media screen and (min-width: 769px) and (max-width: 991px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5,
    .featured-cases-grid,
    .classic-cases-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .cases-grid .case-card,
    .featured-cases-grid .case-card,
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .cases-grid .case-image,
    .featured-cases-grid .case-image,
    .classic-cases-grid .case-image {
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Narrow desktop: enforce 3/4 columns for ordinary/classic cases */
@media screen and (min-width: 992px) and (max-width: 1025px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .beginners-cases-grid,
    .beginners-cases-grid.cases-grid-cols-4,
    .beginners-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .classic-cases-grid,
    .classic-cases-grid.cases-grid-cols-4,
    .classic-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .beginners-cases-grid .case-card,
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Portrait tablets and large phones: classic cases 3 columns between 600–710px */
@media screen and (min-width: 600px) and (max-width: 710px) {
    .classic-cases-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

@media (max-width: 480px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(10px, 1.5vw, 15px) !important;
        grid-auto-flow: row !important;
    }

    .featured-cases-grid,
    .featured-cases-grid.cases-grid-cols-4,
    .featured-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(10px, 1.5vw, 15px) !important;
        grid-auto-flow: row !important;
    }

    .classic-cases-grid,
    .classic-cases-grid.cases-grid-cols-4,
    .classic-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(10px, 1.5vw, 15px) !important;
        grid-auto-flow: row !important;
    }

    .beginners-cases-grid,
    .beginners-cases-grid.cases-grid-cols-4,
    .beginners-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: clamp(10px, 1.5vw, 15px) !important;
        grid-auto-flow: row !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .cases-grid .case-card,
    .featured-cases-grid .case-card,
    .classic-cases-grid .case-card,
    .beginners-cases-grid .case-card {
        min-width: 0 !important;
        width: 100% !important;
        grid-column: auto !important;
        aspect-ratio: 1 !important;
        height: auto !important;
    }

    .cases-grid .case-price {
        padding: 3px 10px !important;
        gap: 6px !important;
    }

    .cases-grid .case-price span {
        font-size: clamp(12px, 4.6vw, 18px) !important;
        line-height: 1.05 !important;
    }

    .cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.9 !important;
    }

    .cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

@media (min-width: 995px) and (max-width: 1025px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5,
    .featured-cases-grid,
    .classic-cases-grid,
    .beginners-cases-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 15px !important;
    }

    .cases-grid .case-card,
    .featured-cases-grid .case-card,
    .classic-cases-grid .case-card,
    .beginners-cases-grid .case-card {
        aspect-ratio: 1 !important;
        min-height: 0 !important;
        height: auto !important;
    }
}

/* Skin Search Styles */
.skin-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filters>.selected-skins {
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    flex: 0 0 auto;
    align-self: center;
}

.skin-type-select-wrap {
    position: relative;
    min-width: 180px;
    display: flex;
    align-items: center;
}

.skin-type-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Trigger styled like Search Skin input */
.skin-type-selected {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.70), rgba(24, 20, 62, 0.65));
    color: #fff;
    padding: 0 48px 0 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skin-type-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skin-type-selected:focus,
.skin-type-selected.open {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(107, 42, 163, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 42, 163, 0.2);
}

.skin-type-selected .arrow {
    display: block;
    position: absolute;
    right: 14px;
    top: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    margin: auto 0;
    color: rgba(226, 232, 240, 0.96);
    pointer-events: none;
    flex-shrink: 0;
    transform-origin: center center;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.skin-type-selected.open .arrow {
    transform: rotate(180deg);
}

/* Skin Type dropdown uses same styles as .search-dropdown */
.skin-type-select-wrap .skin-type-dropdown {
    top: 100%;
    margin-top: -1px;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    z-index: 2000;
}

.skin-name-input-wrap {
    position: relative;
    flex: 1;
    min-width: 300px;
    display: flex;
    gap: 8px;
}

.skin-name-input-wrap input {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.70), rgba(24, 20, 62, 0.65));
    color: #fff;
    padding: 0 12px 0 40px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.skin-name-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.skin-name-input-wrap input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skin-name-input-wrap input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(107, 42, 163, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 42, 163, 0.2);
}

.skin-name-input-wrap.open input,
.mobile-skin-name-input-wrap.open input {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    z-index: 2001;
}

.skin-name-input-wrap button {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
    border: 1.5px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.skin-name-input-wrap button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.skin-name-input-wrap button:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.35));
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.skin-name-input-wrap button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.skin-name-input-wrap button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    margin-top: -1px;
    left: 0;
    right: 0;
    background: rgba(20, 17, 45, 0.98);
    border: 1.5px solid rgba(147, 51, 234, 0.4);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 420px;
    overflow-y: auto;
    z-index: 2000;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(107, 42, 163, 0.2);
    display: none;
}

/* Force upward opening ONLY on mobile (iOS Safari compatible) */
/* Desktop opens downward normally */
@media (max-width: 1024px) {

    #skin-search-dropdown,
    #mobile-skin-search-dropdown {
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        border-top: 1.5px solid rgba(147, 51, 234, 0.4);
        border-bottom: none;
        border-radius: 12px 12px 0 0;
        z-index: 10000 !important;
    }
}

/* Desktop: skin search dropdown opens downward */
@media (min-width: 1025px) {
    #skin-search-dropdown {
        top: 100% !important;
        bottom: auto !important;
        border-top: none;
        border-bottom: 1.5px solid rgba(147, 51, 234, 0.4);
        border-radius: 0 0 12px 12px;
        z-index: 2000;
    }
}

/* Prevent clipping by parent containers on mobile */
.skin-name-input-wrap,
.mobile-skin-name-input-wrap,
.mobile-search-inner {
    overflow: visible !important;
}

.search-dropdown.show,
.search-dropdown[style*="display: block"] {
    display: block !important;
}

.search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 4px 0;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(107, 42, 163, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(107, 42, 163, 0.2);
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 42, 163, 0.6);
}

.search-dropdown-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: none;
    transition: all 0.2s ease;
    background: transparent;
    color: #e2e8f0;
    /* Ensure text color matches */
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: rgba(126, 34, 206, 0.3);
}

.search-dropdown-item.skin-item:hover {
    background: linear-gradient(90deg, rgba(107, 42, 163, 0.2), rgba(107, 42, 163, 0.1));
}

.search-dropdown-item img {
    width: 72px;
    height: 54px;
    margin-right: 14px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.search-dropdown-item span {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.selected-skins {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    align-items: center;
}

.selected-skins:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.selected-skin-badge {
    display: flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.2);
    border: none;
    border-radius: 20px;
    padding: 0 16px 0 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    height: 44px;
    min-height: 44px;
}

/* Rarity-specific styles for selected skin badges */
.selected-skin-badge.chip-rarity-Red {
    background: rgba(235, 75, 75, 0.25) !important;
    box-shadow: 0 2px 8px rgba(235, 75, 75, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Pink {
    background: rgba(211, 44, 230, 0.25) !important;
    box-shadow: 0 2px 8px rgba(211, 44, 230, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Purple {
    background: rgba(136, 71, 255, 0.25) !important;
    box-shadow: 0 2px 8px rgba(136, 71, 255, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Blue {
    background: rgba(75, 105, 255, 0.25) !important;
    box-shadow: 0 2px 8px rgba(75, 105, 255, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Gold {
    background: rgba(228, 174, 57, 0.25) !important;
    box-shadow: 0 2px 8px rgba(228, 174, 57, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Light-Blue {
    background: rgba(94, 152, 217, 0.25) !important;
    box-shadow: 0 2px 8px rgba(94, 152, 217, 0.35) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-White {
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2) !important;
    border: none !important;
}

.selected-skin-badge.chip-rarity-Grey,
.selected-skin-badge.chip-rarity-Gray {
    background: rgba(176, 195, 217, 0.2) !important;
    box-shadow: 0 2px 8px rgba(176, 195, 217, 0.25) !important;
    border: none !important;
}

.selected-skin-badge:hover {
    background: rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

/* Rarity hover states */
.selected-skin-badge.chip-rarity-Red:hover {
    background: rgba(235, 75, 75, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Pink:hover {
    background: rgba(211, 44, 230, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Purple:hover {
    background: rgba(136, 71, 255, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Blue:hover {
    background: rgba(75, 105, 255, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Gold:hover {
    background: rgba(228, 174, 57, 0.35) !important;
}

.selected-skin-badge.chip-rarity-Light-Blue:hover {
    background: rgba(94, 152, 217, 0.35) !important;
}

.selected-skin-badge.chip-rarity-White:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.selected-skin-badge.chip-rarity-Grey:hover,
.selected-skin-badge.chip-rarity-Gray:hover {
    background: rgba(176, 195, 217, 0.3) !important;
}

.selected-skin-badge img {
    width: 44px;
    height: 32px;
    margin-right: 10px;
    object-fit: contain;
    background: transparent;
    border: none;
    padding: 0;
}

.selected-skin-badge span {
    color: #fff;
    font-size: 13px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-skin-badge button {
    margin-left: 8px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 6px;
    font-size: 20px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.selected-skin-badge button:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Custom Case Author Badge Container */
.case-author-badge-container {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 2;
}

/* Custom Case Author Avatar */
.case-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.case-card[class*="custom-case-gradient-"] .case-author-avatar {
    border-color: rgba(var(--main-color), 0.6);
    box-shadow: 0 2px 8px rgba(var(--main-color), 0.4);
}

.case-card[class*="custom-case-gradient-"]:hover .case-author-avatar {
    border-color: var(--hex-color);
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.6);
    transform: scale(1.1);
}

/* Custom Case Open Count Badge */
.case-opens-badge {
    position: relative;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #7c3aed;
    /* Default purple, will be overridden by gradient class */
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    pointer-events: none;
}

/* Use case color for badge */
.case-card[class*="custom-case-gradient-"] .case-opens-badge {
    background: var(--hex-color) !important;
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.5);
}

.case-card[class*="custom-case-gradient-"]:hover .case-opens-badge {
    box-shadow: 0 6px 16px rgba(var(--main-color), 0.7);
    transform: scale(1.05);
}

/* Use case color for price underline */
.case-card[class*="custom-case-gradient-"] .case-price::before {
    background: linear-gradient(90deg, transparent 0%, var(--hex-color) 40%, var(--hex-color) 60%, transparent 100%) !important;
    opacity: 0.8;
    filter: blur(1px);
}

.case-opens-badge svg {
    width: 14px;
    height: 14px;
    opacity: 1;
}

.case-opens-badge .case-opens-badge-icon {
    width: 14px;
    height: 9px;
    display: block;
}

/* Custom Case Hover - uses variables from case_gradients.css */
.case-card[class*="custom-case-gradient-"]:hover {
    transform: perspective(800px) rotateX(5deg) translateY(-10px) scale(1.03);
    border-color: var(--hex-color) !important;
    box-shadow: 0 15px 30px rgba(var(--main-color), 0.5), 0 0 20px rgba(var(--main-color), 0.7) inset;
    z-index: 3;
}

.case-card[class*="custom-case-gradient-"]:hover .case-image img {
    transform: translateY(-15px) scale(1.15);
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.6));
}

/* Additional responsive optimizations for all screen sizes */
@media (min-width: 1920px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        gap: clamp(25px, 2vw, 35px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 2560px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
        gap: clamp(30px, 2.5vw, 40px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 320px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
        gap: clamp(8px, 1vw, 12px);
    }

    .featured-cases-grid,
    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    }

    .case-content {
        padding: clamp(5px, 1vw, 8px);
    }

    .case-card .case-card-title {
        font-size: clamp(9px, 1.2vw, 11px);
        min-height: clamp(20px, 2.5vw, 24px);
        max-height: clamp(24px, 3vw, 28px);
    }

    .case-price span {
        font-size: clamp(10px, 1.5vw, 12px);
    }
}

@media screen and (max-width: 482px) {

    /* Responsive fix for case price line on very small screens */
    .cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.85 !important;
    }

    .cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Force 3 columns on tablet width to avoid 2-in-row issue */
@media screen and (min-width: 769px) and (max-width: 991px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5,
    .featured-cases-grid,
    .classic-cases-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .cases-grid .case-card,
    .featured-cases-grid .case-card,
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .cases-grid .case-image,
    .featured-cases-grid .case-image,
    .classic-cases-grid .case-image {
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Narrow desktop: enforce 3/4 columns for ordinary/classic cases */
@media screen and (min-width: 992px) and (max-width: 1025px) {

    .cases-grid,
    .cases-grid.cases-grid-cols-4,
    .cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .beginners-cases-grid,
    .beginners-cases-grid.cases-grid-cols-4,
    .beginners-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .classic-cases-grid,
    .classic-cases-grid.cases-grid-cols-4,
    .classic-cases-grid.cases-grid-cols-5 {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .beginners-cases-grid .case-card,
    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Portrait tablets and large phones: classic cases 3 columns between 600–710px */
@media screen and (min-width: 600px) and (max-width: 710px) {
    .classic-cases-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .classic-cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

@media (max-width: 480px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(10px, 1.5vw, 15px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .classic-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-grid .case-price {
        padding: 3px 10px !important;
        gap: 6px !important;
    }

    .cases-grid .case-price span {
        font-size: clamp(12px, 4.6vw, 18px) !important;
        line-height: 1.05 !important;
    }

    .cases-grid .case-price::before {
        top: auto !important;
        bottom: 0 !important;
        width: 98% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0.9 !important;
    }

    .cases-grid .case-card {
        aspect-ratio: 1 !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* Skin Search Styles */
.skin-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filters>.selected-skins {
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    flex: 0 0 auto;
    align-self: center;
}

.skin-type-select-wrap {
    position: relative;
    min-width: 180px;
    display: flex;
    align-items: center;
}

.skin-type-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Trigger styled like Search Skin input */
.skin-type-selected {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.70), rgba(24, 20, 62, 0.65));
    color: #fff;
    padding: 0 48px 0 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.skin-type-selected:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skin-type-selected:focus,
.skin-type-selected.open {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(107, 42, 163, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 42, 163, 0.2);
}

.skin-type-selected .arrow {
    display: block;
    position: absolute;
    right: 14px;
    top: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    margin: auto 0;
    color: rgba(226, 232, 240, 0.96);
    pointer-events: none;
    flex-shrink: 0;
    transform-origin: center center;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.skin-type-selected.open .arrow {
    transform: rotate(180deg);
}

/* Skin Type dropdown uses same styles as .search-dropdown */
.skin-type-select-wrap .skin-type-dropdown {
    top: 100%;
    margin-top: -1px;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    z-index: 2000;
}

.skin-name-input-wrap {
    position: relative;
    flex: 1;
    min-width: 300px;
    display: flex;
    gap: 8px;
}

.skin-name-input-wrap input {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.70), rgba(24, 20, 62, 0.65));
    color: #fff;
    padding: 0 12px 0 40px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.skin-name-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.skin-name-input-wrap input:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.skin-name-input-wrap input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(107, 42, 163, 0.5);
    box-shadow: 0 0 0 3px rgba(107, 42, 163, 0.2);
}

.skin-name-input-wrap.open input,
.mobile-skin-name-input-wrap.open input {
    border-radius: 12px 12px 0 0;
    border-bottom-color: transparent;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(147, 51, 234, 0.4);
    z-index: 2001;
}

.skin-name-input-wrap button {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
    border: 1.5px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.skin-name-input-wrap button svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.skin-name-input-wrap button:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.35));
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.skin-name-input-wrap button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.skin-name-input-wrap button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    margin-top: -1px;
    left: 0;
    right: 0;
    background: rgba(20, 17, 45, 0.98);
    border: 1.5px solid rgba(147, 51, 234, 0.4);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 420px;
    overflow-y: auto;
    z-index: 2000;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(107, 42, 163, 0.2);
    display: none;
}

/* Force upward opening ONLY on mobile (iOS Safari compatible) */
/* Desktop opens downward normally */
@media (max-width: 1024px) {

    #skin-search-dropdown,
    #mobile-skin-search-dropdown {
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        border-top: 1.5px solid rgba(147, 51, 234, 0.4);
        border-bottom: none;
        border-radius: 12px 12px 0 0;
        z-index: 10000 !important;
    }
}

/* Desktop: skin search dropdown opens downward */
@media (min-width: 1025px) {
    #skin-search-dropdown {
        top: 100% !important;
        bottom: auto !important;
        border-top: none;
        border-bottom: 1.5px solid rgba(147, 51, 234, 0.4);
        border-radius: 0 0 12px 12px;
        z-index: 2000;
    }
}

/* Prevent clipping by parent containers on mobile */
.skin-name-input-wrap,
.mobile-skin-name-input-wrap,
.mobile-search-inner {
    overflow: visible !important;
}

.search-dropdown.show,
.search-dropdown[style*="display: block"] {
    display: block !important;
}

.search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin: 4px 0;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(107, 42, 163, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(107, 42, 163, 0.2);
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 42, 163, 0.6);
}

.search-dropdown-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: none;
    transition: all 0.2s ease;
    background: transparent;
    color: #e2e8f0;
    /* Ensure text color matches */
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover {
    background: rgba(126, 34, 206, 0.3);
}

.search-dropdown-item.skin-item:hover {
    background: linear-gradient(90deg, rgba(107, 42, 163, 0.2), rgba(107, 42, 163, 0.1));
}

.search-dropdown-item img {
    width: 72px;
    height: 54px;
    margin-right: 14px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.search-dropdown-item span {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.selected-skins {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    align-items: center;
}

.selected-skin-badge {
    display: flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.2);
    border: none;
    border-radius: 20px;
    padding: 0 16px 0 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    height: 44px;
    min-height: 44px;
}

.selected-skin-badge:hover {
    background: rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.selected-skin-badge img {
    width: 44px;
    height: 32px;
    margin-right: 10px;
    object-fit: contain;
    background: transparent;
    border: none;
    padding: 0;
}

.selected-skin-badge span {
    color: #fff;
    font-size: 13px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-skin-badge button {
    margin-left: 8px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 6px;
    font-size: 20px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.selected-skin-badge button:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Custom Case Author Badge Container */
.case-author-badge-container {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 2;
}

/* Custom Case Author Avatar */
.case-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.case-card[class*="custom-case-gradient-"] .case-author-avatar {
    border-color: rgba(var(--main-color), 0.6);
    box-shadow: 0 2px 8px rgba(var(--main-color), 0.4);
}

.case-card[class*="custom-case-gradient-"]:hover .case-author-avatar {
    border-color: var(--hex-color);
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.6);
    transform: scale(1.1);
}

/* Custom Case Open Count Badge */
.case-opens-badge {
    position: relative;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #7c3aed;
    /* Default purple, will be overridden by gradient class */
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    pointer-events: none;
}

/* Use case color for badge */
.case-card[class*="custom-case-gradient-"] .case-opens-badge {
    background: var(--hex-color) !important;
    box-shadow: 0 4px 12px rgba(var(--main-color), 0.5);
}

.case-card[class*="custom-case-gradient-"]:hover .case-opens-badge {
    box-shadow: 0 6px 16px rgba(var(--main-color), 0.7);
    transform: scale(1.05);
}

/* Use case color for price underline */
.case-card[class*="custom-case-gradient-"] .case-price::before {
    background: linear-gradient(90deg, transparent 0%, var(--hex-color) 40%, var(--hex-color) 60%, transparent 100%) !important;
    opacity: 0.8;
    filter: blur(1px);
}

.case-opens-badge svg {
    width: 14px;
    height: 14px;
    opacity: 1;
}

/* Custom Case Hover - uses variables from case_gradients.css */
.case-card[class*="custom-case-gradient-"]:hover {
    transform: perspective(800px) rotateX(5deg) translateY(-10px) scale(1.03);
    border-color: var(--hex-color) !important;
    box-shadow: 0 15px 30px rgba(var(--main-color), 0.5), 0 0 20px rgba(var(--main-color), 0.7) inset;
    z-index: 3;
}

.case-card[class*="custom-case-gradient-"]:hover .case-image img {
    transform: translateY(-15px) scale(1.15);
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.6));
}

/* Additional responsive optimizations for all screen sizes */
@media (min-width: 1920px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
        gap: clamp(25px, 2vw, 35px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 2560px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
        gap: clamp(30px, 2.5vw, 40px);
    }

    .featured-cases-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 320px) {
    .cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
        gap: clamp(8px, 1vw, 12px);
    }

    .featured-cases-grid,
    .classic-cases-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
    }

    .case-content {
        padding: clamp(5px, 1vw, 8px);
    }

    .case-card .case-card-title {
        font-size: clamp(9px, 1.2vw, 11px);
        min-height: clamp(20px, 2.5vw, 24px);
        max-height: clamp(24px, 3vw, 28px);
    }

    .case-price span {
        font-size: clamp(10px, 1.5vw, 12px);
    }
}

/* Mascot Positioning between hero-banner and cases-section */
.home-mascot-divider {
    position: relative;
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    height: 0;
    z-index: 100;
    pointer-events: none;
}

.home-mascot-img {
    position: absolute;
    bottom: -20px;
    left: clamp(330px, 21%, 420px);
    height: 220px;
    /* Reduced further from 250px */
    width: auto;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6));
    user-select: none;
    pointer-events: none;
    transition: all 0.3s ease;
    will-change: transform;
}

/* Shrink mascot when promo banner is present to prevent overlapping text */
body:has(#creator-promo-banner:not(.banner-closing):not([style*="display: none"])) .home-mascot-img {
    height: 185px !important;
    bottom: -15px !important;
}

/* Specific desktop adjustments for different widths */
@media (max-width: 1400px) {
    .home-mascot-img {
        left: clamp(280px, 18%, 340px);
        height: 190px;
        /* Reduced further from 220px */
        bottom: -15px;
    }
}

@media (max-width: 1025px) {
    .home-mascot-divider {
        display: none;
    }
}

/* Desktop skin search rail (Home only): line is part of the background */
body.page-home {
    --skin-rail-x: 26px;
    --skin-rail-thumb: 38px;
    --skin-rail-thumb-half: 19px;
}

@media (min-width: 1025px) {
    body.page-home.skin-rail-active {
        /* Draw rail line as a background layer (not a widget) */
        background-image:
            linear-gradient(to bottom,
                rgba(107, 42, 163, 0.0),
                rgba(107, 42, 163, 0.95),
                rgba(107, 42, 163, 0.0)),
            url("../img/backgrounds/case_background_1080p.jpg");
        background-size: 2px 100%, cover;
        background-position: var(--skin-rail-x) 0, center;
        background-repeat: no-repeat, no-repeat;
        background-attachment: fixed, fixed;
    }
}

.page-home .skin-results-rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 72px;
    display: none;
    z-index: 9990;
    pointer-events: none;
}

.page-home .skin-results-rail.is-active {
    display: block;
}

.page-home .skin-results-rail__jump {
    position: absolute;
    left: var(--skin-rail-x);
    top: 92px;
    transform: translateX(-50%);
    width: var(--skin-rail-thumb);
    height: var(--skin-rail-thumb);
    border-radius: 999px;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(107, 42, 163, 0.14);
    box-shadow: 0 8px 32px rgba(107, 42, 163, 0.22);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.page-home .skin-results-rail__jump:hover {
    transform: translateX(-50%) translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(107, 42, 163, 0.24);
    box-shadow: 0 12px 40px rgba(107, 42, 163, 0.32);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.page-home .skin-results-rail__jump svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.85);
}

.page-home .skin-results-rail__pips {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.page-home .skin-results-rail__pip {
    position: absolute;
    left: var(--skin-rail-x);
    width: 10px;
    height: 10px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: linear-gradient(120deg, rgba(107, 42, 163, 0.92) 0%, rgba(59, 19, 87, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.page-home .skin-results-rail__pip--active {
    width: 12px;
    height: 12px;
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 10px 28px rgba(107, 42, 163, 0.35);
}

.page-home .skin-results-rail__marker {
    position: absolute;
    left: var(--skin-rail-x);
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    outline: none;
    z-index: 2;
}

.page-home .skin-results-rail__thumb {
    width: var(--skin-rail-thumb);
    height: var(--skin-rail-thumb);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(107, 42, 163, 0.14);
    box-shadow: 0 8px 32px rgba(107, 42, 163, 0.22);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    pointer-events: none;
}

.page-home .skin-results-rail__thumb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
}

.page-home .skin-results-rail__stack {
    position: absolute;
    right: 2px;
    bottom: 2px;
    display: inline-flex;
    gap: 0;
    pointer-events: none;
}

.page-home .skin-results-rail__mini {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(107, 42, 163, 0.45);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-home .skin-results-rail__mini+.skin-results-rail__mini {
    margin-left: -4px;
}

.page-home .skin-results-rail__mini img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-home .skin-results-rail__mini--dot::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
}

.page-home .skin-results-rail__count {
    position: absolute;
    right: -8px;
    bottom: -8px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(147, 51, 234, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.2px;
}

@media (max-width: 1024px) {
    .page-home .skin-results-rail {
        display: none !important;
    }
}

/* Home: mute results while filtering/searching (keeps filters crisp) */
body.page-home .cases-section> :not(.filters) {
    transition: filter 0.18s ease, opacity 0.18s ease;
}

body.page-home.home-search-busy .cases-section> :not(.filters),
body.page-home.home-search-dim .cases-section> :not(.filters) {
    filter: grayscale(1) saturate(0.1) blur(1.6px);
    opacity: 0.55;
    pointer-events: none;
}

/* Search mode toggle (skins / cases / authors) */
.search-mode-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: nowrap;
}

.microheader-search .search-mode-row {
    max-width: 700px;
    width: 100%;
    flex-wrap: nowrap;
}

.search-mode-row--mobile {
    width: 100%;
    flex-wrap: nowrap;
}

.search-mode-panel {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 0;
    opacity: 0;
    transform: translateX(-10px) scale(0.985);
    pointer-events: none;
    overflow: visible;
    transition: max-width 0.32s cubic-bezier(0.2, 0.7, 0.2, 1),
        opacity 0.22s ease,
        transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.search-mode-panel .skin-search-row,
.search-mode-panel .case-search-row,
.search-mode-panel .author-search-row,
.search-mode-panel .mobile-skin-search-row,
.search-mode-panel .mobile-case-search-row {
    width: 100%;
}

body[data-search-mode="skins"] .search-mode-panel[data-search-panel="skins"] {
    flex: 1 1 auto;
    max-width: 100%;
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

body[data-search-mode="cases"] .search-mode-panel[data-search-panel="cases"] {
    flex: 0 1 360px;
    max-width: 360px;
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

body[data-search-mode="authors"] .search-mode-panel[data-search-panel="authors"] {
    flex: 0 1 340px;
    max-width: 340px;
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.search-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.7), rgba(24, 20, 62, 0.65));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 18px rgba(59, 19, 87, 0.2);
    flex-shrink: 0;
}

.search-mode-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.search-mode-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.search-mode-btn.is-active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(147, 51, 234, 0.45);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(107, 42, 163, 0.25);
}

.search-mode-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    overflow: visible;
    shape-rendering: geometricPrecision;
}

.search-mode-icon--cases {
    width: 18px;
    height: 12px;
    min-width: 18px;
    min-height: 12px;
}

.search-mode-icon--skins {
    width: 19px;
    height: 12px;
    min-width: 19px;
    min-height: 12px;
}

.search-mode-icon--authors {
    width: 18px;
    height: 14px;
    min-width: 18px;
    min-height: 14px;
}

.search-mode-icon--cases polygon,
.search-mode-icon--cases rect,
.search-mode-icon--authors path {
    vector-effect: none;
}

.search-mode-icon use,
.search-mode-icon path,
.search-mode-icon line,
.search-mode-icon polyline,
.search-mode-icon polygon,
.search-mode-icon rect,
.search-mode-icon circle,
.search-mode-icon ellipse {
    vector-effect: non-scaling-stroke;
}

.search-mode-icon--fill use,
.search-mode-icon--fill path,
.search-mode-icon--fill line,
.search-mode-icon--fill polyline,
.search-mode-icon--fill polygon,
.search-mode-icon--fill rect,
.search-mode-icon--fill circle,
.search-mode-icon--fill ellipse {
    vector-effect: none;
}

.case-search-row {
    position: relative;
    width: 100%;
}

.filters .case-search-row {
    z-index: 10;
}

.filters .case-search-wrap {
    flex: 0 1 300px;
    min-width: 220px;
    max-width: 340px;
}

.author-search-row {
    position: relative;
    width: 100%;
}

.author-search {
    display: flex;
    align-items: center;
}

.author-search-wrap {
    flex: 0 1 260px;
    min-width: 200px;
    max-width: 320px;
}

.author-search-dropdown .search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-search-dropdown .author-count {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.case-search-input {
    min-width: 0;
}

body[data-search-mode="cases"] .selected-skins,
body[data-search-mode="cases"] #microSelectedSkinsContainer,
body[data-search-mode="cases"] .skin-results-rail,
body[data-search-mode="authors"] .selected-skins,
body[data-search-mode="authors"] #microSelectedSkinsContainer,
body[data-search-mode="authors"] .skin-results-rail {
    display: none !important;
}

.microheader .search-mode-row {
    flex-wrap: nowrap;
    gap: 8px;
}

.microheader .search-mode-toggle {
    padding: 2px 3px;
    border-radius: 22px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    flex: 0 0 auto;
}

.microheader .search-mode-btn {
    width: 30px;
    height: 30px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
}

body[data-search-mode="cases"] .microheader .search-mode-panel[data-search-panel="cases"] {
    max-width: none;
}

body[data-search-mode="authors"] .microheader .search-mode-panel[data-search-panel="authors"] {
    max-width: none;
}

.microheader .search-mode-panel {
    flex: 1 1 auto;
    min-width: 0;
}

.microheader .skin-search-row {
    flex-wrap: nowrap;
    gap: 8px;
}

.microheader .skin-type-select-wrap {
    flex: 0 1 126px;
    width: auto;
    min-width: 92px;
}

.microheader .skin-name-input-wrap,
.microheader .case-search-wrap,
.microheader .author-search-wrap {
    flex: 1 1 auto;
    min-width: 130px;
    max-width: none;
}

@media (max-width: 1000px) {
    .microheader .search-mode-row {
        flex-wrap: wrap;
    }

    .microheader-search .search-mode-row {
        max-width: 500px;
    }
}

.mobile-search-bar .search-mode-row {
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.mobile-search-bar .search-mode-toggle {
    padding: 4px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(34, 31, 72, 0.85), rgba(24, 20, 62, 0.75));
    border: 1px solid rgba(147, 51, 234, 0.4);
    box-shadow: 0 2px 8px rgba(59, 19, 87, 0.3);
}

.mobile-search-bar .search-mode-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-search-bar .search-mode-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(147, 51, 234, 0.3);
}

.mobile-search-bar .search-mode-btn.is-active {
    background: rgba(147, 51, 234, 0.4);
    border-color: rgba(147, 51, 234, 0.65);
    box-shadow: 0 2px 10px rgba(126, 34, 206, 0.35);
}

.mobile-search-bar .search-mode-panel {
    min-width: 0;
}

body[data-search-mode="skins"] .mobile-search-bar .search-mode-panel[data-search-panel="skins"],
body[data-search-mode="cases"] .mobile-search-bar .search-mode-panel[data-search-panel="cases"],
body[data-search-mode="authors"] .mobile-search-bar .search-mode-panel[data-search-panel="authors"] {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.mobile-search-bar .mobile-skin-search-row,
.mobile-search-bar .mobile-case-search-row,
.mobile-search-bar .mobile-author-search-row {
    display: grid;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
}

.mobile-search-bar .mobile-skin-search-row {
    grid-template-columns: 116px minmax(0, 1fr);
}

.mobile-search-bar .mobile-case-search-row,
.mobile-search-bar .mobile-author-search-row {
    grid-template-columns: minmax(0, 1fr);
}

.mobile-search-bar.input-active .mobile-skin-search-row {
    grid-template-columns: 96px minmax(0, 1fr);
}

.mobile-search-bar .mobile-skin-type-select-wrap {
    flex: 0 0 116px;
    min-width: 116px;
    max-width: 116px;
    height: 42px;
    display: flex;
    align-items: center;
}

.mobile-search-bar .mobile-skin-type-select-wrap .skin-type-selected {
    width: 100%;
    height: 42px;
    padding: 0 32px 0 12px;
    font-size: 13px;
    line-height: 1;
    box-sizing: border-box;
}

.mobile-search-bar .mobile-skin-type-select-wrap .skin-type-selected .arrow {
    right: 9px;
    width: 14px;
    height: 14px;
}

.mobile-search-bar .mobile-skin-type-select-wrap .skin-type-dropdown {
    left: 0;
    right: auto;
    width: max-content;
    min-width: min(240px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
}

.mobile-search-bar .mobile-skin-type-select-wrap .skin-type-dropdown .search-dropdown-item {
    white-space: normal;
    overflow-wrap: anywhere;
}

.mobile-search-bar .mobile-skin-name-input-wrap,
.mobile-search-bar .mobile-skin-name-input-wrap.case-search-wrap,
.mobile-search-bar .mobile-skin-name-input-wrap.author-search-wrap {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    overflow: visible;
}

.mobile-search-bar .mobile-skin-name-input-wrap input,
.mobile-search-bar .mobile-skin-name-input-wrap.case-search-wrap input,
.mobile-search-bar .mobile-skin-name-input-wrap.author-search-wrap input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    height: 42px;
    padding: 0 12px 0 38px;
    box-sizing: border-box;
}

#mobileSelectedSkinsContainer {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0 12px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#mobileSelectedSkinsContainer::-webkit-scrollbar {
    display: none;
}

#mobileSelectedSkinsContainer .selected-skin-badge {
    flex: 0 0 auto;
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 17px;
    max-width: min(220px, calc(100vw - 72px));
}

#mobileSelectedSkinsContainer .selected-skin-badge img {
    display: none !important;
}

#mobileSelectedSkinsContainer .selected-skin-badge span {
    max-width: 160px;
    font-size: 12px;
}

#mobileSelectedSkinsContainer .selected-skin-badge button {
    margin-left: 6px;
    padding: 0 2px;
    font-size: 16px;
}

body[data-search-mode="skins"] .mobile-search-bar .search-mode-panel[data-search-panel="skins"],
body[data-search-mode="cases"] .mobile-search-bar .search-mode-panel[data-search-panel="cases"],
body[data-search-mode="authors"] .mobile-search-bar .search-mode-panel[data-search-panel="authors"] {
    flex: 1 1 auto;
    max-width: 100%;
}

.mobile-case-search-row {
    width: 100%;
}

#mobile-skin-search-dropdown .search-dropdown-item.skin-item {
    padding: 10px 12px;
    align-items: center;
    min-width: 0;
}

#mobile-skin-search-dropdown .search-dropdown-item.skin-item img {
    display: none !important;
}

#mobile-skin-search-dropdown .search-dropdown-item.skin-item span {
    display: block;
    min-width: 0;
    font-size: 13px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Desktop/Tablet microheader rebuild: compact, equal-size controls, no mode animation */
@media (min-width: 769px) {
    .search-mode-panel {
        display: none;
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        overflow: visible;
        transition: none;
    }

    body[data-search-mode="skins"] .search-mode-panel[data-search-panel="skins"],
    body[data-search-mode="cases"] .search-mode-panel[data-search-panel="cases"],
    body[data-search-mode="authors"] .search-mode-panel[data-search-panel="authors"] {
        display: block;
    }

    body[data-search-mode="cases"] .filters .search-mode-panel[data-search-panel="cases"] {
        flex: 0 1 360px;
        max-width: 360px;
    }

    body[data-search-mode="authors"] .filters .search-mode-panel[data-search-panel="authors"] {
        flex: 0 1 340px;
        max-width: 340px;
    }

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"],
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] {
        flex: 1 1 auto;
        max-width: 100%;
        min-width: 0;
    }

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row,
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row {
        flex-wrap: wrap;
        align-items: stretch;
        min-width: 0;
    }

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row>#selectedSkinsContainer,
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row>#selectedSkinsContainer {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin-top: 10px;
        align-self: stretch;
        justify-content: flex-start;
    }

    .microheader-content {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 8px;
        height: 56px;
        padding: 0 10px;
        position: relative;
        z-index: 3;
    }

    /* Keep nav docked to the right even on pages with simplified microheader */
    .microheader-content>.microheader-logo {
        grid-column: 1;
    }

    .microheader-content>.microheader-search {
        grid-column: 2;
    }

    .microheader-content>.microheader-filters {
        grid-column: 3;
    }

    .microheader-content>.microheader-nav {
        grid-column: 4;
        justify-self: end;
        margin-left: 0;
    }

    .microheader #microSelectedSkinsContainer {
        max-width: 1700px;
        width: 100%;
        margin: 0 auto;
        padding: 8px 12px 10px;
        box-sizing: border-box;
        display: none;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: wrap;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(59, 19, 87, 0.2);
        position: relative;
        z-index: 2;
    }

    .microheader #microSelectedSkinsContainer .selected-skin-badge {
        height: 34px;
        min-height: 34px;
        border-radius: 17px;
        padding: 0 10px 0 8px;
    }

    .microheader #microSelectedSkinsContainer .selected-skin-badge img {
        width: 34px;
        height: 22px;
        margin-right: 6px;
    }

    .microheader #microSelectedSkinsContainer .selected-skin-badge span {
        font-size: 12px;
    }

    .microheader-logo {
        min-width: 0;
    }

    .microheader-logo a {
        height: 34px;
        display: flex;
        align-items: center;
    }

    .microheader-logo-img {
        height: 34px;
    }

    .microheader-search {
        margin: 0;
        min-width: 0;
        width: 100%;
    }

    .microheader-search .search-mode-row {
        max-width: none;
        width: 100%;
        gap: 8px;
        flex-wrap: nowrap !important;
    }

    .microheader .search-mode-toggle {
        height: 36px;
        padding: 2px;
        border-radius: 18px;
        flex: 0 0 auto;
        overflow: hidden;
    }

    .microheader .search-mode-btn,
    .microheader-favorites-btn,
    .microheader-clear-btn,
    .microheader-social a {
        width: 36px;
        min-width: 36px;
        height: 36px;
        border-radius: 10px;
        padding: 0;
    }

    .microheader .search-mode-icon {
        width: 14px;
        height: 14px;
        font-size: 14px;
    }

    .microheader .search-mode-btn.is-active {
        box-shadow: none;
    }

    .microheader .search-mode-panel,
    body[data-search-mode="cases"] .microheader .search-mode-panel[data-search-panel="cases"],
    body[data-search-mode="authors"] .microheader .search-mode-panel[data-search-panel="authors"] {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }

    .microheader .skin-search-row,
    .microheader .case-search-row,
    .microheader .author-search-row {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .microheader .skin-type-select-wrap {
        flex: 0 0 clamp(86px, 10vw, 120px);
        min-width: 0;
        width: auto;
    }

    .microheader .skin-name-input-wrap,
    .microheader .case-search-wrap,
    .microheader .author-search-wrap {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }

    .microheader .skin-type-selected,
    .microheader .skin-name-input-wrap input {
        height: 36px;
        border-radius: 18px;
        font-size: 13px;
    }

    .microheader .skin-type-selected {
        padding: 0 34px 0 12px;
    }

    .microheader .skin-name-input-wrap input {
        padding: 0 12px 0 34px;
    }

    .microheader .skin-name-input-wrap .search-dropdown,
    .microheader .microheader-search-dropdown,
    .microheader .author-search-dropdown {
        z-index: 10060 !important;
        background: #1a143b;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .microheader-filters,
    .microheader-nav {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 0;
        min-width: 0;
    }

    .microheader-price-filter {
        min-width: 0;
    }

    .microheader-price-slider-container,
    .microheader-balance-block,
    .microheader-profile,
    .microheader-auth {
        height: 36px;
        border-radius: 10px;
    }

    .microheader-price-slider-container {
        width: clamp(120px, 14vw, 180px);
        padding: 0 8px;
        gap: 6px;
        min-width: 0;
        overflow: hidden;
    }

    .microheader-price-slider {
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
    }

    .microheader-current-price {
        min-width: 0;
        max-width: 86px;
        width: auto;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .microheader-balance-block {
        padding: 0 8px;
        gap: 4px;
    }

    .microheader-balance-coin {
        width: 16px;
        height: 16px;
        margin-right: 0;
    }

    .microheader-balance-value {
        font-size: 12px;
    }

    .microheader-profile {
        padding: 0 8px 0 6px;
        gap: 6px;
    }

    .microheader-profile-avatar {
        width: 24px;
        height: 24px;
        border-radius: 7px;
    }

    .microheader-profile-username {
        max-width: 84px;
        font-size: 12px;
    }

    .microheader-auth {
        padding: 0 10px;
    }

    .microheader-auth span {
        font-size: 11px;
        letter-spacing: 0.2px;
    }

    .microheader-auth i {
        font-size: 14px;
        margin-right: 4px;
    }
}

@media (min-width: 769px) and (max-width: 1420px) {
    .microheader-social {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1240px) {
    .microheader-balance {
        display: none;
    }

    .microheader-price-slider-container {
        width: clamp(108px, 16vw, 150px);
    }

    .microheader-profile-username {
        max-width: 64px;
    }

    .microheader .skin-type-select-wrap {
        flex-basis: 84px;
    }
}

@media (min-width: 769px) and (max-width: 1120px) {
    .microheader-current-price {
        display: none;
    }

    .microheader-price-slider-container {
        width: 98px;
        padding: 0 6px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .microheader-logo-full {
        display: none;
    }

    .microheader-logo-small {
        display: block;
    }

    .microheader-logo-img {
        height: 30px;
    }

    .microheader-content {
        gap: 6px;
        padding: 0 8px;
    }

    .microheader #microSelectedSkinsContainer {
        padding: 7px 8px 9px;
        gap: 6px;
    }

    .microheader #microSelectedSkinsContainer .selected-skin-badge {
        height: 32px;
        min-height: 32px;
        border-radius: 16px;
    }

    .microheader .search-mode-row {
        gap: 6px;
    }

    .microheader .search-mode-toggle {
        height: 38px;
        padding: 3px;
        border-radius: 10px;
        background: linear-gradient(145deg, rgba(34, 31, 72, 0.85), rgba(24, 20, 62, 0.75));
        border: 1px solid rgba(147, 51, 234, 0.35);
        box-shadow: 0 2px 8px rgba(59, 19, 87, 0.25);
    }

    .microheader .search-mode-btn {
        width: 32px;
        min-width: 32px;
        height: 32px;
        border-radius: 8px;
        border: 1px solid transparent;
    }

    .microheader .search-mode-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(147, 51, 234, 0.25);
    }

    .microheader .search-mode-btn.is-active {
        background: rgba(147, 51, 234, 0.35);
        border-color: rgba(147, 51, 234, 0.6);
        box-shadow: 0 2px 10px rgba(126, 34, 206, 0.3);
    }

    .microheader-favorites-btn,
    .microheader-clear-btn {
        width: 38px;
        min-width: 38px;
        height: 38px;
        border-radius: 10px;
        padding: 8px;
    }

    .microheader-clear-btn {
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.35);
    }

    .microheader-clear-btn:hover {
        background: rgba(239, 68, 68, 0.25);
        border-color: rgba(239, 68, 68, 0.5);
    }

    .microheader-filters,
    .microheader-nav {
        gap: 6px;
    }

    .microheader-price-slider-container {
        width: 120px;
        height: 38px;
        padding: 6px 10px;
    }

    .microheader-profile {
        height: 38px;
        padding: 0 8px;
        border-radius: 10px;
    }

    .microheader-profile-username {
        display: none;
    }

    .microheader-profile-avatar {
        width: 30px;
        height: 30px;
    }
}

@media (min-width: 1025px) {

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row,
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row {
        align-items: center;
    }

    body.page-home[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row>#selectedSkinsContainer,
    body.page-custom-cases-all[data-search-mode="skins"] .cases-section .filters .search-mode-panel[data-search-panel="skins"] .skin-search-row>#selectedSkinsContainer {
        flex: 1 0 520px;
        width: auto;
        min-width: min(100%, 520px);
        max-width: 100%;
        margin-top: 0;
        align-self: center;
    }
}

/* Mobile: case/author dropdowns open upward like skin dropdown */
@media (max-width: 1024px) {

    #search-dropdown-mobile,
    #mobile-author-search-dropdown {
        top: auto !important;
        bottom: calc(100% + 6px) !important;
        margin-top: 0 !important;
        border-top: 1.5px solid rgba(147, 51, 234, 0.4) !important;
        border-bottom: none !important;
        border-radius: 12px 12px 0 0 !important;
        z-index: 10000 !important;
    }

    .mobile-skin-name-input-wrap.case-search-wrap.open input,
    .mobile-skin-name-input-wrap.author-search-wrap.open input {
        border-radius: 0 0 12px 12px !important;
        border-top-color: transparent !important;
        border-bottom-color: rgba(147, 51, 234, 0.4) !important;
        background: rgba(15, 23, 42, 0.95) !important;
    }
}

/* Upper widget: dropdown direction is decided dynamically in JS */
.filters #skin-search-dropdown.dropdown-open-up,
.filters #search-dropdown.dropdown-open-up,
.filters #author-search-dropdown.dropdown-open-up,
.filters .search-dropdown.dropdown-open-up,
.filters .skin-type-select-wrap .skin-type-dropdown.dropdown-open-up {
    top: auto !important;
    bottom: calc(100% + 6px) !important;
    margin-top: 0 !important;
    border-top: 1.5px solid rgba(147, 51, 234, 0.4) !important;
    border-bottom: none !important;
    border-radius: 12px 12px 0 0 !important;
    z-index: 10000 !important;
}

.filters #skin-search-dropdown.dropdown-open-down,
.filters #search-dropdown.dropdown-open-down,
.filters #author-search-dropdown.dropdown-open-down,
.filters .search-dropdown.dropdown-open-down,
.filters .skin-type-select-wrap .skin-type-dropdown.dropdown-open-down {
    top: 100% !important;
    bottom: auto !important;
    margin-top: -1px !important;
    border-top: none !important;
    border-bottom: 1.5px solid rgba(147, 51, 234, 0.4) !important;
    border-radius: 0 0 12px 12px !important;
    z-index: 10000 !important;
}

.filters .skin-name-input-wrap.open.dropdown-open-up input,
.filters .case-search-wrap.open.dropdown-open-up input,
.filters .author-search-wrap.open.dropdown-open-up input {
    border-radius: 0 0 12px 12px !important;
    border-top-color: transparent !important;
    border-bottom-color: rgba(147, 51, 234, 0.4) !important;
    background: rgba(15, 23, 42, 0.95) !important;
}

.filters .skin-name-input-wrap.open.dropdown-open-down input,
.filters .case-search-wrap.open.dropdown-open-down input,
.filters .author-search-wrap.open.dropdown-open-down input {
    border-radius: 12px 12px 0 0 !important;
    border-top-color: rgba(147, 51, 234, 0.4) !important;
    border-bottom-color: transparent !important;
    background: rgba(15, 23, 42, 0.95) !important;
}

.filters .skin-type-selected.open.dropdown-open-up {
    border-radius: 0 0 12px 12px !important;
    border-top-color: transparent !important;
    border-bottom-color: rgba(147, 51, 234, 0.4) !important;
}

.filters .skin-type-selected.open.dropdown-open-down {
    border-radius: 12px 12px 0 0 !important;
    border-top-color: rgba(147, 51, 234, 0.4) !important;
    border-bottom-color: transparent !important;
}

@media (max-width: 420px) {

    .filters #skin-search-dropdown .search-dropdown-item.skin-item,
    .filters #mobile-skin-search-dropdown .search-dropdown-item.skin-item,
    .filters .search-dropdown .search-dropdown-item.skin-item {
        padding: 10px 12px;
        align-items: flex-start;
    }

    .filters #skin-search-dropdown .search-dropdown-item.skin-item img,
    .filters #mobile-skin-search-dropdown .search-dropdown-item.skin-item img,
    .filters .search-dropdown .search-dropdown-item.skin-item img {
        display: none !important;
    }

    .filters #skin-search-dropdown .search-dropdown-item.skin-item span,
    .filters #mobile-skin-search-dropdown .search-dropdown-item.skin-item span,
    .filters .search-dropdown .search-dropdown-item.skin-item span {
        font-size: 13px;
        line-height: 1.25;
    }
}

/* Unified desktop dropdown geometry for all search inputs (skin/case/author) */
@media (min-width: 769px) {

    .skin-search-row .search-dropdown,
    .case-search-row .search-dropdown,
    .author-search-row .search-dropdown,
    .microheader-search .search-dropdown,
    #skin-search-dropdown,
    #search-dropdown,
    #micro-skin-search-dropdown,
    #microheader-search-dropdown,
    #author-search-dropdown,
    #micro-author-search-dropdown {
        top: 100% !important;
        bottom: auto !important;
        margin-top: -1px !important;
        border-top: none !important;
        border-radius: 0 0 12px 12px !important;
    }
}

body.page-home .case-price {
    z-index: 3;
}

body.page-home .case-price-value,
body.page-custom-cases-all .case-price-value {
    display: inline-block;
    justify-self: center;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
    word-break: break-word;
    line-height: 1.1;
}

body.page-home .case-price-meta,
body.page-custom-cases-all .case-price-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #ffffff;
    line-height: 1;
    position: relative;
    z-index: 4;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

body.page-home .case-price-meta--hidden,
body.page-custom-cases-all .case-price-meta--hidden {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.page-home .case-price-meta-value,
body.page-custom-cases-all .case-price-meta-value {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

body.page-home .case-price-meta-icon,
body.page-custom-cases-all .case-price-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.92;
}

body.page-home .case-price-meta-icon svg,
body.page-custom-cases-all .case-price-meta-icon svg {
    width: 16px;
    height: 16px;
}

body.page-home .case-price-meta--likes,
body.page-custom-cases-all .case-price-meta--likes {
    color: #ffffff;
}

body.page-home .case-price-favorite,
body.page-custom-cases-all .case-price-favorite {
    color: #ffffff;
}

body.page-home .case-price-meta--opens,
body.page-custom-cases-all .case-price-meta--opens {
    color: #ffffff;
}

body.page-home .case-price-meta--likes .case-price-meta-value,
body.page-custom-cases-all .case-price-meta--likes .case-price-meta-value,
body.page-home .case-price-meta--opens .case-price-meta-value,
body.page-custom-cases-all .case-price-meta--opens .case-price-meta-value {
    color: #ffffff;
    text-shadow: none;
}

body.page-home .case-price-favorite svg,
body.page-custom-cases-all .case-price-favorite svg,
body.page-home .case-price-meta-package-icon,
body.page-custom-cases-all .case-price-meta-package-icon {
    stroke: #ffffff !important;
    filter: none;
}

body.page-home .case-price-favorite:not(.active) svg,
body.page-custom-cases-all .case-price-favorite:not(.active) svg {
    fill: none !important;
}

body.page-home .case-price-favorite.active svg,
body.page-custom-cases-all .case-price-favorite.active svg {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
}

body.page-home .case-price-meta-search-icon,
body.page-custom-cases-all .case-price-meta-search-icon {
    width: 16px;
    height: 10px;
    display: block;
}

body.page-home .case-price-meta-package-icon,
body.page-custom-cases-all .case-price-meta-package-icon {
    width: 14px;
    height: 14px;
    display: block;
}

body.page-home .case-price-favorite,
body.page-custom-cases-all .case-price-favorite {
    padding: 0;
    margin: 0;
}

body.page-home .case-price-favorite svg,
body.page-custom-cases-all .case-price-favorite svg {
    width: 18px;
    height: 18px;
}

@media (hover: hover) and (pointer: fine) {

    body.page-home .case-card,
    body.page-custom-cases-all .case-card {
        isolation: isolate;
    }

    body.page-home .case-price,
    body.page-custom-cases-all .case-price {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 10px;
    }

    body.page-home .case-price-meta,
    body.page-custom-cases-all .case-price-meta {
        opacity: 1;
        transform: none;
        pointer-events: none;
    }

    body.page-home .case-price-meta--likes,
    body.page-custom-cases-all .case-price-meta--likes {
        justify-self: start;
        pointer-events: auto;
    }

    body.page-home .case-price-meta--likes.case-price-meta--icon-only,
    body.page-custom-cases-all .case-price-meta--likes.case-price-meta--icon-only {
        justify-self: end;
    }

    body.page-home .case-price-meta--opens,
    body.page-custom-cases-all .case-price-meta--opens {
        justify-self: end;
    }

    body.page-home .case-opens-badge,
    body.page-custom-cases-all .case-opens-badge {
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    body.page-home .case-opens-badge,
    body.page-custom-cases-all .case-opens-badge {
        opacity: 1;
    }

    body.page-home .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-custom-cases-all .case-card[data-case-id^="user_"] .case-author-badge-container {
        left: 12px !important;
        right: auto !important;
        align-items: flex-start !important;
    }

}

@media (max-width: 1024px) {

    body.page-home .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-home .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-home .featured-cases-grid .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-home .featured-cases-grid .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-custom-cases-all .featured-cases-grid .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-custom-cases-all .featured-cases-grid .case-card[data-case-id^="user_"] .case-author-badge-container {
        position: absolute !important;
        /* Фоллбек: если --custom-fit-pad не задан — используем 8px */
        top: calc(var(--custom-fit-pad, 8px) + 8px) !important;
        left: 6px !important;
        right: 6px !important;
        display: flex !important;
        flex-direction: row !important;
        /* center — аватар не падает вниз относительно бейджа */
        align-items: center !important;
        justify-content: space-between !important;
        width: auto !important;
        margin: 0 !important;
        z-index: 25 !important;
        pointer-events: none !important;
        /* Убираем overflow:hidden — он обрезал аватар */
        overflow: visible !important;
    }
}

@media (max-width: 768px) {

    body.page-home .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-home .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-home .featured-cases-grid .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-home .featured-cases-grid .case-card[data-case-id^="user_"] .case-author-badge-container,
    body.page-custom-cases-all .featured-cases-grid .case-card[id^="case-card-user-"] .case-author-badge-container,
    body.page-custom-cases-all .featured-cases-grid .case-card[data-case-id^="user_"] .case-author-badge-container {
        top: calc(var(--custom-fit-pad, 24px) + 24px) !important;
    }
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {

    body.page-home .case-card[data-case-id^="user_"] .case-opens-badge,
    body.page-custom-cases-all .case-card[data-case-id^="user_"] .case-opens-badge {
        display: none !important;
    }
}

@media (hover: none),
(pointer: coarse) {

    body.page-home .case-price,
    body.page-custom-cases-all .case-price {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    body.page-home .case-price-meta,
    body.page-custom-cases-all .case-price-meta {
        opacity: 1;
        transform: none;
    }

    body.page-home .case-price-meta--opens,
    body.page-custom-cases-all .case-price-meta--opens,
    body.page-home .case-price-meta--guest,
    body.page-custom-cases-all .case-price-meta--guest {
        display: none !important;
    }

    body.page-home .case-price-meta--likes,
    body.page-custom-cases-all .case-price-meta--likes {
        display: inline-flex;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        position: relative;
        order: 2;
        z-index: 30;
    }

    body.page-home .case-price-meta--likes.case-price-meta--guest {
        display: none !important;
    }

    body.page-home .case-price-value,
    body.page-custom-cases-all .case-price-value {
        order: 1;
    }

    body.page-home .case-price-favorite,
    body.page-custom-cases-all .case-price-favorite {
        padding: 4px;
        margin: 0;
    }

    body.page-home .case-price-meta--likes .case-price-meta-value,
    body.page-custom-cases-all .case-price-meta--likes .case-price-meta-value,
    body.page-home .case-price-meta--likes .case-price-meta-icon--heart,
    body.page-custom-cases-all .case-price-meta--likes .case-price-meta-icon--heart {
        display: none !important;
    }
}

@media screen and (max-width: 768px),
screen and (orientation: landscape) and (max-height: 600px),
screen and (max-height: 480px) {

    body.page-home .case-price,
    body.page-custom-cases-all .case-price {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    body.page-home .case-price-meta--opens,
    body.page-custom-cases-all .case-price-meta--opens,
    body.page-home .case-price-meta--guest,
    body.page-custom-cases-all .case-price-meta--guest {
        display: none !important;
    }

    body.page-home .case-price-meta--likes,
    body.page-custom-cases-all .case-price-meta--likes,
    body.page-home .case-price-favorite,
    body.page-custom-cases-all .case-price-favorite {
        display: none !important;
    }

    body.page-home .case-price-value,
    body.page-custom-cases-all .case-price-value {
        order: 0 !important;
        max-width: 100% !important;
        font-size: clamp(15px, 4.1vw, 20px) !important;
    }

    .classic-cases-grid .case-price span,
    .classic-cases-grid .case-price-value {
        max-width: 100% !important;
    }

    body.page-home .case-card[data-case-id^="user_"] .case-opens-badge,
    body.page-custom-cases-all .case-card[data-case-id^="user_"] .case-opens-badge {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Tablet containment: keep home case grids centered inside the viewport. */
@media screen and (min-width: 769px) and (max-width: 991px) {

    body.page-home,
    body.page-home .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.page-home .cases-section {
        width: min(100%, 1700px) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: clamp(12px, 2vw, 18px) !important;
        padding-right: clamp(12px, 2vw, 18px) !important;
        box-sizing: border-box !important;
        overflow-x: clip;
    }

    body.page-home .cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .featured-cases-grid,
    body.page-home .classic-cases-grid,
    body.page-home .beginners-cases-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: clamp(12px, 1.6vw, 16px) !important;
        box-sizing: border-box !important;
    }

    body.page-home .case-card {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Аватар автора не должен обрезаться у пользовательских кейсов */
    body.page-home .case-card[data-case-id^="user_"],
    body.page-home .case-card[id^="case-card-user-"] {
        overflow: visible !important;
    }
}

@media screen and (min-width: 992px) and (max-width: 1025px) {

    body.page-home,
    body.page-home .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.page-home .cases-section {
        width: min(100%, 1700px) !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: clamp(14px, 2vw, 20px) !important;
        padding-right: clamp(14px, 2vw, 20px) !important;
        box-sizing: border-box !important;
        overflow-x: clip;
    }

    body.page-home .cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .featured-cases-grid,
    body.page-home .beginners-cases-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: clamp(14px, 1.8vw, 18px) !important;
        box-sizing: border-box !important;
    }

    body.page-home .classic-cases-grid,
    body.page-home .classic-cases-grid.cases-grid-cols-4,
    body.page-home .classic-cases-grid.cases-grid-cols-5 {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: clamp(12px, 1.4vw, 16px) !important;
        box-sizing: border-box !important;
    }

    body.page-home .case-card {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Аватар автора не должен обрезаться у пользовательских кейсов */
    body.page-home .case-card[data-case-id^="user_"],
    body.page-home .case-card[id^="case-card-user-"] {
        overflow: visible !important;
    }
}

/* Admin column preference: applied from 1026px and up. */
@media screen and (min-width: 1200px) and (max-width: 1399px) {

    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-4.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.beginners-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.classic-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .cases-grid.cases-grid-cols-5.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.beginners-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.classic-cases-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}

/* Mid-range: 1026px–1199px — cap at 4 columns so cards stay readable */
@media screen and (min-width: 1026px) and (max-width: 1199px) {

    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-4.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.beginners-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.classic-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .cases-grid.cases-grid-cols-5.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.beginners-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.classic-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* Admin column preference: only on wide desktop; tablet/narrow PC keep responsive rules above. */
@media (min-width: 1400px) {

    body.page-home .cases-grid.cases-grid-cols-4,
    body.page-home .cases-grid.cases-grid-cols-4.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.classic-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-4.beginners-cases-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.page-home .cases-grid.cases-grid-cols-5,
    body.page-home .cases-grid.cases-grid-cols-5.featured-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.classic-cases-grid,
    body.page-home .cases-grid.cases-grid-cols-5.beginners-cases-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}


/* Creator Promo Banner (Thin line above slider with pull-up swipe handle) */
.creator-promo-banner {
    width: 100%;
    /* Match transparency and style of `.lorem-block` */
    background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
    border-radius: 16px;
    border: 1px solid rgba(107, 42, 163, 0.12) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
    margin-bottom: 12px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 25;
    flex-shrink: 0;
    box-sizing: border-box !important;
    touch-action: pan-y;
    user-select: none;
    max-height: 64px;
    opacity: 1;
}

/* Further reduce size on medium screens to avoid pushing slider */
@media (max-width: 1200px) {
    .creator-promo-banner {
        max-height: 56px !important;
        padding: 6px 12px !important;
        margin-bottom: 8px !important;
    }

    .creator-promo-banner .banner-text {
        font-size: 12px !important;
    }

    .creator-promo-banner:not([style*="display: none"])+#slider-banner {
        padding-top: 14px !important;
    }
}

.creator-promo-banner.banner-closing {
    opacity: 0 !important;
    max-height: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    transform: translateY(-30px) scaleY(0.5) !important;
    pointer-events: none !important;
}

/* 1:1 hover style matching #bonus-block and #invite-block */
.creator-promo-banner:hover {
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.creator-promo-banner:active {
    transform: scale(0.99);
}

.creator-promo-banner::before {
    display: none !important;
    content: none !important;
}

.creator-promo-banner .banner-gradient-layer {
    /* Right-side gradient layer (filled dynamically by JS to match slider color) */
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.8s ease, background 0.8s ease;
}

/* Adjust slider spacing based on creator banner visibility to avoid layout shift */
.creator-promo-banner:not([style*="display: none"])+#slider-banner {
    padding-top: 18px;
    /* Keep slider rounded even when banner visible */
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.creator-promo-banner[style*="display: none"]+#slider-banner {
    padding-top: 32px;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

/* (Selectors for creator banner merged into bonus/invite block styles above) */

.creator-promo-banner .banner-content-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 3;
    width: 100%;
    text-align: center;
}

.creator-promo-banner .banner-text {
    font-size: 13.5px;
    color: #ffffff !important;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
}

.creator-promo-banner .banner-text strong {
    color: #ffffff !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;
}

/* Pull-up handle indicator (Pill under text) */
.creator-promo-banner .banner-pull-handle {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 4px;
    cursor: grab;
    z-index: 10;
}



.creator-promo-banner .banner-pull-handle .pull-pill {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.creator-promo-banner:hover .banner-pull-handle .pull-pill {
    background: rgba(255, 255, 255, 0.6);
    width: 44px;
}

#creator-promo-banner::before,
.creator-promo-banner::before {
    position: absolute !important;
    top: 50% !important;
    bottom: auto !important;
    right: 12px !important;
    transform: translateY(-50%) translateY(6px) !important;
    opacity: 0 !important;
    transition: opacity 0.25s ease, transform 0.25s ease !important;
    z-index: 15 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 26px !important;
    padding: 0 12px !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #7e22ce 0%, #6b21a8 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.35) !important;
    color: #ffffff !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
    white-space: nowrap !important;
}

#creator-promo-banner:hover::before,
.creator-promo-banner:hover::before {
    opacity: 1 !important;
    transform: translateY(-50%) translateY(0) !important;
}

/* Earnings stats block for mobile (10% + 12%) */
.earn-stats-mobile {
    display: none;
}



/* Creator Program Tab Toggle */
.creator-program-tab {
    display: none;
}

@media (min-width: 901px) and (max-width: 1024px) {
    .earn-stats-mobile-wrapper {
        margin-bottom: 20px;
    }

    .earn-stats-mobile {
        order: 3;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
        border-radius: 12px;
        border: 1px solid rgba(107, 42, 163, 0.12);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
        padding: 10px 16px;
        color: #fff;
        margin-top: 4px;
        cursor: pointer;
    }

    .earn-stats-left {
        display: flex;
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    .earn-stats-right {
        display: flex;
        align-items: center;
        padding-right: 100px;
        /* Space for the "Click here" badge */
    }

    .earn-stats-mobile h3 {
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
        color: #ffffff !important;
    }

    .earn-stats-row {
        display: flex;
        flex-direction: row;
        gap: 16px;
        margin: 0;
        align-items: center;
    }

    .earn-stat-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }

    .earn-stat-percent {
        font-weight: 700;
        color: #0ea5e9;
        font-size: 16px;
    }

    .earn-stat-label {
        font-size: 12px;
        opacity: 0.9;
    }

    .earn-stats-note {
        margin: 0;
        font-size: 11.5px;
        opacity: 0.7;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .creator-program-tab {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        position: relative;
        width: 160px;
        margin: -23px auto 0;
        padding: 6px 16px;
        background-image:
            linear-gradient(180deg, rgba(61, 30, 96, 0.98) 0%, rgba(54, 31, 78, 0.86) 22%, rgba(45, 35, 15, 0.18) 52%, rgba(45, 35, 15, 0) 100%),
            linear-gradient(110deg, #2d230f 0%, #564113 34%, #84661e 50%, #564113 66%, #2d230f 100%);
        background-size: 100% 100%, 180% 100%;
        border: 1px solid rgba(201, 154, 46, 0.72);
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        border-top: none;
        text-align: center;
        color: #fff4c4;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        letter-spacing: 0.5px;
        transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
        animation: creator-tab-gold-flow 10s ease-in-out infinite;
        box-shadow: none;
        z-index: 10;
        user-select: none;
    }

    .creator-program-tab-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

    .creator-program-tab svg {
        width: 12px;
        height: 12px;
    }

    .creator-program-tab.active .creator-program-tab-arrow {
        transform: rotate(180deg);
    }

    .creator-program-tab:hover {
        border-color: #e3b83f;
        box-shadow: none;
    }

    .creator-program-tab:active {
        transform: translateY(-1px);
    }

    .creator-program-tab.active {
        background: linear-gradient(to right, rgba(47, 43, 94, 0.98), rgba(32, 26, 74, 0.98));
        background-size: 100% 100%;
        border-color: rgba(107, 42, 163, 0.55);
        color: #ffffff;
        animation: none;
        box-shadow: none;
    }

    @keyframes creator-tab-gold-flow {
        0%, 100% { background-position: 0 0, 0% 50%; }
        50% { background-position: 0 0, 100% 50%; }
    }

    @media (prefers-reduced-motion: reduce) {
        .creator-program-tab {
            animation: none;
            background-position: 50% 50%;
        }
    }

    .earn-stats-mobile {
        order: 3;
        display: none;
        background: linear-gradient(to right, rgba(38, 35, 78, 0.7), rgba(23, 19, 61, 0.7));
        border-radius: 12px;
        border: 1px solid rgba(107, 42, 163, 0.12);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 6px rgba(126, 34, 206, 0.5) inset;
        padding: 16px;
        margin-bottom: 20px;
        margin-top: -12px;
        color: #fff;
        position: relative;
        overflow: hidden;
        cursor: default;
    }

    .earn-stats-mobile.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

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

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

    .earn-stats-left,
    .earn-stats-right {
        position: relative;
        z-index: 2;
        width: 100%;
    }

    .earn-stats-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 16px;
    }

    .earn-stats-mobile h3 {
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.5px;
        margin: 0;
        text-align: center;
        color: #ffffff !important;
    }

    .earn-stats-row {
        display: flex;
        justify-content: space-around;
        gap: 12px;
        margin-bottom: 12px;
    }

    .earn-stat-item {
        flex: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .earn-stat-percent {
        font-size: 24px;
        font-weight: 900;
        color: #06b6d4;
        line-height: 1;
    }

    .earn-stat-label {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.85);
        font-weight: 500;
    }

    .earn-stats-note {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.75);
        margin: 6px 0 0 0;
        text-align: center;
        font-weight: 400;
    }
}

@media (max-width: 1024px) {
    .creator-promo-banner {
        display: none !important;
    }
}

/* Ensure Hero Slider Banners render ABOVE background chain decoration */
.hero-section,
.hero-center,
#slider-banner,
#creator-promo-banner,
.creator-promo-banner,
.creator-hero {
    position: relative;
    z-index: 3 !important;
}

/* Golden Chain Background Decor for Predictable Cases Section (Desktop/PC) */
.predictable-section-wrapper {
    position: relative;
    width: 100%;
    z-index: 1 !important;
}

.predictable-chain-decor {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%);
    width: 112vw;
    pointer-events: none;
    z-index: -1 !important;
    overflow: visible;
    opacity: var(--chain-zoom-opacity, 1);
    transition: opacity 0.35s ease, filter 0.35s ease;
}

@media (min-width: 1025px) {
    .predictable-chain-decor {
        display: block;
    }
}

@media (min-width: 2100px) {
    .predictable-chain-decor {
        opacity: calc(var(--chain-zoom-opacity, 1) * 0.4);
    }
}

@media (min-width: 2500px) {
    .predictable-chain-decor {
        opacity: 0 !important;
    }
}

.predictable-chain-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    opacity: 0.85;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.65));
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.predictable-section-wrapper > .popular-predictable-header,
.predictable-section-wrapper > .predictable-cases-grid-home {
    position: relative;
    z-index: 2;
}

@media (min-width: 1025px) {
    .predictable-section-wrapper:not(.chain-hidden) .predictable-home-card {
        backdrop-filter: blur(3px) saturate(115%);
        -webkit-backdrop-filter: blur(3px) saturate(115%);
    }
}

.predictable-home-card:hover {
    transform: translateY(-5px) scale(1.01) !important;
}
/* Localized hero cards: JS adjusts this scale only when translated copy overflows. */
#bonus-block,
#invite-block {
    --hero-copy-scale: 1;
}

#bonus-block h3 {
    font-size: calc(1.05rem * var(--hero-copy-scale));
}

#bonus-block p {
    font-size: calc(0.95rem * var(--hero-copy-scale));
    line-height: calc(1.1 + 0.25 * var(--hero-copy-scale));
    margin-bottom: calc(10px * var(--hero-copy-scale));
}

#bonus-block #bonus-balance-text,
#invite-block #invite-link-text {
    overflow-wrap: anywhere;
}

#bonus-block #bonus-balance-text,
#invite-block #invite-link-text {
    font-family: "Outfit", "Montserrat", sans-serif;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.08em;
}

#invite-block h3 {
    font-size: calc(1.25rem * var(--hero-copy-scale));
    margin-bottom: calc(10px * var(--hero-copy-scale));
}

#invite-block p,
#invite-block .invite-steps {
    font-size: calc(0.98rem * var(--hero-copy-scale));
    line-height: calc(1.08 + 0.22 * var(--hero-copy-scale));
    margin-bottom: calc(14px * var(--hero-copy-scale));
}

#invite-block #invite-link-text {
    margin-top: calc(8px * var(--hero-copy-scale));
}

@media (max-width: 900px) {
    #invite-block {
        --hero-copy-scale: 1 !important;
        height: auto !important;
        padding: 16px 18px !important;
    }

    #invite-block h3 {
        font-size: 1.05rem !important;
        margin-bottom: 6px !important;
    }

    #invite-block p,
    #invite-block .invite-steps {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        margin-bottom: 10px !important;
    }

    #bonus-block #bonus-balance-text {
        font-family: "Outfit", "Montserrat", sans-serif;
        font-size: 0.96rem;
        font-weight: 800;
        line-height: 1.1;
        letter-spacing: 0.04em;
    }

    #invite-block #invite-link-text {
        font-family: "Outfit", "Montserrat", sans-serif;
        font-size: 0.96rem;
        font-weight: 800;
        line-height: 1.1;
        letter-spacing: 0.04em;
    }
}

/* Keep localized slider copy inside a readable safe area. */
#slider-banner #slider-content {
    width: 100%;
    padding-inline: clamp(32px, 8vw, 140px);
}

#slider-banner #slider-content h1,
#slider-banner #slider-content p {
    max-width: 100%;
    margin-inline: auto;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    #slider-banner #slider-content {
        padding-inline: 20px;
    }
}

@media (min-width: 901px) {
    #slider-banner .slider-arrows {
        transition: gap 360ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    #slider-banner .slider-arrows.slider-arrows-spread {
        gap: clamp(210px, 24vw, 320px);
    }
}

.home-search-toggle { display: none; }
@media (max-width: 768px) {
    html body :is(#home-filters, #custom-cases-filters) > #selectedSkinsContainer {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin: 0 !important;
        position: static !important;
        box-sizing: border-box !important;
    }
    html body :is(#home-filters, #custom-cases-filters) > #selectedSkinsContainer:empty,
    html body :is(#home-filters, #custom-cases-filters):not(.mobile-search-expanded) > #selectedSkinsContainer { display: none !important; }
    html body :is(#home-filters, #custom-cases-filters) > #selectedSkinsContainer .selected-skin-badge { max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
    html body :is(#home-filters, #custom-cases-filters) .skin-search-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
        height: 38px !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    html body :is(#home-filters, #custom-cases-filters) .skin-type-select-wrap {
        flex: 0 0 88px !important;
        width: 88px !important;
        min-width: 0 !important;
        max-width: 88px !important;
        margin: 0 !important;
    }
    html body :is(#home-filters, #custom-cases-filters) .skin-name-input-wrap {
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
    html body :is(#home-filters, #custom-cases-filters) .search-mode-panel {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }
    html body :is(#home-filters, #custom-cases-filters) .skin-name-input-wrap input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    html body :is(#home-filters, #custom-cases-filters) > .search-mode-row {
        height: 38px !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding-block: 0 !important;
        align-items: center !important;
    }
    html body :is(#home-filters, #custom-cases-filters) .search-mode-panel,
    html body :is(#home-filters, #custom-cases-filters) .case-search-row,
    html body :is(#home-filters, #custom-cases-filters) .case-search-wrap {
        min-height: 0 !important;
        height: auto !important;
        margin-block: 0 !important;
        padding-block: 0 !important;
    }
    html body :is(#home-filters, #custom-cases-filters) {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 10px !important;
        min-height: 56px !important;
    }
    html body.page-home .popular-custom-cases-mobile-link + .custom-cases-header {
        margin-top: 16px !important;
    }
    html body :is(#home-filters, #custom-cases-filters) .home-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 8px;
        background: #514d70;
        color: #fff;
    }
    html body :is(#home-filters, #custom-cases-filters):not(.mobile-search-expanded) > .search-mode-row,
    html body :is(#home-filters, #custom-cases-filters):not(.mobile-search-expanded) .price-filter,
    html body :is(#home-filters, #custom-cases-filters):not(.mobile-search-expanded) .filter-btn.clear {
        display: none !important;
    }
    html body :is(#home-filters, #custom-cases-filters) > .filters-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        flex: 1;
        width: auto !important;
        min-width: 0;
    }
    html body :is(#home-filters, #custom-cases-filters) .filter-buttons {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        gap: 6px !important;
    }
    html body :is(#home-filters, #custom-cases-filters):not(.mobile-search-expanded) .filter-btn {
        flex: none !important;
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        padding: 8px !important;
    }
    html body :is(#home-filters, #custom-cases-filters):not(.mobile-search-expanded) .filter-btn span { display: none !important; }
    html body :is(#home-filters, #custom-cases-filters).mobile-search-expanded > .search-mode-row { flex: 1; width: calc(100% - 44px) !important; }
    html body :is(#home-filters, #custom-cases-filters).mobile-search-expanded > .filters-row {
        flex: 0 0 100% !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    html body :is(#home-filters, #custom-cases-filters).mobile-search-expanded .filter-buttons {
        flex: 0 0 100% !important;
        width: 100% !important;
    }
    html body :is(#home-filters, #custom-cases-filters).mobile-search-expanded .price-filter {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    html body :is(#home-filters, #custom-cases-filters) .price-slider-container,
    html body :is(#home-filters, #custom-cases-filters) .price-range {
        width: 100% !important;
        min-width: 0 !important;
    }
    html body :is(#home-filters, #custom-cases-filters) .price-slider-wrap {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
}

.bonus-card-copy-mobile,
.invite-copy-mobile,
.invite-steps-mobile,
.invite-note-mobile {
    display: none !important;
}

/* Compact mobile copy: preserve the existing card width and only tighten the
   content rhythm, typography, and slider footprint. */
@media (max-width: 768px) {
    html body.page-home .hero-banner {
        margin-top: -20px !important;
        margin-bottom: 12px !important;
    }
    html body.page-home .promo-menu-container:has(:not(.promo_menu_wrapper)) {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
    }
    html body.page-home .promo-menu-container {
        display: none !important;
    }
    html body.page-home .top-loot-container {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    html body.page-home #home-filters ~ .custom-cases-header {
        margin-top: 14px !important;
    }
    html body.page-home #home-filters ~ .custom-cases-header .section-title {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    html body.page-home .hero-banner .banner-content {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        gap: 10px !important;
        margin-bottom: 0 !important;
    }
    html body.page-home .hero-banner .hero-left-col {
        gap: 10px !important;
        margin-block: 0 !important;
    }
    html body.page-home .creator-program-tab {
        width: max-content !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        min-height: 0 !important;
        line-height: 1.15 !important;
        margin-top: -17px !important;
        padding: 5px 12px !important;
        font-size: 12px !important;
        box-sizing: border-box !important;
    }
    html body.page-home .earn-stats-mobile-wrapper:has(.earn-stats-mobile.active) {
        margin-top: 10px !important;
        margin-bottom: 0 !important;
    }
    html body.page-home .earn-stats-mobile.active {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    html body.page-home .hero-banner :is(#bonus-block, #invite-block) {
        margin-block: 0 !important;
    }
    html body.page-home .cases-section {
        margin-top: 12px !important;
        padding-top: 0 !important;
    }
    /* Compact mobile search: keep controls on one clean, non-wrapping row. */
    .mobile-search-bar {
        padding: 8px !important;
    }
    .mobile-search-bar .mobile-search-inner,
    .mobile-search-bar .search-mode-row--mobile,
    .mobile-search-bar .search-mode-panel,
    .mobile-search-bar .mobile-skin-search-row,
    .mobile-search-bar .mobile-case-search-row {
        min-width: 0 !important;
        width: 100% !important;
    }
    .mobile-search-bar .mobile-skin-search-row,
    .mobile-search-bar .mobile-case-search-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
    }
    .mobile-search-bar .mobile-skin-type-select-wrap {
        flex: 0 0 72px !important;
        width: 72px !important;
    }
    .mobile-search-bar .mobile-skin-name-input-wrap {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .mobile-search-bar .mobile-skin-name-input-wrap input,
    .mobile-search-bar .mobile-case-search-row input {
        width: 100% !important;
        min-width: 0 !important;
        padding-inline: 12px !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }
    .mobile-search-bar .mobile-filter-row {
        gap: 6px !important;
        padding-top: 6px !important;
    }
    .mobile-search-bar .mobile-price-filter {
        display: none !important;
    }
    .mobile-search-bar .filter-buttons {
        width: 100% !important;
    }
    .mobile-search-bar .filter-buttons .filter-btn.clear {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    #slider-banner {
        height: 175px !important;
        min-height: 175px !important;
        max-height: 175px !important;
        flex: 0 0 175px !important;
        aspect-ratio: auto !important;
        overflow: hidden !important;
    }

    #slider-banner #slider-content {
        padding: 8px 18px 14px !important;
        width: 100% !important;
        margin-left: 0 !important;
        transform: none !important;
        transform-origin: center center !important;
    }

    #slider-banner #slider-content h1 {
        font-size: clamp(18px, 5.2vw, 24px) !important;
        line-height: 1.1 !important;
        margin-bottom: 6px !important;
    }

    #slider-banner #slider-content p {
        font-size: 11px !important;
        line-height: 1.25 !important;
    }

    .lorem-block,
    .invite-friends-bonus {
        padding: 12px 14px !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .lorem-block h3,
    .invite-friends-bonus h3 {
        margin-bottom: 5px !important;
    }

    .lorem-block p,
    .invite-friends-bonus p,
    .invite-friends-bonus ol,
    .invite-steps,
    .invite-friends-bonus a {
        overflow-wrap: anywhere !important;
    }

    .invite-friends-bonus ol,
    .invite-steps {
        margin-block: 6px !important;
        padding-left: 18px !important;
    }

    /* This shortcut duplicates the drawer entry on phones. */
    .page-home .filters-custom-cases-row-mobile {
        display: none !important;
    }

    .bonus-card-copy-full,
    .invite-copy-full,
    .invite-steps-full,
    .invite-note-full {
        display: none !important;
    }

    /* Mobile cards stay compact; detailed guidance is available in popups. */
    .bonus-card-copy-mobile,
    .invite-copy-mobile,
    .invite-steps-mobile,
    .invite-note-mobile {
        display: none !important;
    }
}
