:root {
    --primary: #f1d3f2;
    --primary-hover: #e8c0e9;
    --primary-dark: #4d22d5;
    --accent: #f1d3f2;
    --bg: #fff8fe;
    --bg-soft: #fff8fe;
    --text-main: #4d22d5;
    --text-muted: #7a5cd6;
    --border: #4d22d5;
    --shadow: rgba(77, 34, 213, 0.2);
    --window-bg: #fff8fe;
    --window-border: #87d3ee;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #FFF0F5;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: "MS Gothic", "SimSun", "Microsoft YaHei", monospace;
    line-height: 1.6;
    position: relative;
    image-rendering: pixelated;
}

/* 背景装饰 - 斜条纹 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 35px,
        rgba(241, 211, 242, 0.3) 35px,
        rgba(241, 211, 242, 0.3) 70px
    );
    pointer-events: none;
    z-index: -1;
}

/* 背景装饰 - 漂浮元素 */
body::after {
    content: "⭐  💖 ⭐ 🌙 💖 ⭐ 🌙 💖";
    position: fixed;
    top: 10%;
    left: 5%;
    font-size: 24px;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

[hidden] {
    display: none !important;
}

/* ===== Win98 弹窗分隔条 ===== */
.modal-separator {
    height: 6px;
    background: #87d3ee;
    flex-shrink: 0;
}

/* ===== 导航栏 ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: 64px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f1d3f2;
    color: #4d22d5;
    box-shadow: 0 4px 0 #4d22d5;
    border-bottom: 3px solid #4d22d5;
}

.logo {
    color: #4d22d5;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    flex-shrink: 0;
    font-family: "MS Gothic", "SimSun", monospace;
}

.logo span {
    color: rgba(77, 34, 213, 0.6);
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    color: #4d22d5;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.2s;
    font-family: "MS Gothic", "SimSun", monospace;
}

nav a:hover {
    color: #7a5cd6;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 400px;
    height: 40px;
    padding: 0 4px 0 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #4d22d5;
    border-radius: 0;
    transition: all 0.2s;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.7);
    border-color: #4d22d5;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #4d22d5;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.search-box input::placeholder {
    color: rgba(77, 34, 213, 0.5);
}

.search-box button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #4d22d5;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: rgba(241, 211, 242, 0.5);
}

.search-box svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 手机端搜索按钮 */
.search-toggle {
    display: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px 0 #4d22d5;
    align-items: center;
    justify-content: center;
}

.search-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-toggle:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

/* 购物车按钮 */
.cart-button {
    flex-shrink: 0;
    border: 2px solid #4d22d5;
    border-radius: 0;
    padding: 8px 16px;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.cart-button:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero 区域 ===== */
.hero {
    padding: 80px 5% 90px;
    background: #fff8fe;
    border-bottom: 3px solid #4d22d5;
    text-align: center;
    position: relative;
}

.hero::before {
    content: "⭐ 💖 ⭐";
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    opacity: 0.6;
}

.eyebrow {
    color: #4d22d5;
    font-size: 12px;
    letter-spacing: 3px;
    font-weight: bold;
    text-transform: uppercase;
    font-family: "MS Gothic", "SimSun", monospace;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.3;
    margin: 16px 0 20px;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.hero-desc {
    color: #7a5cd6;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
}

/* ===== 按钮 ===== */
.primary-button {
    display: inline-block;
    margin-top: 28px;
    padding: 14px 32px;
    background: #f1d3f2;
    color: #4d22d5;
    border: 3px solid #4d22d5;
    border-radius: 0;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.primary-button:hover {
    background: #e8c0e9;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #4d22d5;
}

.primary-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #4d22d5;
}

/* ===== 商品区域 ===== */
.products-section {
    padding: 60px 5%;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-heading h2 {
    font-size: 28px;
    font-weight: bold;
    font-family: "MS Gothic", "SimSun", monospace;
    color: #4d22d5;
}

.section-heading > p {
    color: #7a5cd6;
    font-size: 13px;
    font-family: "MS Gothic", "SimSun", monospace;
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: #ebb6ff;
    border: 3px solid #4d22d5;
    border-radius: 0;
    padding: 16px;
    transition: all 0.25s;
    box-shadow: 4px 4px 0 #4d22d5;
}

.product-card:hover {
    border-color: #4d22d5;
    box-shadow: 6px 6px 0 #4d22d5;
    transform: translate(-2px, -2px);
}

.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    background: #fff8fe;
    border-radius: 0;
    border: 2px solid #4d22d5;
}

.category {
    margin-top: 14px;
    color: #4d22d5;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.product-card h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 6px 0 12px;
    font-family: "MS Gothic", "SimSun", monospace;
    color: #4d22d5;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.add-button {
    padding: 8px 14px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.add-button:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.add-button:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #4d22d5;
}

/* ===== 购物车侧边栏 ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(77, 34, 213, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1001;
    width: min(400px, 100%);
    height: 100vh;
    height: 100dvh;
    padding: 0;
    background: #fff8fe;
    border-left: 3px solid #4d22d5;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
    box-shadow: -8px 0 0 #4d22d5;
}

.cart-drawer.open {
    transform: translateX(0);
    visibility: visible;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f1d3f2;
    border-bottom: 2px solid #4d22d5;
}

.cart-header h2 {
    font-size: 16px;
    font-weight: bold;
    color: #4d22d5;
    margin: 0;
    font-family: "MS Gothic", "SimSun", monospace;
}

.cart-header h2::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #4d22d5;
    margin-right: 8px;
    vertical-align: middle;
}

.close-cart {
    width: 28px;
    height: 28px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0 #4d22d5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-cart:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.cart-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 24px;
}

.empty-cart {
    padding: 40px 16px;
    text-align: center;
    color: #7a5cd6;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff8fe;
    border: 2px solid #4d22d5;
    border-radius: 0;
    box-shadow: 2px 2px 0 #4d22d5;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: bold;
    font-family: "MS Gothic", "SimSun", monospace;
    color: #4d22d5;
}

.cart-item-price {
    margin-top: 4px;
    color: #4d22d5;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-control button {
    width: 28px;
    height: 28px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px 0 #4d22d5;
}

.quantity-control button:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.quantity-control span {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    font-family: "MS Gothic", "SimSun", monospace;
    color: #4d22d5;
}

.remove-item {
    margin-top: 8px;
    padding: 4px 0;
    border: none;
    background: transparent;
    color: #7a5cd6;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
    font-family: "MS Gothic", "SimSun", monospace;
}

.remove-item:hover {
    color: #4d22d5;
}

.cart-footer {
    flex-shrink: 0;
    padding: 16px 24px 24px;
    border-top: 2px solid #4d22d5;
    background: #fff8fe;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-total strong {
    font-size: 24px;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.checkout-button {
    width: 100%;
    padding: 14px;
    border: 3px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.checkout-button:hover {
    background: #e8c0e9;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #4d22d5;
}

.checkout-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #4d22d5;
}

.cart-note {
    margin: 12px 0 0;
    color: #7a5cd6;
    text-align: center;
    font-size: 12px;
    font-family: "MS Gothic", "SimSun", monospace;
}

body.cart-open {
    overflow: hidden;
}

/* ===== Footer ===== */
footer {
    padding: 24px 5%;
    text-align: center;
    color: #7a5cd6;
    border-top: 3px solid #4d22d5;
    background: #fff8fe;
    font-size: 13px;
    font-family: "MS Gothic", "SimSun", monospace;
}

footer::before {
    content: "🌙  💖 ⭐ 🌙";
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    opacity: 0.6;
}

/* ===== 公告按钮 ===== */
.notice-button {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 #4d22d5;
}

.notice-button:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

/* ===== 欢迎弹窗 ===== */
.notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(77, 34, 213, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.notice-overlay.open {
    opacity: 1;
    visibility: visible;
}

.notice-modal {
    position: fixed;
    inset: 0;
    z-index: 2001;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.notice-modal.open {
    opacity: 1;
    visibility: visible;
}

.notice-content {
    padding: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    background: #87d3ee;
    border: 3px solid #4d22d5;
    border-radius: 0;
    box-shadow: 
        6px 6px 0 #4d22d5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-top: 4px;
    margin-left:1px ;
    margin-right: 1px;
    background: #f1d3f2;
    border: 3px solid #4d22d5;
    cursor: grab;
    user-select: none;
}

.notice-header h2 {
    font-size: 16px;
    font-weight: bold;
    color: #4d22d5;
    margin: 0;
    font-family: "MS Gothic", "SimSun", monospace;
}

.notice-header h2::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #4d22d5;
    margin-right: 8px;
    vertical-align: middle;
}

.close-notice {
    width: 28px;
    height: 28px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 #4d22d5;
}

.close-notice:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.notice-body {
    padding: 24px;
    padding-bottom: 25px;
    margin-left:1px ;
    margin-right:1px ;
    margin-bottom: 13px;
    border: 3px solid #4d22d5;
    background: #fff8fe;
    overflow-y: auto;
    flex: 1;
}

.notice-body p {
    margin: 0 0 12px;
    line-height: 1.7;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.notice-body strong {
    color: #4d22d5;
    font-size: 16px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.notice-warning {
    margin-top: 16px;
    padding: 16px;
    background: #FFF3CD;
    border: 2px solid #FFCC00;
    border-radius: 0;
    box-shadow: 2px 2px 0 #FFCC00;
}

.notice-warning p {
    margin: 0 0 8px;
    font-weight: bold;
    color: #996600;
    font-family: "MS Gothic", "SimSun", monospace;
}

.notice-warning ul {
    margin: 0;
    padding-left: 20px;
    color: #996600;
}

.notice-warning li {
    margin: 4px 0;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.notice-footer {
    margin-top: 16px;
    padding: 12px 0 4px;
    text-align: center;
}

.agree-button {
    width: 100%;
    padding: 14px;
    border: 3px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.agree-button:hover {
    background: #e8c0e9;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #4d22d5;
}

.agree-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #4d22d5;
}

body.notice-open {
    overflow: hidden;
}

/* ===== 商品详情弹窗 ===== */
.product-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(77, 34, 213, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.product-overlay.open {
    opacity: 1;
    visibility: visible;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 1501;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.product-modal.open {
    opacity: 1;
    visibility: visible;
}

.product-modal-content {
    padding: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    background: #87d3ee;
    border: 3px solid #4d22d5;
    border-radius: 0;
    box-shadow: 
        inset 2px 2px 0 #fff,
        inset -1px -1px 0 #808080,
        6px 6px 0 #4d22d5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.product-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-top: 4px;
    margin-left: 1px;
    margin-right: 1px;
    background: #f1d3f2;
    border: 3px solid #4d22d5;
    cursor: grab;
    user-select: none;
}

.product-modal-header h2 {
    font-size: 16px;
    font-weight: bold;
    color: #4d22d5;
    margin: 0;
    font-family: "MS Gothic", "SimSun", monospace;
}

.product-modal-header h2::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #4d22d5;
    margin-right: 8px;
    vertical-align: middle;
}

.close-product {
    width: 28px;
    height: 28px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 #4d22d5;
}

.close-product:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.product-modal-body {
    padding: 24px;
    padding-bottom: 25px;
    margin-left: 1px;
    margin-right: 1px;
    margin-bottom: 13px;
    border: 3px solid #4d22d5;
    background: #fff8fe;
    overflow-y: auto;
    flex: 1;
}

.product-modal-image {
    width: 100%;
    height: 180px;
    background: #fff8fe;
    border: 2px solid #4d22d5;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    margin-bottom: 16px;
}

.product-modal-category {
    color: #4d22d5;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.product-modal-body h3 {
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 12px;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.product-modal-desc {
    color: #7a5cd6;
    line-height: 1.7;
    margin: 0 0 20px;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.product-modal-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #4d22d5;
}

.product-modal-price span:first-child {
    font-size: 28px;
    font-weight: bold;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.product-modal-unit {
    color: #7a5cd6;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.product-modal-footer {
    margin-top: 16px;
    padding: 12px 0 4px;
    text-align: center;
}

.add-button-modal {
    width: 100%;
    padding: 14px;
    border: 3px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.add-button-modal:hover {
    background: #e8c0e9;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #4d22d5;
}

.add-button-modal:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #4d22d5;
}

body.product-open {
    overflow: hidden;
}

/* 商品卡片可点击 */
.product-card {
    cursor: pointer;
    background: #e8c0e9;;
    border: 3px solid #4d22d5;
    border-radius: 0;
    box-shadow: 4px 4px 0 #4d22d5;
    transition: all 0.2s;
}

.product-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #4d22d5;
    border-color: #4d22d5;
}

.product-card:hover .product-image {
    transform: scale(1.02);
}

.product-image {
    transition: transform 0.3s ease;
    background: #fff8fe;
    border: 2px solid #4d22d5;
    border-radius: 0;
}

/* ===== 公告页面 ===== */
.announcements-section {
    padding: 60px 5%;
    min-height: 60vh;
}

.post-notice-btn {
    padding: 8px 16px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.post-notice-btn:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announcement-card {
    background: #fff8fe;
    border: 3px solid #4d22d5;
    border-radius: 0;
    padding: 20px;
    box-shadow: 4px 4px 0 #4d22d5;
    position: relative;
}

.announcement-card.important {
    border-color: #ff6b9d;
    box-shadow: 4px 4px 0 #ff6b9d;
    background: #fff0f5;
}

.announcement-card.important::before {
    content: "置顶";
    position: absolute;
    top: -12px;
    right: 16px;
    background: #ff6b9d;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.announcement-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4d22d5;
}

.announcement-author {
    font-size: 13px;
    font-weight: bold;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.announcement-date {
    font-size: 12px;
    color: #7a5cd6;
    font-family: "MS Gothic", "SimSun", monospace;
}

.announcement-title {
    font-size: 18px;
    font-weight: bold;
    color: #4d22d5;
    margin: 0 0 12px;
    font-family: "MS Gothic", "SimSun", monospace;
}

.announcement-content {
    font-size: 14px;
    color: #4d22d5;
    line-height: 1.8;
    font-family: "MS Gothic", "SimSun", monospace;
    white-space: pre-wrap;
}

.announcement-delete {
    position: absolute;
    bottom: 12px;
    right: 16px;
    padding: 4px 10px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.announcement-delete:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.empty-announcements {
    text-align: center;
    padding: 60px 20px;
    color: #7a5cd6;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
}

/* ===== 发布公告弹窗 ===== */
.post-overlay {
    position: fixed;
    inset: 0;
    z-index: 3500;
    background: rgba(77, 34, 213, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.post-overlay.open {
    opacity: 1;
    visibility: visible;
}

.post-modal {
    position: fixed;
    inset: 0;
    z-index: 3501;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.post-modal.open {
    opacity: 1;
    visibility: visible;
}

.post-content {
    padding: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    background: #87d3ee;
    border: 3px solid #4d22d5;
    border-radius: 0;
    box-shadow: 6px 6px 0 #4d22d5;
    overflow: hidden;
    pointer-events: auto;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-top: 4px;
    margin-left: 1px;
    margin-right: 1px;
    background: #f1d3f2;
    border: 3px solid #4d22d5;
    cursor: grab;
    user-select: none;
}

.post-header h2 {
    font-size: 16px;
    font-weight: bold;
    color: #4d22d5;
    margin: 0;
    font-family: "MS Gothic", "SimSun", monospace;
}

.post-header h2::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #4d22d5;
    margin-right: 8px;
    vertical-align: middle;
}

.close-post {
    width: 28px;
    height: 28px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0 #4d22d5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-post:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.post-body {
    padding: 24px;
    padding-bottom: 25px;
    margin-left: 1px;
    margin-right: 1px;
    margin-bottom: 13px;
    border: 3px solid #4d22d5;
    background: #fff8fe;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-body .form-group {
    margin-bottom: 16px;
}

.post-body .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.post-body .form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
    background: #fff8fe;
}

.post-body .form-group input[type="text"]:focus {
    outline: none;
    border-color: #4d22d5;
    box-shadow: 0 0 0 2px rgba(77, 34, 213, 0.2);
}

.post-body .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
    background: #fff8fe;
    resize: vertical;
    min-height: 120px;
}

.post-body .form-group textarea:focus {
    outline: none;
    border-color: #4d22d5;
    box-shadow: 0 0 0 2px rgba(77, 34, 213, 0.2);
}

.post-body .form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.post-body .form-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4d22d5;
}

.post-decoration1,
.post-decoration2 {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    padding: 0;
    margin: 0;
    pointer-events: none;
    position: absolute;
}

.post-decoration2 {
    left: 4px;
    bottom: 0;
    z-index: 10;
}

.post-decoration1 {
    left: 43px;
    bottom: 2px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--primary);
        box-shadow: 0 4px 12px var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.open {
        max-height: 200px;
    }

    nav a {
        padding: 14px 5%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .search-box {
        display: none;
    }

    .navbar.search-open .search-box {
        display: flex;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        max-width: none;
        height: 56px;
        border-radius: 0;
        background: var(--primary);
        padding: 0 5%;
    }

    .cart-button {
        padding: 6px 10px;
        font-size: 12px;
        box-shadow: 2px 2px 0 #4d22d5;
    }

    .search-toggle {
        display: flex;
    }

    .notice-button {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .user-button {
        padding: 6px 10px;
        font-size: 12px;
        gap: 4px;
        box-shadow: 2px 2px 0 #4d22d5;
    }

    .hero {
        padding: 50px 5% 60px;
    }

    .hero::before {
        font-size: 16px;
    }

    .hero-desc {
        font-size: 13px;
    }

    .primary-button {
        padding: 12px 24px;
        font-size: 14px;
        box-shadow: 3px 3px 0 #4d22d5;
    }

    .products-section {
        padding: 40px 5%;
    }

    .section-heading h2 {
        font-size: 22px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .product-card {
        padding: 12px;
    }

    .product-image {
        height: 120px;
        font-size: 40px;
    }

    .product-card h3 {
        font-size: 14px;
    }

    .price {
        font-size: 16px;
    }

    .product-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .add-button {
        width: 100%;
        text-align: center;
    }

    .notice-content,
    .auth-content,
    .user-content,
    .product-modal-content {
        width: 94%;
        max-width: none;
        max-height: 80vh;
    }

    .notice-body,
    .auth-body,
    .user-body,
    .product-modal-body {
        padding: 16px;
        padding-bottom: 18px;
    }

    .cart-drawer {
        width: min(360px, 100%);
    }

    .cart-items {
        padding: 12px 16px;
    }

    .cart-footer {
        padding: 12px 16px 20px;
    }

    footer {
        padding: 20px 5%;
        font-size: 12px;
    }

    .announcements-section {
        padding: 40px 5%;
    }

    .announcement-card {
        padding: 16px;
    }

    .announcement-title {
        font-size: 16px;
    }

    .announcement-content {
        font-size: 13px;
    }

    .post-content {
        width: 94%;
        max-width: none;
    }

    .post-body {
        padding: 16px;
        padding-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 3%;
        gap: 8px;
    }

    .logo {
        font-size: 18px;
    }

    .cart-button {
        padding: 5px 8px;
        font-size: 11px;
    }

    .notice-button {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .user-button {
        padding: 5px 8px;
        font-size: 11px;
    }

    .user-button #current-user {
        display: none;
    }

    .hero {
        padding: 36px 4% 44px;
    }

    .hero h1 {
        font-size: 24px;
        margin: 12px 0 14px;
    }

    .hero-desc {
        font-size: 12px;
        line-height: 1.7;
    }

    .primary-button {
        padding: 10px 20px;
        font-size: 13px;
        box-shadow: 3px 3px 0 #4d22d5;
    }

    .products-section {
        padding: 28px 3%;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 20px;
    }

    .section-heading h2 {
        font-size: 20px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .product-card {
        padding: 10px;
        box-shadow: 3px 3px 0 #4d22d5;
    }

    .product-image {
        height: 100px;
        font-size: 32px;
    }

    .product-card h3 {
        font-size: 13px;
        margin: 4px 0 8px;
    }

    .category {
        font-size: 11px;
        margin-top: 8px;
    }

    .price {
        font-size: 15px;
    }

    .add-button {
        padding: 6px 10px;
        font-size: 12px;
    }

    .notice-content,
    .auth-content,
    .user-content,
    .product-modal-content {
        width: 96%;
        max-height: 85vh;
    }

    .notice-header,
    .auth-header,
    .user-header,
    .product-modal-header {
        padding: 6px 10px;
    }

    .notice-header h2,
    .auth-header h2,
    .user-header h2,
    .product-modal-header h2 {
        font-size: 14px;
    }

    .notice-body,
    .auth-body,
    .user-body,
    .product-modal-body {
        padding: 12px;
        padding-bottom: 14px;
    }

    .notice-body p {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .notice-warning {
        padding: 12px;
        margin-top: 12px;
    }

    .notice-warning li {
        font-size: 12px;
    }

    .agree-button,
    .add-button-modal,
    .checkout-button {
        padding: 12px;
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input {
        padding: 8px;
        font-size: 13px;
    }

    .auth-submit {
        padding: 10px;
        font-size: 14px;
    }

    .auth-switch {
        font-size: 13px;
        margin-top: 12px;
    }

    .user-info-item {
        margin-bottom: 14px;
    }

    .user-info-item label {
        font-size: 11px;
    }

    .user-info-item p {
        font-size: 14px;
    }

    .invite-code-box {
        padding: 8px;
        gap: 8px;
    }

    .invite-code-box code {
        font-size: 13px;
        letter-spacing: 0.5px;
        word-break: break-all;
    }

    .copy-button {
        padding: 5px 10px;
        font-size: 11px;
    }

    .logout-button {
        padding: 10px;
        font-size: 13px;
    }

    .product-modal-image {
        height: 140px;
        font-size: 56px;
        margin-bottom: 12px;
    }

    .product-modal-body h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .product-modal-desc {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .product-modal-price span:first-child {
        font-size: 22px;
    }

    .product-modal-unit {
        font-size: 12px;
    }

    .cart-drawer {
        width: 100%;
        border-left: none;
        border-top: 3px solid #4d22d5;
        box-shadow: none;
    }

    .cart-header {
        padding: 6px 12px;
    }

    .cart-header h2 {
        font-size: 14px;
    }

    .cart-items {
        padding: 10px 12px;
    }

    .cart-item {
        padding: 12px;
        gap: 10px;
        margin-bottom: 10px;
    }

    .cart-item-name {
        font-size: 13px;
    }

    .cart-item-price {
        font-size: 13px;
    }

    .quantity-control button {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .cart-footer {
        padding: 10px 12px 16px;
    }

    .cart-total strong {
        font-size: 20px;
    }

    footer {
        padding: 16px 4%;
        font-size: 11px;
    }

    footer::before {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .announcements-section {
        padding: 28px 3%;
    }

    .announcement-card {
        padding: 12px;
    }

    .announcement-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .announcement-content {
        font-size: 12px;
        line-height: 1.7;
    }

    .announcement-meta {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .announcement-author {
        font-size: 12px;
    }

    .announcement-date {
        font-size: 11px;
    }

    .post-content {
        width: 96%;
    }

    .post-body {
        padding: 12px;
        padding-bottom: 14px;
    }

    .post-body .form-group textarea {
        min-height: 80px;
    }
}

/* ===== 用户按钮 ===== */
.user-button {
    flex-shrink: 0;
    border: 2px solid #4d22d5;
    border-radius: 0;
    padding: 8px 16px;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 2px 2px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.user-button:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

/* ===== 登录注册弹窗 ===== */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(77, 34, 213, 0.6);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.auth-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 3001;
    pointer-events: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.auth-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.auth-content {
    padding: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: #87d3ee;
    border: 3px solid #4d22d5;
    border-radius: 0;
    box-shadow: 
        6px 6px 0 #4d22d5;
    overflow: hidden;
    pointer-events: auto;
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-top: 4px;
    margin-left: 1px;
    margin-right: 1px;
    background: #f1d3f2;
    border: 3px solid #4d22d5;
    cursor: grab;
    user-select: none;
}

.auth-header h2 {
    font-size: 16px;
    font-weight: bold;
    color: #4d22d5;
    margin: 0;
    font-family: "MS Gothic", "SimSun", monospace;
}

.auth-header h2::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #4d22d5;
    margin-right: 8px;
    vertical-align: middle;
}

.close-auth {
    width: 28px;
    height: 28px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0 #4d22d5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-auth:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.auth-body {
    padding: 24px;
    padding-bottom: 25px;
    margin-left: 1px;
    margin-right: 1px;
    margin-bottom: 13px;
    border: 3px solid #4d22d5;
    background: #fff8fe;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-form {
    padding: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    font-size: 14px;
    font-family: "MS Gothic", "SimSun", monospace;
    background: #fff8fe;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4d22d5;
    box-shadow: 0 0 0 2px rgba(77, 34, 213, 0.2);
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #7a5cd6;
    font-family: "MS Gothic", "SimSun", monospace;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    border: 3px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
    box-shadow: 4px 4px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.auth-submit:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 #4d22d5;
}

.auth-submit:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #4d22d5;
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #7a5cd6;
    font-family: "MS Gothic", "SimSun", monospace;
}

.auth-switch a {
    color: #4d22d5;
    text-decoration: none;
    font-weight: bold;
}

.auth-switch a:hover {
    text-decoration: underline;
    color: #7a5cd6;
}

.auth-error {
    margin: 0 24px 24px;
    padding: 12px;
    background: #fff8fe;
    border: 2px solid #f1d3f2;
    border-radius: 0;
    color: #4d22d5;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
    font-family: "MS Gothic", "SimSun", monospace;
}

/* ===== 用户信息弹窗 ===== */
.user-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(77, 34, 213, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.user-overlay.open {
    opacity: 1;
    visibility: visible;
}

.user-modal {
    position: fixed;
    inset: 0;
    z-index: 2501;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.user-modal.open {
    opacity: 1;
    visibility: visible;
}

.user-content {
    padding: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 420px;
    background: #87d3ee;
    border: 3px solid #4d22d5;
    border-radius: 0;
    box-shadow: 
        6px 6px 0 #4d22d5;
    overflow: hidden;
    pointer-events: auto;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-top: 4px;
    margin-left: 1px;
    margin-right: 1px;
    background: #f1d3f2;
    border: 3px solid #4d22d5;
    cursor: grab;
    user-select: none;
}

.user-header h2 {
    font-size: 16px;
    font-weight: bold;
    color: #4d22d5;
    margin: 0;
    font-family: "MS Gothic", "SimSun", monospace;
}

.user-header h2::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #4d22d5;
    margin-right: 8px;
    vertical-align: middle;
}

.close-user {
    width: 28px;
    height: 28px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0 #4d22d5;
}

.close-user:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.user-body {
    padding: 24px;
    padding-bottom: 25px;
    margin-left: 1px;
    margin-right: 1px;
    margin-bottom: 13px;
    border: 3px solid #4d22d5;
    background: #fff8fe;
    overflow-y: auto;
    flex: 1;
}

.user-info-item {
    margin-bottom: 20px;
}

.user-info-item:last-child {
    margin-bottom: 0;
}

.user-info-item label {
    display: block;
    font-size: 12px;
    color: #7a5cd6;
    margin-bottom: 6px;
    font-weight: bold;
    font-family: "MS Gothic", "SimSun", monospace;
}

.user-info-item p {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.invite-code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff8fe;
    border-radius: 0;
    border: 2px solid #4d22d5;
}

.invite-code-box code {
    flex: 1;
    font-family: "MS Gothic", "SimSun", monospace;
    font-size: 16px;
    font-weight: bold;
    color: #4d22d5;
    letter-spacing: 1px;
}

.copy-button {
    padding: 6px 12px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.copy-button:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.user-footer {
    margin-top: 16px;
    padding: 12px 0 4px;
    text-align: center;
}

.logout-button {
    width: 100%;
    padding: 12px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #f1d3f2;
    color: #4d22d5;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
}

.logout-button:hover {
    background: #e8c0e9;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

body.auth-open,
body.user-open {
    overflow: hidden;
}
.notice-content {
    position: absolute;
}

/* 弹窗正文框下方的像素装饰 */
.notice-decoration1,
.product-decoration1,
.auth-decoration1,
.user-decoration1 {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    padding: 0;
    margin: 0;
    pointer-events: none;
    position: absolute;

    /* 第一组左边 2px + 宽度 20px + 间距 1px */
    left: 43px;

    /* 第二组与弹窗底边的距离 */
    bottom: 2px;
}
.notice-decoration2,
.product-decoration2,
.auth-decoration2,
.user-decoration2 {
    position: absolute;
    left: 4px;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    gap: 1px;
    padding: 0;
    margin: 0;
    pointer-events: none;
    z-index: 10;
}
.pixel {
    display: block;
    background: #eea1f5;
    flex-shrink: 0;
}

.pixel-large {
    width: 37px;
    height: 11px;
    border: 2px solid #4d22d5;
}


.pixel-outline1 {
    width: 6px;
    height: 6px;
    background: transparent;
    border: 2px solid #4d22d5;
    box-sizing: border-box;
}

/* ===== 公告栏：外层大窗口 ===== */

/* 页面遮罩 */
#announcements-page {
    position: fixed;
    inset: 0;
    z-index: 1500;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
    background: rgba(77, 34, 213, 0.45);

    /* 允许点击下方导航栏 */
    pointer-events: none;
}

/* 外层窗口：蓝色 */
#announcements-page .announcements-section {
    position: relative;

    width: min(900px, 100%);
    height: min(720px, 90dvh);
    min-height: 0;
    padding: 0;
    margin: 0;

    display: flex;
    flex-direction: column;

    background-color: #87d3ee;
    border: 3px solid #4d22d5;
    box-shadow: 8px 8px 0 #4d22d5;
    overflow: hidden;

    pointer-events: auto;
}

/* 顶部标题栏：粉色 */

/* 标题文字 */



/* 公告列表区域：浅白色 */
#announcements-page .announcements-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    gap: 16px;

    padding: 12px;
    margin: 12px !important;
    background-color: #fff8fe;
    border: 3px solid #4d22d5;
}

/* 单条公告卡片：粉色 */
#announcements-page .announcement-card {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;

    margin: 0;
    padding: 20px;

    background-color: #f1d3f2;
    border: 3px solid #4d22d5;
    border-radius: 0;
    box-shadow: 4px 4px 0 #4d22d5;
}

/* 置顶公告 */
#announcements-page .announcement-card.important {
    background-color: #fff0f5;
    border-color: #ff6b9d;
    box-shadow: 4px 4px 0 #ff6b9d;
}

/* 发布公告按钮 */
#announcements-page .post-notice-btn {
    flex-shrink: 0;
}

/* 导航栏保持在公告窗口上方 */
.navbar 
    position: relative;
    z-index: 1600;
}

/* 手机屏幕适配 */
@media (max-width: 600px) {
    #announcements-page {
        padding: 12px;
    }

    #announcements-page .announcements-section {
        width: 100%;
        height: 90vh;
        height: 90dvh;
    }

 


    #announcements-page .announcements-list {
        padding: 16px;
        gap: 14px;
    }

    #announcements-page .announcement-card {
        padding: 16px;
    }
}

/* ===== 公告栏布局修复测试 ===== */

#announcements-page[hidden] {
    display: none !important;
}

#announcements-page {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 24px !important;
    background: rgba(77, 34, 213, 0.45) !important;
    z-index: 1500 !important;
    pointer-events: none;
}

#announcements-page .announcements-section {
    position: relative !important;
    width: min(900px, 100%) !important;
    height: min(720px, 90vh) !important;
    box-sizing: border-box !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    flex-direction: column !important;

    background: #87d3ee !important;
    border: 3px solid #4d22d5 !important;
    box-shadow: 8px 8px 0 #4d22d5 !important;
    overflow: hidden !important;

    pointer-events: auto;
}


/* 内容栏：与标题栏分开，露出蓝色背景 */
#announcements-page .announcements-list {
    flex: 1 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;

    /* 上、左、右、下均留出间隙 */
    margin: 12px !important;

    padding: 24px !important;

    background: #fff8fe !important;
    border: 3px solid #4d22d5 !important;
    overflow-y: auto !important;
}


/* 恢复公告栏外层蓝色 */
#announcements-page .announcements-section {
    background: #87d3ee !important;
    border: 3px solid #4d22d5 !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 标题栏保持粉色 */

#announcements-page .section-heading {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    /* 与蓝色外框拉开距离 */
    margin: 20px 12px 0 !important;
    padding: 8px 60px 8px 20px;
    box-sizing: border-box;
    background: #f1d3f2;
    border: 3px solid #4d22d5;
}

#announcements-page .section-heading h2 {
    margin: 0;
    color: #4d22d5;
    font-size: 22px;
}

#announcements-page .section-heading .eyebrow {
    margin: 0 0 4px;
    color: #4d22d5;
}

#announcements-page .section-heading::after {
    content: "×";
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    color: #888;
    background: #e5e5e5;
    border: 2px solid #999;
    font: bold 22px Arial, sans-serif;
    pointer-events: none;
}

/* 内容栏与标题栏分开 */

/* 内容区：四周留出蓝色间隙 */
#announcements-page .announcements-list {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;

    /* 上、右、下、左 */
    margin: 12px !important;

    padding: 24px !important;
    background: #fff8fe !important;
    border: 3px solid #4d22d5 !important;
    overflow-y: auto !important;
}

/* 只让导航栏保持在窗口上方 */
.navbar {
    position: relative;
    z-index: 1600;
}

/* ===== 商品管理（管理员） ===== */
.products-heading-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-edit {
    padding: 8px 10px;
    border: 2px solid #4d22d5;
    border-radius: 0;
    background: #e9e4ff;
    color: #4d22d5;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0 #4d22d5;
    font-family: "MS Gothic", "SimSun", monospace;
    transition: all 0.2s;
}

.product-edit:hover {
    background: #d9d0ff;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #4d22d5;
}

.product-edit:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #4d22d5;
}

.product-delete {
    padding: 8px 10px;
    border: 2px solid #d5356c;
    border-radius: 0;
    background: #ffd6e7;
    color: #d5356c;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0 #d5356c;
    font-family: "MS Gothic", "SimSun", monospace;
    transition: all 0.2s;
}

.product-delete:hover {
    background: #ffb3d1;
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 #d5356c;
}

.product-delete:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 #d5356c;
}

@media (max-width: 480px) {
    .products-heading-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .product-actions {
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 768px) {
    nav.open {
        max-height: 280px;
    }
}

/* ===== 公告社媒卡片（参考图2排版） ===== */
#announcements-page .announcement-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    padding: 14px 16px;
    background: #fffaff;
    border: 2px solid #b9a8e8;
    box-shadow: 3px 3px 0 rgba(77, 34, 213, 0.18);
    transition: transform 0.15s, box-shadow 0.15s;
}

#announcements-page .announcement-card:hover {
    transform: translateY(-1px);
    box-shadow: 4px 4px 0 rgba(77, 34, 213, 0.24);
}

#announcements-page .announcement-card.important {
    background: #fff6fb;
    border-color: #ff9dc0;
    box-shadow: 3px 3px 0 rgba(255, 107, 157, 0.25);
}

#announcements-page .announcement-card.important::before {
    content: none;
    display: none;
}

.announcement-avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border: 2px solid #4d22d5;
    background: #f1d3f2;
}

.announcement-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.announcement-main {
    flex: 1;
    min-width: 0;
}

.announcement-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 4px;
}

.announcement-author {
    font-size: 13px;
    font-weight: bold;
    color: #4d22d5;
}

.announcement-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    background: #87d3ee;
    border: 1px solid #4d22d5;
    color: #ffffff;
    font-size: 9px;
    line-height: 1;
}

.announcement-handle {
    font-size: 11px;
    color: #9a86c8;
}

.announcement-pin {
    padding: 1px 5px;
    background: #ff6b9d;
    color: #ffffff;
    font-size: 9px;
    font-weight: bold;
}

.announcement-date {
    margin-left: auto;
    font-size: 10px;
    color: #a99bd0;
}

.announcement-title {
    margin: 2px 0 5px;
    font-size: 15px;
    line-height: 1.5;
    color: #4d22d5;
}

.announcement-content {
    font-size: 13px;
    line-height: 1.75;
    color: #4d22d5;
    white-space: pre-wrap;
    word-break: break-word;
}

.announcement-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(77, 34, 213, 0.22);
    color: #9a86c8;
}

.announcement-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.announcement-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.announcement-delete {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    margin-left: 4px;
    padding: 3px 8px;
    border: 1px solid #4d22d5;
    background: #fff8fe;
    color: #4d22d5;
    font-size: 10px;
    box-shadow: none !important;
    transform: none !important;
}

.announcement-delete:hover {
    background: #f1d3f2;
}

.announcement-edit {
    position: static;
    margin-left: auto;
    padding: 3px 8px;
    border: 1px solid #4d22d5;
    background: #fff8fe;
    color: #4d22d5;
    font-size: 10px;
    cursor: pointer;
}

.announcement-edit:hover {
    background: #f1d3f2;
}

@media (max-width: 520px) {
    #announcements-page .announcement-card {
        gap: 9px;
        padding: 12px;
    }

    .announcement-avatar {
        width: 42px;
        height: 42px;
    }

    .announcement-content {
        font-size: 12px;
    }

    .announcement-actions {
        gap: 13px;
    }

    #announcements-page .section-heading {
        flex-wrap: wrap;
        padding: 8px 44px 8px 14px;
        gap: 8px;
    }

    #announcements-page .section-heading > div {
        min-width: 0;
    }

    #announcements-page .post-notice-btn {
        width: 100%;
        margin-top: 4px;
    }

    #announcements-page .section-heading::after {
        top: 8px;
        transform: none;
    }
}

/* ===== 欢迎弹窗置顶公告 ===== */
.notice-body .notice-announcement-meta {
    margin: 0 0 8px;
    font-size: 11px;
    line-height: 1.5;
    color: #7a5cd6;
}

.notice-body .notice-announcement-title {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.5;
    color: #4d22d5;
}

.notice-body .notice-announcement-content {
    font-size: 14px;
    line-height: 1.8;
    color: #4d22d5;
    white-space: pre-wrap;
    word-break: break-word;
}
