/* style.css - Optimized Taobao Style */
:root {
    --main-red: #FF0036;
    --main-orange: #FF5500;
    --light-bg: #F5F5F5;
    --dark-text: #333;
    --border-color: #E5E5E5;
    --shadow: 0 2px 6px rgba(0,0,0,0.05);
    --shadow-hover: 0 5px 15px rgba(255, 0, 54, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    background: url('locker33.jpg') center/cover fixed;
    font-family: "Tahoma", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--dark-text);
}

.main-container {
    width: 100%;
    max-width: 1200px;
}

header, nav, section, footer {
    width: 100%;
    margin: 10px 0;
    padding: 20px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
}

/* HEADER */
header {
    text-align: center;
    background: linear-gradient(to right, var(--main-red), var(--main-orange));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 0, 54, 0.3);
}

h1 {
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    font-size: 2.5em;
}

h2 {
    color: var(--main-red);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #FFE5E5;
}

/* NAV BAR */
nav {
    text-align: center;
    box-shadow: var(--shadow);
}

nav a {
    color: var(--main-red);
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover {
    color: white;
    background: var(--main-red);
}

/* SECTIONS */
section {
    box-shadow: var(--shadow);
}

/* AVATAR */
.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--main-red);
    display: block;
    margin: 10px auto;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(255, 0, 54, 0.3);
    animation: spin 6s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.avatar:hover {
    animation-duration: 2s;
    filter: drop-shadow(0 0 8px var(--main-red));
}

/* PRODUCT GRID - FIXED SMALLER CARDS */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    width: 100%;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    max-width: 180px;
    margin: 0 auto;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 2px solid #FFE5E5;
}

.product-card h3 {
    padding: 8px;
    text-align: center;
    font-weight: bold;
    color: var(--dark-text);
    font-size: 0.9em;
    margin: 0;
    line-height: 1.2;
}

.price {
    color: var(--main-red);
    font-size: 0.95em;
    text-align: center;
    padding: 0 8px 8px;
    margin: 0;
    font-weight: bold;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.8em;
    margin-right: 4px;
}

/* LABELS */
.new-label, .sale-label {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.6em;
    font-weight: bold;
    color: white;
}

.new-label {
    background: var(--main-red);
}

.sale-label {
    background: var(--main-orange);
}

/* SCROLL CONTAINER */
.scroll-container {
    background: white;
    overflow-x: auto;
    white-space: nowrap;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--main-red) white;
    border: 1px solid var(--border-color);
    width: 100%;
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #FFE5E5;
    border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--main-red);
    border-radius: 4px;
}

.scroll-container img {
    height: 150px;
    width: auto;
    max-width: 250px;
    min-width: 120px;
    margin: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    object-fit: cover;
    vertical-align: middle;
    transition: transform 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.scroll-container img:hover {
    transform: scale(1.05);
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(255, 0, 54, 0.2);
    border-color: var(--main-red);
}

/* STEAM PROFILE */
#steam-profile {
    background: white;
    overflow: hidden;
}

.steam-banner {
    height: 150px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #1B2838;
}

.steam-avatar {
    width: 100px;
    height: 100px;
    border: 3px solid var(--main-red);
    border-radius: 50%;
    position: absolute;
    bottom: -50px;
    left: 20px;
    background-size: cover;
    background-position: center;
    background-color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.steam-info {
    padding: 60px 20px 20px;
    color: var(--dark-text);
}

.steam-info h2 {
    color: var(--main-red);
    margin: 0;
    font-size: 1.8em;
}

.steam-badges {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.steam-badges span {
    background: rgba(255, 0, 54, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #FFE5E5;
    color: var(--main-red);
}

/* BUTTONS */
.btn {
    background: var(--main-red);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--main-orange);
    transform: scale(1.05);
}

/* FOOTER & MARQUEE */
footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
}

marquee {
    color: var(--main-red);
    font-weight: bold;
    margin-bottom: 15px;
    padding: 8px;
    background: #FFF0F0;
    border-radius: 4px;
}

.counter {
    background: var(--main-red);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 5px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .item-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .product-card {
        max-width: 150px;
    }
    
    .product-image {
        height: 120px;
    }
}

@media (max-width: 600px) {
    .item-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        max-width: none;
    }
    
    .product-image {
        height: 110px;
    }
    
    .scroll-container img {
        height: 130px;
        max-width: 200px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .avatar {
        width: 120px;
        height: 120px;
    }
    
    header, nav, section, footer {
        padding: 15px;
    }
}