@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Noto Sans SC', Arial, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #e0e0e0;
    line-height: 1.6;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 15px; }

header {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
header .container { display: flex; justify-content: space-between; align-items: center; }
h1 { font-size: 1.8rem; background: linear-gradient(to right, #00ffcc, #ff00cc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

nav a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
nav a:hover { color: #00ffcc; }

.search-bar {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    text-align: center;
    margin: 20px 0;
}
.search-bar form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.search-bar input {
    padding: 12px 20px;
    flex: 1;
    min-width: 220px;
    border: none;
    border-radius: 50px;
    background: rgba(255,255,255,0.9);
    color: #333;
    font-size: 16px;
}
.search-bar button {
    padding: 12px 30px;
    background: #00ffcc;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .search-bar form {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    .search-bar input {
        min-width: auto;
    }
}

/* 轮播 */
.carousel {
    position: relative;
    height: 420px;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 12px;
}
.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    background-size: cover;
    background-position: center;
}
.carousel-slide.active { opacity: 1; }
.carousel-dot {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}
.dot.active { background: #00ffcc; transform: scale(1.3); }

/* 分类 */
.categories {
    margin: 20px 0 30px;
    padding: 10px;
}
.category-header {
    display: none;
    background: rgba(255,255,255,0.1);
    padding: 14px 20px;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    text-align: center;
    margin-bottom: 10px;
    border: 1px solid rgba(0,255,204,0.3);
}
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.category-list a {
    padding: 10px 24px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    border: 1px solid rgba(0,255,204,0.3);
}
.category-list a:hover, .category-list a.active {
    background: #00ffcc;
    color: #000;
    transform: translateY(-2px);
}

/* 移动端折叠 */
@media (max-width: 768px) {
    .category-header {
        display: block;
    }
    .category-list {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .category-list.show {
        display: flex;
    }
    .categories a {
        width: 90%;
        max-width: 300px;
        text-align: center;
    }
}

/* 商品卡片 */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.product-card {
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid rgba(0,255,204,0.2);
}
.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 255, 204, 0.15);
}
.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.product-card h3 {
    padding: 16px 16px 8px;
    font-size: 1.1rem;
}
.price {
    color: #00ffcc;
    font-size: 1.35rem;
    font-weight: 700;
    padding: 0 16px;
}
.product-card p {
    padding: 0 16px 16px;
    opacity: 0.9;
}
.btn {
    display: block;
    width: 90%;
    margin: 0 auto 20px;
    padding: 14px;
    background: linear-gradient(90deg, #00ffcc, #ff00cc);
    color: #000;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s;
}
.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,255,204,0.4);
}

/* 商品详情页 */
.product-detail {
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 40px;
    margin: 30px auto;
    max-width: 900px;
}
.product-detail img {
    max-width: 100%;
    border-radius: 16px;
    margin-bottom: 25px;
}
.product-detail h1 { font-size: 2.2rem; margin-bottom: 15px; }
.product-detail .price { font-size: 2rem; margin: 15px 0; }

/* 后台美化 */
.admin-container {
    background: rgba(0,0,0,0.6);
    padding: 30px;
    border-radius: 16px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
th { background: rgba(0,255,204,0.2); }
.btn-small {
    padding: 6px 14px;
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .products { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .carousel { height: 280px; }
}
