main {
    padding: 20px;
    background-color: #1a1a1a;
    min-height: 100vh;
}

.market-container {
    max-width: 1400px;
    margin: 0 auto;
}

.market-header {
    text-align: left;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.market-title-group {
    display: flex;
    flex-direction: column;
}

.market-header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    text-align: left;
    display: block;
}

.market-subtitle {
    color: #888;
    font-size: 1rem;
    margin: 5px 0 0 0;
}

.toggle-buttons {
    text-align: center;
    display: flex;
    gap: 10px;
    order: 2;
}

.toggle-btn {
    background-color: #2a2a2a;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0px;
}

.toggle-btn.active {
    background-color: #e91e63;
    color: white;
}

.toggle-btn:hover:not(.active) {
    background-color: #3a3a3a;
}

.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
    flex: 1;
}

.stat-icon {
    font-size: 24px;
    opacity: 0.8;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #888;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-value {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.market-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.items-section {
    flex: 1;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    padding: 20px;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.section-header h2 {
    color: #fff;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    order: 1;
    flex: 1;
}

.filter-input {
    background-color: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    font-size: 14px;
    width: 200px;
    order: 3;
}

.filter-input::placeholder {
    color: #666;
}

.items-table {
    width: 100%;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr;
    background-color: #1a1a1a;
    padding: 15px 20px;
    border-bottom: 1px solid #3a3a3a;
}

.header-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

.sort-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    margin: 0px;
    padding: 2px 5px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    background-color: #3a3a3a;
    color: #fff;
}


.sort-btn.sort-active:hover {
    background-color: #0056b3;
}

.table-body {
    max-height: 500px;
    overflow-y: auto;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr;
    padding: 15px 20px;
    border-bottom: 1px solid #3a3a3a;
    transition: background-color 0.2s ease;
}

.table-row:hover {
    background-color: #2a2a2a;
}

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

.item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-icon img {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
}

.item-name {
    color: #fff;
    font-size: 14px;
}

.seller-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seller-avatar {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    image-rendering: pixelated;
}

.seller-name {
    color: #fff;
    font-size: 14px;
}

.stock-cell, .price-cell {
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.store-details {
    width: 300px;
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.store-details h3 {
    color: #fff;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.rating-label {
    color: #888;
    font-size: 14px;
}

.rating-value {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.progress-item {
    margin-bottom: 20px;
}

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

.progress-label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.progress-percentage {
    color: #888;
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e91e63, #e91e63);
    border-radius: 3px;
    transition: width 0.3s ease;
}

@media (max-width: 1200px) {
    .market-content {
        flex-direction: column;
    }
    
    .store-details {
        width: 100%;
    }
}

@media (max-width: 768px) {
    main {
        padding: 10px;
    }
    
    .market-container {
        width: 100%;
        max-width: none;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-card {
        min-width: auto;
        padding: 15px;
    }
    
    .market-content {
        gap: 20px;
    }
    
    .items-section {
        width: 100%;
        max-width: none;
    }
    
    .section-header {
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-input {
        width: 100%;
        max-width: none;
    }
    
    .table-header, .table-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .header-cell, .item-cell, .seller-cell, .stock-cell, .price-cell {
        justify-content: flex-start;
    }
    
    .table-row {
        display: block;
        border-bottom: 2px solid #3a3a3a;
        padding: 15px;
    }
    
    .table-row > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        border-bottom: 1px solid #333;
    }
    
    .table-row > div:last-child {
        border-bottom: none;
    }
    
    .item-cell::before { content: "Item: "; font-weight: bold; color: #888; }
    .seller-cell::before { content: "Seller: "; font-weight: bold; color: #888; }
    .stock-cell::before { content: "Stock: "; font-weight: bold; color: #888; }
    .price-cell::before { content: "Price: "; font-weight: bold; color: #888; }
    
    .table-header {
        display: none;
    }
}

h2 {
    color: #f0f0f0;
    text-align: left;
    font-weight: 400;
    margin: 10px;
}

img {
    display: inline-block;
}

.buy-prices {
    width: 500px;
}

.sell-prices {
    width: 500px;
}

.shop {
    width: 300px;
}

.user-img {
    margin-left: 20px;
    height: 25px;
}

.shop p {
    float: left;
}

hr {
    padding: 4px;
}

h1 {
    padding: 0px;
}

h1::first-letter {
    text-transform: capitalize;
}