* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.app-container {
    max-width: 750px;
    margin: 0 auto;
    background-color: #f5f5f5;
    min-height: 100vh;
}


.search-header {
    background-color: #fff;
    padding: 15px 15px 10px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
    margin-top: 5px;
    text-align: center;
}

.search-box {
    background-color: #f2f2f5;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
}

.search-icon {
    color: #a0a0a0;
    margin-right: 8px;
    font-size: 14px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: #333;
}

.search-box input::placeholder {
    color: #999;
}


.game-icons-section {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 10px;
}

.game-icons-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.game-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.game-icon-img-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-icon-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-icon-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}


.filter-section {
    position: sticky;
    top: 52px;
    /* below search */
    z-index: 99;
}

.filter-tabs {
    display: flex;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 100;
}

.filter-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    font-size: 14px;
    color: #333;
    position: relative;
    cursor: pointer;
}

.filter-tab:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 14px;
    width: 1px;
    background-color: #eee;
}

.filter-tab i {
    font-size: 12px;
    margin-left: 4px;
    color: #ccc;
}

.filter-tab.active {
    font-weight: bold;
}


.product-list-section {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    position: relative;
    background-color: #eee;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 15px;
    font-weight: normal;
    color: #333;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-server {
    font-size: 12px;
    color: #999;
}

.product-price {
    color: #ff3b30;
    font-size: 12px;
    font-weight: bold;
}

.product-price span {
    font-size: 18px;
}


.filter-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 98;
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.dropdown-header {
    display: flex;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-title {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    font-size: 15px;
    font-weight: bold;
    color: #4a5ee5;
    /* Blue text from screenshot */
}

.dropdown-body {
    display: flex;
    height: 280px;
}

.dropdown-col {
    flex: 1;
    overflow-y: auto;
}

.left-col {
    background-color: #f5f6f9;
    /* Light grey */
    padding-top: 10px;
    border-bottom-left-radius: 12px;
}

.right-col {
    background-color: #fff;
}

.dropdown-list {
    list-style: none;
}

.dropdown-item {
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.dropdown-item.active {
    color: #4a5ee5;
    background-color: #ebeeff;
}

.dropdown-footer {
    display: flex;
    padding: 15px 20px;
    gap: 15px;
    background-color: #fff;
    border-top: 1px solid #f5f5f5;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.btn-clear,
.btn-confirm {
    flex: 1;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 15px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-clear {
    background-color: #f5f6fa;
    color: #4a5ee5;
}

.btn-confirm {
    background-color: #4a5ee5;
    color: #fff;
}


.single-col {
    padding: 10px 0;
}

.full-width {
    width: 100%;
}

.text-left {
    text-align: left;
    padding-left: 20px;
    background-color: transparent !important;
    /* Override active background for basic lists */
}


.price-filter {
    padding: 20px 20px 0;
}

.price-input-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 15px;
}

.price-input-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.price-input {
    flex: 1;
    background-color: #f5f6fa;
    border: none;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    text-align: center;
    color: #333;
    outline: none;
}

.price-input::placeholder {
    color: #bbb;
}

.price-separator {
    color: #ccc;
    margin: 0 10px;
}


.text-xs {
    font-size: 12px;
}

.text-gray {
    color: #999;
}

.text-blue {
    color: #4a5ee5;
}

.text-white {
    color: #fff;
}

.bg-clear {
    background-color: #f5f6fa;
}

.bg-confirm {
    background-color: #4a5ee5;
}

.bg-gray {
    background-color: #f5f6fa !important;
}

.rounded-lg {
    border-radius: 12px;
}

.border-bottom-none {
    border-bottom: none !important;
}


.filter-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 50vh;
    /* Adjust max height */
    background-color: #fff;
    z-index: 101;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transition: transform 0.3s ease-out;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 15px;
    padding-bottom: 20px;
    padding-top: 20px;

}

.drawer-section {
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.drawer-section-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.drawer-tags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.drawer-tag {
    background-color: #f5f6fa;
    color: #333;
    font-size: 12px;
    text-align: center;
    padding: 8px 4px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-tag.active {
    background-color: #ebeeff;
    color: #4a5ee5;
    font-weight: 500;
}

.drawer-expand {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding-top: 12px;
    cursor: pointer;
}

.drawer-expand i {
    font-size: 10px;
    margin-left: 2px;
}

.drawer-footer {
    display: flex;
    padding: 15px 20px;
    gap: 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
    padding-bottom: env(safe-area-inset-bottom, 15px);
    /* iOS safety area support */
}