/* ===== 全局样式 ===== */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    background-color: #000c1f;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 15% 50%, rgba(43, 85, 206, 0.15), transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(100, 50, 255, 0.08), transparent 50%);
    background-size: 50px 50px, 50px 50px, 100% 100%, 100% 100%;
    background-attachment: fixed;
    overflow-x: hidden;
    scrollbar-width: none;
    min-height: 100vh;
    color: #cccccc;
}

::-webkit-scrollbar {
    display: none;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(0, 12, 31, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s;
}

.navbar:hover {
    background-color: #fff;
}

.navbar:hover .company-name {
    color: #000;
}

.navbar:hover .nav-menu a {
    color: #333;
}

.navbar:hover .nav-menu a.active {
    color: #2b55ce;
    font-weight: bold;
}

.nav-container {
    width: 90%;
    max-width: 1800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo-img {
    height: 24px;
    filter: invert(1) brightness(2);
    transition: filter 0.3s ease;
}

.company-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: #cccccc;
    text-decoration: none;
    font-size: 17px;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #2b55ce;
    font-weight: bold;
}

/* ===== 用户状态栏 ===== */
.user-bar {
    position: fixed;
    top: 70px;
    right: 0;
    background-color: rgba(0, 12, 31, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.user-bar-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-status, .user-logged-in {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-login, .btn-register {
    padding: 8px 16px;
    border: 1px solid #2b55ce;
    border-radius: 5px;
    text-decoration: none;
    color: #2b55ce;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.btn-login:hover {
    background-color: #2b55ce;
    color: #fff;
}

.btn-register {
    background-color: #2b55ce;
    color: #fff;
}

.btn-register:hover {
    background-color: #1e3fa5;
}

.btn-seller-center, .btn-logout {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    background-color: #2b55ce;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.btn-seller-center:hover, .btn-logout:hover {
    background-color: #1e3fa5;
}

#userNameDisplay {
    color: #fff;
    font-size: 14px;
}

/* ===== 主容器 ===== */
.mall-container {
    max-width: 1800px;
    margin: 140px auto 40px;
    padding: 0 20px;
}

.mall-header {
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

.mall-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(43, 85, 206, 0.5);
}

.mall-header p {
    font-size: 1.1rem;
    color: #999;
}

/* ===== 搜索栏 ===== */
.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    justify-content: center;
}

.search-input {
    padding: 12px 20px;
    width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2b55ce;
    background-color: rgba(255, 255, 255, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 12px 30px;
    background-color: #2b55ce;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: #1e3fa5;
    box-shadow: 0 0 20px rgba(43, 85, 206, 0.5);
}

/* ===== 分类筛选 ===== */
.filter-section {
    margin-bottom: 40px;
}

.category-filter {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #2b55ce;
    color: #fff;
    border-color: #2b55ce;
}

/* ===== 商品网格 ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #2b55ce;
    box-shadow: 0 0 20px rgba(43, 85, 206, 0.3);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(43, 85, 206, 0.2), rgba(100, 50, 255, 0.2));
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-category {
    display: inline-block;
    font-size: 12px;
    color: #2b55ce;
    background-color: rgba(43, 85, 206, 0.2);
    padding: 4px 8px;
    border-radius: 3px;
    margin-bottom: 12px;
    width: fit-content;
}

.product-seller {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #2b55ce;
    margin: 10px 0;
}

.product-stock {
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
}

.product-button {
    padding: 10px 15px;
    background-color: #2b55ce;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.product-button:hover {
    background-color: #1e3fa5;
}

/* ===== 无商品提示 ===== */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-products h2 {
    font-size: 24px;
    color: #cccccc;
    margin-bottom: 10px;
}

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: rgba(0, 12, 31, 0.95);
    margin: 5% auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #2b55ce;
}

.modal-body {
    display: flex;
    gap: 30px;
    padding: 30px;
}

.modal-product-image {
    width: 40%;
    max-width: 400px;
    border-radius: 10px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(43, 85, 206, 0.2), rgba(100, 50, 255, 0.2));
}

.modal-product-info {
    flex: 1;
    color: #cccccc;
}

.modal-product-info h2 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 15px;
}

.modal-product-info p {
    margin: 12px 0;
    line-height: 1.6;
}

.product-price-section {
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 15px 0;
}

.product-details {
    color: #999;
    font-size: 14px;
}

/* ===== 页脚 ===== */
.footer {
    background-color: rgba(0, 12, 31, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col {
    color: #999;
}

.footer-company-name {
    color: #fff;
    font-size: 16px;
    margin-bottom: 10px;
}

.footer-company-en {
    font-size: 13px;
    color: #666;
}

.footer-heading {
    color: #fff;
    font-size: 14px;
    margin-bottom: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.contact-icon {
    color: #2b55ce;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s ease;
    color: #999;
}

.social-icon:hover {
    border-color: #2b55ce;
    color: #2b55ce;
}

.social-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #666;
    font-size: 13px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px 20px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 14px;
    }

    .search-input {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-product-image {
        width: 100%;
        max-width: 100%;
    }

    .user-bar {
        right: auto;
        left: 0;
        width: 100%;
        border-left: none;
        border-right: none;
        padding: 10px 15px;
        box-sizing: border-box;
    }

    .user-bar-content {
        justify-content: center;
        width: 100%;
    }

    .mall-container {
        margin-top: 170px;
    }
}
