/* 全局样式和变量 */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #7b2ff7;
    --accent-color: #f72585;
    --bg-dark: #0a0e27;
    --bg-darker: #050810;
    --bg-card: #1a1f3a;
    --text-primary: #ffffff;
    --text-secondary: #b8bcc8;
    --border-color: #2a2f4a;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* PWA 安全区域适配 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* Windows PWA 滚动优化 */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    /* Security: Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable image dragging */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* 移动端优化 */
* {
    -webkit-tap-highlight-color: rgba(0, 212, 255, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 确保所有容器和内容都自适应 */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* 确保图片和媒体元素响应式 */
img {
    max-width: 100%;
    height: auto;
}

/* 导航栏 */
.navbar {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: margin-top 0.3s ease;
    /* PWA 安全区域适配 */
    padding-top: calc(1rem + env(safe-area-inset-top));
    padding-left: calc(1rem + env(safe-area-inset-left));
    padding-right: calc(1rem + env(safe-area-inset-right));
    /* 确保在 PWA 模式下正确显示 */
    min-height: calc(60px + env(safe-area-inset-top));
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-3);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.btn-primary {
    background: var(--gradient-3);
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
    min-height: 44px; /* 触摸友好的最小高度 */
    touch-action: manipulation; /* 优化触摸响应 */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 44px; /* 触摸友好的最小高度 */
    touch-action: manipulation; /* 优化触摸响应 */
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    min-width: 44px; /* 触摸友好的最小宽度 */
    min-height: 44px; /* 触摸友好的最小高度 */
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero 区域 */
.hero-section {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    padding: 0;
    margin: 0;
    /* 确保在PWA模式下有正确的定位 */
    box-sizing: border-box;
    /* 使用绝对定位的子元素，不使用 flex */
    display: block;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    z-index: -1;
    background: var(--bg-dark);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(123, 47, 247, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(247, 37, 133, 0.1) 0%, transparent 50%);
    animation: particleMove 15s ease-in-out infinite;
}

@keyframes particleMove {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.hero-content {
    text-align: center !important; /* 确保文本居中 */
    z-index: 1;
    max-width: 800px;
    padding: 0 20px !important;
    margin: 0 auto !important;
    /* 绝对居中定位 - 确保在所有设备都完美居中 */
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    max-width: 800px !important;
    box-sizing: border-box !important;
    /* 确保在有安全区域的设备上也能居中 */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    text-align: center !important; /* 确保标题居中 */
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

.gradient-text {
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.2s both;
    text-align: center !important; /* 确保副标题居中 */
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
    text-align: center !important; /* 确保描述文本居中 */
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

.hero-buttons {
    display: flex !important;
    gap: 1rem;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    animation: fadeInUp 1s ease 0.6s both;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
    padding: 0 !important;
}

/* 确保按钮本身也居中 */
.hero-buttons .btn {
    margin: 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 功能区域 */
.features-section {
    padding: 5rem 0;
    background: var(--bg-darker);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.feature-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.feature-link:hover {
    gap: 1rem;
}

/* 产品预览 */
.products-preview {
    padding: 5rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.products-grid .product-card {
    display: flex;
    flex-direction: column;
}

.product-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: var(--bg-card);
    display: block;
}

.product-image img[src=""],
.product-image img:not([src]) {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img[src=""]::after,
.product-image img:not([src])::after {
    content: '图片加载中...';
    color: var(--primary-color);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.product-info h3 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    color: var(--text-primary);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 0;
}

.product-info p,
.product-info .product-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    flex: 1 1 auto;
    min-height: 4.5em;
    max-height: 4.5em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-price-small {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    text-align: center;
    flex-shrink: 0;
}

.product-price-small .price-amount {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.product-meta-small {
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.product-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-actions-small {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
    align-items: stretch;
}

.product-actions-small .btn-sm {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    white-space: nowrap;
}

.text-center {
    text-align: center;
}

/* 页面头部 */
.page-header {
    background: var(--bg-darker);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* 认证页面 */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 44px; /* 触摸友好的最小高度 */
    -webkit-appearance: none; /* 移除 iOS 默认样式 */
    appearance: none;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.auth-footer {
    text-align: center;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    background: rgba(247, 37, 133, 0.2);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.alert-success {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

/* 产品页面 */
.products-page {
    padding: 3rem 0;
}

.product-card-large {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 400px 1fr;
    transition: all 0.3s ease;
}

.product-card-large:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.product-image-large {
    height: 300px;
    overflow: hidden;
}

.product-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg-card);
    display: block;
}

.product-image-large img[src=""],
.product-image-large img:not([src]) {
    background: linear-gradient(135deg, #1a1f3a 0%, #0a0e27 100%);
}

.product-content {
    padding: 2rem;
}

.product-content h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.product-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.product-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 论坛页面 */
.forum-page {
    padding: 3rem 0;
}

.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.forum-post-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    pointer-events: auto;
}

.forum-post-card.pinned-post {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.05) 0%, var(--bg-card) 5%);
}

.forum-post-card:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.pinned-icon {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-header h3 {
    font-size: 1.5rem;
}

.post-header h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
    position: relative;
}

.post-header h3 a:hover {
    color: var(--primary-color);
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-content {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-author,
.post-replies {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 发帖页面 */
.forum-post-page {
    padding: 3rem 0;
}

.post-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.post-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 联系我们页面 */
.contact-page {
    padding: 3rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.contact-info h2 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-form-container {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

/* 页脚 */
.footer {
    background: var(--bg-darker);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* 响应式设计 */

/* 移动端菜单样式优化 */
@media (max-width: 992px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(26, 31, 58, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
        padding: 2rem 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 0.5rem 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        width: 100%;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
        margin-top: 1rem;
    }
}

/* PWA 特定样式 */
@supports (padding: env(safe-area-inset-top)) {
    /* 在 PWA 模式下优化显示 */
    body {
        padding-top: 0; /* 移除 body 的 padding，由 navbar 处理 */
    }
    
    .navbar {
        padding-top: calc(0.75rem + env(safe-area-inset-top));
        padding-left: calc(0.75rem + env(safe-area-inset-left));
        padding-right: calc(0.75rem + env(safe-area-inset-right));
    }
    
    /* 确保主内容区域不被状态栏遮挡 */
    .main-content {
        padding-top: 0;
    }
}

/* 底部导航栏 - 默认在浏览器中隐藏，只在 PWA 模式下显示 */
/* 默认隐藏底部导航栏，除非是PWA模式 */
.bottom-nav {
    display: none !important;
}

/* 非PWA模式下强制隐藏（优先级最高） */
/* 注意：不能阻止内联样式设置的display:flex */
.bottom-nav:not(.pwa-mode):not([style*="display: flex"]),
body:not(.pwa-active) .bottom-nav:not(.pwa-mode):not([style*="display: flex"]),
html:not(.pwa-active) .bottom-nav:not(.pwa-mode):not([style*="display: flex"]) {
    display: none !important;
}

/* 检测 PWA 模式 - 增强版，支持所有设备 */
@media (display-mode: standalone) {
    /* PWA 模式下显示底部导航栏 */
    .bottom-nav.pwa-mode,
    body.pwa-active .bottom-nav,
    html.pwa-active .bottom-nav,
    .bottom-nav[style*="display: flex"] {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    body {
        padding-top: 0;
        /* 确保在 standalone 模式下正确显示 */
        overflow-x: hidden;
    }
    
    /* PWA 桌面端：确保正确缩放和布局 */
    @media (min-width: 769px) {
        body {
            padding-top: 0;
            padding-bottom: 0;
            padding-left: 0;
            padding-right: 0;
        }
        
        /* 确保容器在桌面端PWA中正确居中 */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        /* 确保hero-buttons在桌面端PWA中居中 */
        .hero-buttons {
            justify-content: center !important;
            align-items: center !important;
            flex-direction: row !important;
        }
        
        .hero-buttons .btn {
            margin: 0;
            width: auto;
            max-width: none;
        }
    }

    /* PWA 模式下，聊天页面固定布局，不让页面滚动 */
    body.chat-page-body {
        overflow: hidden !important;
        height: 100vh !important;
        position: fixed !important;
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
    
    html:has(body.chat-page-body) {
        overflow: hidden !important;
        height: 100vh !important;
        position: fixed !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 隐藏聊天页面的顶部导航栏和底部导航栏 */
    body.chat-page-body .navbar,
    body.chat-page-body .bottom-nav {
        display: none !important;
        z-index: 0 !important; /* 确保被聊天界面覆盖 */
    }
    
    /* 确保聊天页面的输入框和头部显示在最上层 */
    body.chat-page-body .chat-input-area,
    body.chat-page-body .chat-header {
        z-index: 10001 !important;
    }
    
    /* 确保聊天页面的 main-content 不占用空间 */
    body.chat-page-body .main-content {
        padding: 0 !important;
        margin: 0 !important;
        min-height: auto !important;
    }
    
    .navbar {
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        /* PWA 模式下增强顶部安全区域 */
        padding-top: calc(1rem + env(safe-area-inset-top, 0px));
        padding-left: calc(1rem + env(safe-area-inset-left, 0px));
        padding-right: calc(1rem + env(safe-area-inset-right, 0px));
        /* 确保在 PWA 模式下正确显示 */
        min-height: calc(60px + env(safe-area-inset-top, 0px));
        /* PWA 模式下固定在顶部，不随滚动移动 */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        z-index: 1000 !important;
        margin: 0 !important;
        padding-bottom: 1rem !important;
        box-sizing: border-box !important;
    }
    
    /* PWA 模式下隐藏右上角的三条杠按钮（汉堡菜单） */
    .nav-toggle {
        display: none !important;
    }
    
    /* PWA 模式下隐藏导航菜单（只显示品牌Logo） */
    .nav-menu {
        display: none !important;
    }
    
    /* 确保内容不被状态栏和固定导航栏遮挡 */
    .main-content {
        margin-top: 0;
        /* 为固定的 navbar 留出空间 */
        padding-top: calc(60px + 1rem + env(safe-area-inset-top, 0px)) !important;
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        /* 安全区域适配 */
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
        /* 统一：为底部导航栏留出空间，确保所有页面底部导航栏在同一水平线 */
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* PWA模式下确保产品页面正常显示 - 使用最强制性的规则 */
    .products-page,
    body .products-page,
    body.pwa-active .products-page,
    html.pwa-active body .products-page,
    body .main-content .products-page,
    body.pwa-active .main-content .products-page,
    html.pwa-active body .main-content .products-page {
        display: block !important;
        visibility: visible !important;
        padding: 3rem 0 !important;
        min-height: auto !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
        position: relative !important;
        background: var(--bg-dark) !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .products-page .container,
    body .products-page .container,
    body.pwa-active .products-page .container,
    html.pwa-active body .products-page .container {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
        padding-left: calc(20px + env(safe-area-inset-left, 0px)) !important;
        padding-right: calc(20px + env(safe-area-inset-right, 0px)) !important;
    }
    
    .products-page .products-grid,
    body .products-page .products-grid,
    body.pwa-active .products-page .products-grid,
    html.pwa-active body .products-page .products-grid {
        display: grid !important;
        visibility: visible !important;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
        gap: 2rem !important;
        opacity: 1 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .products-page .product-card,
    body .products-page .product-card,
    body.pwa-active .products-page .product-card,
    html.pwa-active body .products-page .product-card {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column !important;
        width: 100% !important;
        min-height: 0 !important;
    }
    
    .products-page .product-info,
    body .products-page .product-info,
    body.pwa-active .products-page .product-info,
    html.pwa-active body .products-page .product-info {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .products-page .product-info h3,
    body .products-page .product-info h3,
    body.pwa-active .products-page .product-info h3,
    html.pwa-active body .products-page .product-info h3 {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: var(--text-primary) !important;
    }
    
    .products-page .product-info p,
    body .products-page .product-info p,
    body.pwa-active .products-page .product-info p,
    html.pwa-active body .products-page .product-info p {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: var(--text-secondary) !important;
    }
    
    /* 确保客服和我的页面的底部导航栏也在同一水平线 */
    /* 覆盖内联样式和普通样式，确保所有页面一致 */
    .support-page .main-content,
    .orders-page .main-content,
    .support-page,
    .orders-page {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        margin-bottom: 0 !important;
    }
    
    /* PWA模式下确保产品页面的main-content正确显示 */
    .main-content:has(.products-page),
    body.pwa-active .main-content:has(.products-page),
    html.pwa-active body .main-content:has(.products-page) {
        display: block !important;
        visibility: visible !important;
        padding-top: calc(60px + 1rem + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        min-height: calc(100vh - 60px - 80px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
        overflow: auto !important;
        position: relative !important;
        background: var(--bg-dark) !important;
    }
    
    /* 覆盖 support.ejs 中的内联样式 */
    .support-page {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        margin-bottom: 0 !important;
    }
    
    /* 覆盖 orders-page 的 padding，确保底部导航栏位置一致 */
    .orders-page {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        margin-bottom: 0 !important;
    }
    
    /* 确保这些页面的底部导航栏定位完全一致 */
    body:has(.support-page) .bottom-nav,
    body:has(.orders-page) .bottom-nav,
    .support-page ~ .bottom-nav,
    .orders-page ~ .bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        z-index: 10000 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        padding-top: 0.5rem !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        padding-left: env(safe-area-inset-left, 0px) !important;
        padding-right: env(safe-area-inset-right, 0px) !important;
        box-sizing: border-box !important;
        transform: none !important;
        clear: both !important;
        float: none !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
        inset: auto 0 0 0 !important;
    }
    
    /* 优化容器在 PWA 模式下的显示 */
    .container {
        padding-left: calc(20px + env(safe-area-inset-left, 0px));
        padding-right: calc(20px + env(safe-area-inset-right, 0px));
    }
    
    /* PWA 模式下，确保 hero-section 正确显示 */
    .hero-section {
        /* 可视区域高度，不包含底部导航栏 */
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        padding: 0;
        margin: 0;
    }
    
    .hero-background {
        /* 背景也要匹配 hero-section 的高度 */
        height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
    }
    
    /* PWA 模式下，确保 hero-content 也能完美居中 */
    .hero-content {
        /* 完美居中，基于可视区域高度（不含底部导航栏） */
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        /* 确保在所有PWA设备上都居中 */
        width: 100% !important;
        max-width: 800px !important;
        margin: 0 !important;
        padding: 0 20px !important;
        box-sizing: border-box !important;
        text-align: center !important; /* 确保PWA模式下文本居中 */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* PWA模式下确保所有文本元素居中 */
    .hero-content .hero-title,
    .hero-content .hero-subtitle,
    .hero-content .hero-description {
        text-align: center !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    /* PWA模式下确保按钮居中 */
    .hero-content .hero-buttons {
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 auto !important;
    }
    
    /* PWA 模式下隐藏 "Join Forum" 按钮 */
    .pwa-hide-forum-btn {
        display: none !important;
    }
    
    /* PWA 模式下，允许首页滚动 */
    /* 允许滚动，适配所有Android设备和iOS设备 */
    body.homepage,
    body.pwa-active.homepage,
    html.pwa-active body.homepage {
        overflow: auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        touch-action: pan-y !important; /* 允许垂直滚动 */
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* 通过 html 元素允许滚动 */
    html:has(body.homepage),
    html.pwa-active:has(body.homepage),
    html:has(body.pwa-active.homepage) {
        overflow: auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        touch-action: pan-y !important; /* 允许垂直滚动 */
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* 确保main-content在PWA模式下正常显示和滚动 */
    body.homepage .main-content,
    body.pwa-active.homepage .main-content {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        position: relative !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 注意：html 元素不应该设置为 position: fixed，这会影响底部导航栏的定位 */
    /* body.homepage html {
        height: 100vh !important;
        overflow: hidden !important;
        position: fixed !important;
        width: 100%;
    } */
    
    /* PWA 模式下首页区域 - 改为relative，允许滚动并避免遮挡下方内容 */
    body.homepage .hero-section {
        overflow: visible !important;
        position: relative !important;
        /* 从顶部导航栏下方开始 */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100% !important;
        /* 最小高度，但允许根据内容扩展 */
        min-height: calc(100vh - 60px - 1rem - 80px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
        height: auto !important;
        max-height: none !important;
        z-index: 1 !important; /* 确保在底部导航栏下方，但在顶部导航栏下方 */
        margin-bottom: 0 !important;
    }
    
    body.homepage .hero-background {
        /* 允许背景高度自适应，避免遮挡下方内容 */
        min-height: calc(100vh - 60px - 1rem - 80px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
        height: auto !important;
        max-height: none !important;
    }
    
    /* PWA模式下确保features-section和products-preview正常显示 */
    body.homepage .features-section,
    body.pwa-active.homepage .features-section {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
        padding: 5rem 0 !important;
    }
    
    body.homepage .products-preview,
    body.pwa-active.homepage .products-preview {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
        padding-top: 3rem !important;
        margin-top: 0 !important;
        position: relative !important;
        z-index: 2 !important; /* 确保在hero-section上方 */
    }
    
    /* PWA模式下，确保products-preview的第一个产品不被遮挡 */
    body.pwa-active.homepage .products-preview .products-grid {
        padding-top: 2rem !important;
        margin-top: 0 !important;
    }
    
    body.pwa-active.homepage .products-preview .product-card:first-child {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* PWA 模式下隐藏所有页面的footer */
    body.pwa-active .footer,
    html.pwa-active .footer,
    .pwa-mode ~ .footer,
    body.homepage .footer,
    body.pwa-active.homepage .footer,
    html.pwa-active body.homepage .footer {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* PWA 模式下调整 hero-buttons 布局（确保按钮居中） */
    body.homepage .hero-buttons {
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* PWA 桌面端：水平排列并居中 */
    @media (min-width: 769px) {
        body.homepage .hero-buttons {
            flex-direction: row !important;
        }
        
        body.homepage .hero-buttons .btn {
            margin: 0 !important;
            width: auto !important;
            max-width: none !important;
        }
    }
    
    /* PWA 移动端：垂直排列并居中 */
    @media (max-width: 768px) {
        body.homepage .hero-buttons {
            flex-direction: column !important;
        }
        
        body.homepage .hero-buttons .btn {
            width: 100% !important;
            max-width: 300px !important;
            margin: 0 auto !important;
        }
    }
    
    /* PWA 模式下隐藏所有页面的底部 footer */
    .footer {
        display: none !important;
    }
    
    /* PWA 模式下，确保底部导航栏始终在最上层并固定在底部 */
    /* 统一所有页面的底部导航栏样式，确保在同一水平线上 */
    .bottom-nav.pwa-mode,
    body.pwa-active .bottom-nav,
    html.pwa-active .bottom-nav,
    .bottom-nav[style*="display: flex"] {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        z-index: 10000 !important;
        /* 统一宽度，确保所有页面一致 */
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        justify-content: space-around !important;
        align-items: center !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        padding-top: 0.5rem !important;
        /* 统一：padding-bottom 只使用安全区域，确保所有页面贴底在同一水平线 */
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        padding-left: env(safe-area-inset-left, 0px) !important;
        padding-right: env(safe-area-inset-right, 0px) !important;
        box-sizing: border-box !important;
        transform: none !important;
        clear: both !important;
        float: none !important;
        /* 强制贴底 - 使用 inset 确保所有页面在同一水平线 */
        inset: auto 0 0 0 !important;
    }
    
    /* PWA 模式下，首页的底部导航栏 - 确保与其他页面在同一水平线 */
    /* 使用与所有页面完全相同的样式，确保一致性 */
    body.homepage .bottom-nav.pwa-mode,
    body.pwa-active.homepage .bottom-nav,
    html.pwa-active body.homepage .bottom-nav {
        position: fixed !important;
        bottom: 0 !important; /* 强制贴底，使用0而不是safe-area-inset-bottom */
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        z-index: 10000 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 100vw !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        padding-top: 0.5rem !important;
        /* 统一：与其他页面使用相同的 padding-bottom，通过padding处理安全区域 */
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        padding-left: env(safe-area-inset-left, 0px) !important;
        padding-right: env(safe-area-inset-right, 0px) !important;
        box-sizing: border-box !important;
        transform: none !important;
        clear: both !important;
        float: none !important;
        /* 确保不被 body 的定位影响 */
        isolation: isolate !important;
        /* 统一布局 */
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        justify-content: space-around !important;
        align-items: center !important;
        /* 强制贴底 - 确保与其他页面在同一水平线，使用bottom:0而不是inset */
        inset: auto 0 0 0 !important;
    }
    
    /* 确保首页 hero-content 正确居中 */
    body.homepage .hero-content {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        max-width: 800px !important;
        margin: 0 !important;
        padding: 0 20px !important;
        box-sizing: border-box !important;
        z-index: 2 !important;
        text-align: center !important; /* 确保PWA模式下文本居中 */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* PWA模式下确保所有文本元素居中 */
    body.homepage .hero-content .hero-title,
    body.homepage .hero-content .hero-subtitle,
    body.homepage .hero-content .hero-description {
        text-align: center !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    /* PWA模式下确保按钮居中 */
    body.homepage .hero-content .hero-buttons {
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 auto !important;
    }
    
    /* PWA 模式下，其他页面可以正常滚动 */
    body:not(.homepage) {
        overflow: auto !important;
        position: static !important;
        height: auto !important;
    }
    
    body:not(.homepage) html {
        overflow: auto !important;
        position: static !important;
        height: auto !important;
    }
    
    /* 确保所有交互元素在 PWA 模式下可访问 */
    button, a, input, select, textarea {
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
    }
}

/* 平板和移动端 (< 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        /* 安全区域适配 */
        padding-left: calc(15px + env(safe-area-inset-left));
        padding-right: calc(15px + env(safe-area-inset-right));
    }
    
    .navbar {
        padding: 0.75rem 0;
        /* 移动端安全区域适配 */
        padding-top: calc(0.75rem + env(safe-area-inset-top));
        padding-left: calc(0.75rem + env(safe-area-inset-left));
        padding-right: calc(0.75rem + env(safe-area-inset-right));
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-brand i {
        font-size: 1.5rem;
    }
    
    /* Hero 区域 */
    .hero-section {
        /* 移动端可视区域高度，考虑底部导航栏 */
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        padding: 0;
        margin: 0;
        display: block;
        position: relative;
    }
    
    .hero-background {
        height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
    }
    
    .hero-background {
        min-height: 100vh;
    }

    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .hero-title {
        font-size: 2rem !important;
        margin-bottom: 0.75rem;
        text-align: center !important; /* 确保移动端标题居中 */
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    .hero-subtitle {
        font-size: 1.2rem !important;
        margin-bottom: 0.75rem;
        text-align: center !important; /* 确保移动端副标题居中 */
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
        padding: 0 1rem !important;
        text-align: center !important; /* 确保移动端描述居中 */
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        padding: 0 1rem;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto !important;
        text-align: center !important;
    }
    
    /* 功能区域 */
    .features-section,
    .products-preview {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
    }
    
    /* 产品卡片 */
    .product-card {
        margin-bottom: 1rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 1.25rem;
        display: flex;
        flex-direction: column;
    }
    
    .product-info h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .product-info p,
    .product-info .product-description {
        margin-bottom: 0.75rem;
        -webkit-line-clamp: 2;
        min-height: 3em;
        max-height: 3em;
        flex: 1 1 auto;
    }
    
    .product-price-small {
        margin: 0.5rem 0;
        padding: 0.6rem;
        flex-shrink: 0;
    }
    
    .product-price-small .price-amount {
        font-size: 1.1rem;
    }
    
    .product-meta-small {
        margin: 0.4rem 0;
        padding: 0.4rem 0;
        flex-shrink: 0;
    }
    
    .product-actions-small {
        margin-top: auto;
        padding-top: 0.75rem;
        gap: 0.5rem;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
    
    .product-actions-small .btn-sm {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.65rem 0.875rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* 页面头部 */
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    /* 认证页面 */
    .auth-container {
        padding: 1.5rem 0;
        min-height: auto;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    /* 产品详情页 */
    .product-detail-page {
        padding: 1.5rem 0;
        min-height: auto;
    }
    
    .product-detail-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .product-detail-image {
        order: -1; /* 图片在上方 */
        padding: 0.75rem;
        min-height: auto;
        position: static;
        top: auto;
    }
    
    .product-detail-image img {
        width: 100%;
        height: auto;
        max-height: 400px;
        object-fit: contain;
        background: var(--bg-dark);
        border-radius: 8px;
    }

    /* 移动端图片展示 */
    .product-detail-images-section {
        padding: 1rem;
        order: -1 !important;
    }

    .carousel-container {
        min-height: 300px;
    }

    .carousel-slide img {
        max-height: 400px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .carousel-indicators {
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding: 0.5rem;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }

    .indicator.active {
        width: 10px;
        height: 10px;
    }

    
    .product-detail-info {
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
    }
    
    .product-detail-info h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .product-description {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }
    
    .product-detail-meta {
        margin-bottom: 1.5rem;
        padding-bottom: 1.25rem;
    }
    
    .meta-item {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .product-detail-price {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .price-amount-large {
        font-size: 1.5rem;
    }
    
    .product-detail-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: auto;
        padding-top: 1rem;
    }
    
    .product-detail-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        flex: 1;
        min-width: 100%;
    }

    .product-card-large {
        grid-template-columns: 1fr;
    }
    
    .product-image-large {
        height: 250px;
    }
    
    /* 购买表单响应式样式 (768px) */
    .product-detail-info .buy-form .order-summary {
        padding: 1.25rem;
        margin: 1.25rem 0;
    }
    
    .product-detail-info .buy-form .order-summary h3 {
        font-size: 1.1rem;
    }
    
    .product-detail-info .buy-form .summary-item {
        font-size: 0.95rem;
    }
    
    .product-detail-info .buy-form .summary-item.total {
        font-size: 1.1rem;
    }
    
    .product-detail-info .buy-form .payment-method {
        margin: 1.25rem 0;
    }
    
    .product-detail-info .buy-form .payment-method h3 {
        font-size: 1.1rem;
    }
    
    .product-detail-info .buy-form .payment-option {
        padding: 0.875rem;
        gap: 0.75rem;
    }
    
    .product-detail-info .buy-form .payment-option i {
        font-size: 1.3rem;
    }
    
    .product-detail-info .buy-form .payment-note {
        font-size: 0.85rem;
    }
    
    /* 购买页面 */
    .buy-page {
        padding: 1.5rem 0;
    }
    
    .buy-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .buy-product-info {
        padding: 1.5rem;
        order: -1; /* 产品信息在上方 */
    }
    
    .buy-product-info h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .buy-product-info p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }
    
    .buy-product-image-container {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .buy-product-image {
        max-height: 400px;
    }
    
    .buy-price {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .buy-price .price-amount {
        font-size: 1.5rem;
    }
    
    .buy-form-container {
        padding: 1.5rem;
    }
    
    .order-summary {
        padding: 1.25rem;
        margin: 1.25rem 0;
    }
    
    .order-summary h3 {
        font-size: 1.1rem;
        margin-bottom: 0.875rem;
    }
    
    .summary-item {
        font-size: 0.95rem;
        padding: 0.5rem 0;
        word-wrap: break-word;
    }
    
    .summary-item.total {
        font-size: 1.1rem;
        padding-top: 0.875rem;
    }
    
    .payment-method {
        margin: 1.25rem 0;
    }
    
    .payment-method h3 {
        font-size: 1.1rem;
        margin-bottom: 0.875rem;
    }
    
    .payment-option {
        padding: 0.875rem;
        gap: 0.75rem;
        font-size: 0.95rem;
    }
    
    .payment-option i {
        font-size: 1.3rem;
    }
    
    .payment-note {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    /* 支付页面 */
    .payment-page {
        padding: 1.5rem 0;
    }
    
    .payment-container {
        gap: 1.5rem;
    }
    
    .order-info-card,
    .payment-form-card,
    .payment-instructions {
        padding: 1.5rem;
    }
    
    .order-info-card h3,
    .payment-form-card h3,
    .payment-instructions h3 {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
        line-height: 1.4;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-item span:last-child {
        text-align: left;
    }
    
    .info-item {
        padding: 0.75rem 0;
        font-size: 0.95rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .info-item span:first-child {
        flex: 0 0 auto;
        min-width: 80px;
    }
    
    .info-item span:last-child {
        flex: 1 1 auto;
        text-align: right;
        word-break: break-word;
    }
    
    .amount-highlight {
        font-size: 1.3rem;
    }
    
    .status-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.875rem;
    }
    
    .wallet-address {
        margin: 1.25rem 0;
    }
    
    .wallet-address label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    .address-box {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .address-box code {
        word-break: break-all;
        margin-bottom: 0;
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .btn-copy {
        width: 100%;
        justify-content: center;
    }
    
    .payment-steps {
        margin-top: 1.25rem;
    }
    
    .payment-steps h4 {
        font-size: 1rem;
        margin-bottom: 0.875rem;
    }
    
    .payment-steps ol {
        margin-left: 1.25rem;
        line-height: 1.8;
        font-size: 0.9rem;
    }
    
    .payment-steps li {
        margin-bottom: 0.5rem;
    }
    
    .payment-success {
        padding: 2rem 1.5rem;
    }
    
    .success-icon {
        font-size: 3.5rem;
    }
    
    .payment-success h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }
    
    .tx-hash {
        margin: 1.25rem 0;
        padding: 0.875rem;
    }
    
    .tx-hash code {
        font-size: 0.85rem;
    }
    
    /* 论坛详情页 */
    .forum-detail-page {
        padding: 2rem 0;
    }
    
    .forum-breadcrumb {
        margin-bottom: 0.875rem;
    }
    
    .forum-breadcrumb a {
        font-size: 0.9rem;
    }
    
    .forum-post-main {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .post-main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding-bottom: 0.875rem;
        margin-bottom: 1.25rem;
    }
    
    .post-author-info {
        width: 100%;
    }
    
    .author-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .author-name {
        font-size: 0.95rem;
    }
    
    .post-date {
        font-size: 0.85rem;
    }
    
    .post-main-content {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 1.25rem;
    }
    
    .post-main-footer {
        padding-top: 0.875rem;
    }
    
    .forum-replies-section {
        margin-bottom: 1.5rem;
    }
    
    .forum-replies-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.25rem;
    }
    
    .no-replies {
        padding: 2.5rem 1.5rem;
    }
    
    .no-replies i {
        font-size: 2.5rem;
    }
    
    .replies-list {
        gap: 0.875rem;
    }
    
    .reply-card {
        padding: 1.25rem;
    }
    
    .reply-author-info {
        gap: 0.75rem;
    }
    
    .author-avatar-small {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .author-details {
        flex: 1;
        min-width: 0;
    }
    
    .reply-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .reply-date {
        font-size: 0.8rem;
    }
    
    .reply-to {
        font-size: 0.85rem;
        padding: 0.4rem;
        margin-bottom: 0.75rem;
    }
    
    .reply-actions {
        margin-top: 0.875rem;
        padding-top: 0.875rem;
    }
    
    .btn-reply-to {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
        min-height: 38px;
    }
    
    .nested-reply {
        margin-left: 0.5rem !important;
        padding-left: 0.875rem;
    }
    
    .nested-reply-form {
        padding: 0.875rem;
        margin-top: 0.875rem;
    }
    
    .reply-form-inline textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 100px;
    }
    
    .reply-form-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .reply-form-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
    }
    
    .reply-form textarea {
        padding: 0.875rem;
        font-size: 0.95rem;
        min-height: 120px;
    }
    
    .reply-login-prompt {
        padding: 1.5rem;
        margin-top: 1.5rem;
        font-size: 0.95rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* 订单页面 */
    .orders-page {
        padding: 2rem 0;
    }
    
    .order-card {
        padding: 1.5rem;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .order-body {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .order-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    /* 联系页面 */
    .contact-page {
        padding: 2rem 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info,
    .contact-form-container {
        padding: 1.5rem;
    }
    
    /* 论坛页面 */
    .forum-page {
        padding: 2rem 0;
    }
    
    .forum-post-card {
        padding: 1.5rem;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .post-header h3 {
        font-size: 1.3rem;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .post-form-container {
        padding: 0 1rem;
    }
    
    .post-form {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* 页脚 */
    .footer {
        padding: 2rem 0 1rem;
        margin-top: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* 按钮 */
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    /* 表单 */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    /* 产品价格 */
    .product-price {
        padding: 0.875rem;
    }
    
    .price-amount {
        font-size: 1.3rem;
    }
    
    .product-price-small .price-amount {
        font-size: 1.1rem;
    }
    
    .amount-highlight {
        font-size: 1.3rem;
    }
    
    .amount-value {
        font-size: 1.2rem;
    }
}

/* 小屏手机 (< 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .nav-brand i {
        font-size: 1.3rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .feature-card,
    .product-info,
    .auth-card,
    .buy-product-info,
    .buy-form-container,
    .order-info-card,
    .payment-form-card,
    .contact-info,
    .contact-form-container,
    .forum-post-card,
    .post-form,
    .order-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .product-detail-page {
        padding: 1.25rem 0;
        min-height: auto;
    }
    
    .product-detail-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
        align-items: stretch;
    }
    
    .product-detail-image {
        border-radius: 10px;
        position: static;
        min-height: auto;
    }
    
    .product-detail-image img {
        max-height: 300px;
    }
    
    .product-detail-info {
        display: flex;
        flex-direction: column;
    }
    
    .product-detail-info h2 {
        font-size: 1.3rem;
        word-wrap: break-word;
    }
    
    .product-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .product-detail-price {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .price-amount-large {
        font-size: 1.3rem;
    }
    
    .product-detail-actions {
        margin-top: auto;
        padding-top: 1rem;
    }
    
    .product-detail-actions .btn {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    
    /* 购买表单小屏优化 */
    .product-detail-info .buy-form .order-summary {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .product-detail-info .buy-form .order-summary h3 {
        font-size: 1rem;
    }
    
    .product-detail-info .buy-form .summary-item {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }
    
    .product-detail-info .buy-form .summary-item.total {
        font-size: 1rem;
        padding-top: 0.75rem;
    }
    
    .product-detail-info .buy-form .payment-method {
        margin: 1rem 0;
    }
    
    .product-detail-info .buy-form .payment-method h3 {
        font-size: 1rem;
    }
    
    .product-detail-info .buy-form .payment-option {
        padding: 0.75rem;
        gap: 0.625rem;
        font-size: 0.9rem;
    }
    
    .product-detail-info .buy-form .payment-option i {
        font-size: 1.2rem;
    }
    
    .product-detail-info .buy-form .payment-note {
        font-size: 0.8rem;
    }
    
    /* 购买页面小屏优化 */
    .buy-page {
        padding: 1.25rem 0;
    }
    
    .buy-container {
        gap: 1.25rem;
    }
    
    .buy-product-info {
        padding: 1.25rem;
    }
    
    .buy-product-info h2 {
        font-size: 1.35rem;
        line-height: 1.3;
        margin-bottom: 0.625rem;
    }
    
    .buy-product-info p {
        font-size: 0.975rem;
        line-height: 1.65;
        margin-bottom: 1.25rem;
    }
    
    .buy-product-image-container {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .buy-product-image {
        max-height: 350px;
    }
    
    .buy-price {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .buy-price .price-amount {
        font-size: 1.6rem;
    }
    
    .buy-form-container {
        padding: 1.25rem;
    }
    
    .order-summary {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .order-summary h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .summary-item {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }
    
    .summary-item.total {
        font-size: 1rem;
        padding-top: 0.75rem;
    }
    
    .payment-method {
        margin: 1rem 0;
    }
    
    .payment-option {
        padding: 0.75rem;
        gap: 0.625rem;
        font-size: 0.9rem;
    }
    
    .payment-option i {
        font-size: 1.2rem;
    }
    
    .payment-note {
        font-size: 0.8rem;
    }
    
    /* 支付页面小屏优化 */
    .order-info-card h3,
    .payment-form-card h3,
    .payment-instructions h3 {
        font-size: 1.1rem;
    }
    
    .info-item {
        font-size: 0.9rem;
        padding: 0.625rem 0;
    }
    
    .info-item span:first-child {
        min-width: 70px;
    }
    
    .amount-highlight {
        font-size: 1.2rem;
    }
    
    .status-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.75rem;
    }
    
    .wallet-address label {
        font-size: 0.9rem;
    }
    
    .address-box {
        padding: 0.875rem;
    }
    
    .address-box code {
        font-size: 0.75rem;
    }
    
    .payment-steps h4 {
        font-size: 0.95rem;
    }
    
    .payment-steps ol {
        font-size: 0.85rem;
        margin-left: 1rem;
    }
    
    .payment-success {
        padding: 1.5rem 1.25rem;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .payment-success h3 {
        font-size: 1.2rem;
    }
    
    .tx-hash {
        padding: 0.75rem;
    }
    
    .tx-hash code {
        font-size: 0.75rem;
    }
    
    /* 论坛详情页小屏优化 */
    .forum-post-main {
        padding: 1.25rem;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .author-name {
        font-size: 0.9rem;
    }
    
    .post-date {
        font-size: 0.8rem;
    }
    
    .post-main-content {
        font-size: 0.9rem;
    }
    
    .forum-replies-section h2 {
        font-size: 1.2rem;
    }
    
    .no-replies {
        padding: 2rem 1.25rem;
    }
    
    .no-replies i {
        font-size: 2rem;
    }
    
    .reply-card {
        padding: 1rem;
    }
    
    .author-avatar-small {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .reply-content {
        font-size: 0.9rem;
    }
    
    .reply-date {
        font-size: 0.75rem;
    }
    
    .reply-to {
        font-size: 0.8rem;
    }
    
    .btn-reply-to {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        min-height: 36px;
    }
    
    .nested-reply {
        margin-left: 0.375rem !important;
        padding-left: 0.75rem;
    }
    
    .nested-reply-form {
        padding: 0.75rem;
    }
    
    .reply-form-inline textarea {
        padding: 0.625rem;
        font-size: 0.85rem;
        min-height: 90px;
    }
    
    .reply-form-section {
        padding: 1.25rem;
    }
    
    .reply-form-section h3 {
        font-size: 1.1rem;
    }
    
    .reply-form textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 100px;
    }
    
    .reply-login-prompt {
        padding: 1.25rem;
        font-size: 0.9rem;
    }
    
    .post-header h3 {
        font-size: 1.2rem;
    }
    
    /* 确保所有代码块和长文本可以换行 */
    code,
    .address-box code,
    .tx-hash code {
        font-size: 0.8rem;
        word-break: break-all;
        overflow-wrap: break-word;
    }
}

/* 超小屏手机 (< 360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-section {
        /* 超小屏可视区域高度，考虑底部导航栏 */
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        padding: 0;
        margin: 0;
        display: block;
    }
    
    .hero-background {
        height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
        min-height: calc(100vh - env(safe-area-inset-top, 0px) - 80px - env(safe-area-inset-bottom, 0px));
    }
    
    .hero-content {
        padding: 0 0.625rem !important;
        /* 移动端绝对居中 - 确保在所有移动设备都完美居中 */
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        max-width: 100% !important;
        /* 确保不受导航栏影响，完美居中 */
        margin: 0 !important;
        text-align: center !important; /* 确保超小屏文本居中 */
        /* PWA模式下确保居中 */
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .hero-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
        line-height: 1.2;
        text-align: center !important; /* 确保超小屏标题居中 */
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 0.5rem;
        line-height: 1.3;
        text-align: center !important; /* 确保超小屏副标题居中 */
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    .hero-description {
        font-size: 0.875rem !important;
        margin-bottom: 1rem;
        line-height: 1.5;
        text-align: center !important; /* 确保超小屏描述居中 */
        width: 100% !important;
        padding: 0 0.5rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    .hero-buttons {
        margin-top: 0.5rem !important;
        gap: 0.5rem !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .hero-buttons .btn {
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
        margin: 0 auto !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 300px !important;
    }
    
    .features-section {
        padding: 2rem 0;
        margin-top: 0;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .auth-card,
    .buy-product-info,
    .buy-form-container,
    .order-info-card,
    .payment-form-card,
    .payment-instructions {
        padding: 1rem;
    }
    
    .order-info-card h3,
    .payment-form-card h3,
    .payment-instructions h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .info-item {
        font-size: 0.9rem;
        padding: 0.625rem 0;
    }
    
    .amount-highlight {
        font-size: 1.2rem;
    }
    
    .forum-post-main,
    .reply-form-section,
    .reply-card {
        padding: 1rem;
    }
    
    .product-detail-page {
        padding: 1rem 0;
        min-height: auto;
    }
    
    .product-detail-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem;
        align-items: stretch;
    }
    
    .product-detail-image {
        position: static;
        min-height: auto;
    }
    
    .product-detail-info {
        display: flex;
        flex-direction: column;
    }
    
    .product-detail-info h2 {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .product-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .product-detail-price {
        padding: 0.875rem;
        margin-bottom: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .price-amount-large {
        font-size: 1.2rem;
    }
    
    .product-detail-actions {
        gap: 0.5rem;
        margin-top: auto;
        padding-top: 1rem;
    }
    
    .product-detail-actions .btn {
        font-size: 0.9rem;
        padding: 0.7rem 0.875rem;
        min-height: 44px;
        width: 100%;
    }
    
    /* 购买表单超小屏优化 (360px) */
    .product-detail-info .buy-form .form-group {
        margin-bottom: 1.25rem;
    }
    
    .product-detail-info .buy-form .form-group input[type="number"] {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .product-detail-info .buy-form .order-summary {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .product-detail-info .buy-form .order-summary h3 {
        font-size: 0.95rem;
    }
    
    .product-detail-info .buy-form .summary-item {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }
    
    .product-detail-info .buy-form .summary-item.total {
        font-size: 0.95rem;
        padding-top: 0.75rem;
    }
    
    .product-detail-info .buy-form .payment-method {
        margin: 1rem 0;
    }
    
    .product-detail-info .buy-form .payment-method h3 {
        font-size: 0.95rem;
    }
    
    .product-detail-info .buy-form .payment-option {
        padding: 0.7rem;
        gap: 0.625rem;
        font-size: 0.85rem;
    }
    
    .product-detail-info .buy-form .payment-option i {
        font-size: 1.2rem;
    }
    
    .product-detail-info .buy-form .payment-note {
        font-size: 0.75rem;
    }
    
    .product-detail-info .buy-form .product-detail-actions {
        margin-top: 1.5rem;
    }
    
    .buy-page {
        padding: 1rem 0;
    }
    
    .buy-container {
        gap: 1rem;
    }
    
    .buy-product-info {
        padding: 1rem;
    }
    
    .buy-product-info h2 {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 0.875rem;
    }
    
    .buy-product-info p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .buy-product-image-container {
        padding: 0.625rem;
        margin-bottom: 1rem;
    }
    
    .buy-product-info h2 {
        font-size: 1.2rem;
        line-height: 1.3;
        margin-bottom: 0.625rem;
    }
    
    .buy-product-info p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .buy-product-image-container {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .buy-product-image {
        max-height: 280px;
    }
    
    .buy-price {
        padding: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .buy-price .price-amount {
        font-size: 1.5rem;
    }
    
    .buy-form-container {
        padding: 1rem;
    }
    
    .buy-form-container .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
        min-height: 44px;
    }
    
    .order-summary {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .order-summary h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .summary-item {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }
    
    .summary-item.total {
        font-size: 1.05rem;
        padding-top: 0.75rem;
    }
    
    .payment-method {
        margin: 1rem 0;
    }
    
    .payment-method h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .payment-option {
        padding: 0.75rem;
        gap: 0.625rem;
        font-size: 0.9rem;
    }
    
    .payment-option i {
        font-size: 1.2rem;
    }
    
    .payment-note {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    .order-info-card h3,
    .payment-form-card h3,
    .payment-instructions h3 {
        font-size: 1rem;
    }
    
    .forum-replies-section h2 {
        font-size: 1.1rem;
    }
    
    .reply-form-section h3 {
        font-size: 1rem;
    }
    
    .author-avatar {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .author-avatar-small {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

.main-content {
    min-height: calc(100vh - 200px);
    /* PWA 模式下确保内容不被状态栏和导航栏遮挡 */
    padding-top: 0;
    /* 安全区域适配 */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
}

/* PWA 模式下的主内容优化 - 已在上面定义，这里删除重复 */

/* 产品价格样式 */
.product-price {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 5px;
    border: 1px solid var(--primary-color);
}

.price-label {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.product-price-small {
    margin: 0.5rem 0;
}

.product-price-small .price-amount {
    font-size: 1.2rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.product-actions-small {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: 40px; /* 触摸友好的最小高度 */
    touch-action: manipulation;
}

/* 产品详情页 */
.product-detail-page {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.product-detail-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2rem;
    align-items: stretch;
}


/* 产品图片展示区域 */
.product-detail-images-section {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    order: -1 !important;
}

/* 图片轮播容器 */
.product-image-carousel {
    position: relative;
    width: 100%;
}

.carousel-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* 轮播按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background: rgba(0, 212, 255, 0.8);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* 指示器（小圆点） */
.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
}

.indicator:hover {
    background: rgba(0, 212, 255, 0.5);
    border-color: var(--primary-color);
    transform: scale(1.2);
}

.indicator.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    width: 12px;
    height: 12px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

/* 占位图 */
.product-image-placeholder {
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.product-image-placeholder img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}


.product-detail-info {
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.product-detail-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.3;
}

.product-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    flex-grow: 0;
}

.product-detail-meta {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-grow: 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.product-detail-price {
    padding: 1.5rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    margin-bottom: 2rem;
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.price-label {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-right: 0.5rem;
}

.price-amount-large {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
}

.product-detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
}

.product-detail-actions .btn {
    min-height: 44px;
    touch-action: manipulation;
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* 购买表单样式 */
.product-detail-info .buy-form {
    margin-top: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.product-detail-info .buy-form .form-group {
    margin-bottom: 1.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.product-detail-info .buy-form .form-group label {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

.product-detail-info .buy-form .form-group input[type="number"] {
    width: 100% !important;
    padding: 0.8rem !important;
    background: var(--bg-dark) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 5px !important;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    min-height: 44px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
}

.product-detail-info .buy-form .form-group input[type="number"]:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1) !important;
}

.product-detail-info .buy-form .order-summary {
    background: var(--bg-dark) !important;
    padding: 1.5rem !important;
    border-radius: 10px !important;
    margin: 1.5rem 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.product-detail-info .buy-form .order-summary h3 {
    margin-bottom: 1rem !important;
    color: var(--text-primary) !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
}

.product-detail-info .buy-form .summary-item {
    display: flex !important;
    justify-content: space-between !important;
    padding: 0.5rem 0 !important;
    color: var(--text-secondary) !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    gap: 0.5rem !important;
}

.product-detail-info .buy-form .summary-item span:first-child {
    flex-shrink: 0 !important;
}

.product-detail-info .buy-form .summary-item span:last-child {
    text-align: right !important;
    word-break: break-word !important;
}

.product-detail-info .buy-form .summary-item.total {
    border-top: 1px solid var(--border-color) !important;
    padding-top: 1rem !important;
    margin-top: 0.5rem !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    color: var(--primary-color) !important;
}

.product-detail-info .buy-form .payment-method {
    margin: 1.5rem 0 !important;
    width: 100% !important;
}

.product-detail-info .buy-form .payment-method h3 {
    margin-bottom: 0.75rem !important;
    color: var(--text-primary) !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.product-detail-info .buy-form .payment-option {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1rem !important;
    background: var(--bg-dark) !important;
    border-radius: 5px !important;
    border: 2px solid var(--border-color) !important;
    margin-top: 0.5rem !important;
}

.product-detail-info .buy-form .payment-option.selected {
    border-color: var(--primary-color) !important;
    background: rgba(0, 212, 255, 0.1) !important;
}

.product-detail-info .buy-form .payment-option i {
    font-size: 1.5rem !important;
    color: var(--primary-color) !important;
}

.product-detail-info .buy-form .check-icon {
    margin-left: auto !important;
    color: var(--primary-color) !important;
}

.product-detail-info .buy-form .payment-note {
    color: var(--text-secondary) !important;
    font-size: 0.9rem !important;
    margin-top: 0.5rem !important;
    line-height: 1.5 !important;
}

.product-detail-info .buy-form .product-detail-actions {
    margin-top: 2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 购买页面 */
.buy-page {
    padding: 2rem 0;
}

.buy-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.buy-product-info {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.buy-product-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.buy-product-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    margin-bottom: 2rem;
}

.buy-product-image-container {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.buy-product-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    background: var(--bg-dark);
    border-radius: 10px;
}

.buy-price {
    padding: 1.5rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    margin-bottom: 2rem;
}

.buy-price .price-label {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-right: 0.5rem;
}

.buy-price .price-amount {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.buy-form-container {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.buy-form-container .btn {
    min-height: 44px;
    touch-action: manipulation;
    width: 100%;
}

.order-summary {
    background: var(--bg-dark);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.order-summary h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    gap: 0.5rem;
}

.summary-item span:first-child {
    flex-shrink: 0;
}

.summary-item span:last-child {
    text-align: right;
    word-break: break-word;
}

.summary-item.total {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.payment-method {
    margin: 1.5rem 0;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 5px;
    border: 2px solid var(--border-color);
    margin-top: 0.5rem;
}

.payment-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
}

.payment-option i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.check-icon {
    margin-left: auto;
    color: var(--primary-color);
}

.payment-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 支付页面 */
.payment-page {
    padding: 2rem 0;
}

.payment-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.order-info-card,
.payment-form-card,
.payment-instructions {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.order-info-card h3,
.payment-form-card h3,
.payment-instructions h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item span:first-child {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.info-item span:last-child {
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    color: var(--text-primary);
}

.amount-highlight {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-pending {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
    border: 1px solid #f5576c;
}

.status-paid {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
    border: 1px solid #43e97b;
}

.status-completed {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.status-cancelled {
    background: rgba(184, 188, 200, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.wallet-address {
    margin: 1.5rem 0;
}

.address-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-dark);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 0.5rem;
}

.address-box code {
    flex: 1;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.btn-copy {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* 触摸友好的最小高度 */
    touch-action: manipulation;
}

.btn-copy:hover {
    background: #00b8e6;
    transform: translateY(-2px);
}

.payment-steps {
    margin-top: 1.5rem;
}

.payment-steps ol {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 2;
}

.payment-steps strong {
    color: var(--primary-color);
}

.payment-success {
    text-align: center;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.success-icon {
    font-size: 4rem;
    color: #43e97b;
    margin-bottom: 1rem;
}

.tx-hash {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 5px;
}

.tx-hash code {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* 订单列表页 */
.orders-page {
    padding: 3rem 0;
    min-height: 60vh;
}

.orders-filter {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.orders-filter strong {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.empty-orders {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.empty-orders i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.order-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.order-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.order-date i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.order-dates {
    flex: 1;
}

.order-details {
    margin-top: 1rem;
}

.order-details p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.order-details i {
    margin-right: 0.5rem;
    color: var(--primary-color);
    width: 16px;
}

.order-details code.tx-hash {
    background: var(--bg-darker);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    word-break: break-all;
    color: var(--primary-color);
}

.status-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.status-text.status-paid {
    color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
}

.status-text.status-completed {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.status-text.status-cancelled {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.amount-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.text-success {
    color: #43e97b;
}

/* 论坛详情页样式 */
.forum-breadcrumb {
    margin-bottom: 1rem;
}

.forum-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.forum-breadcrumb a:hover {
    color: var(--text-primary);
}

.forum-detail-page {
    padding: 2rem 0;
}

.forum-post-main {
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-bottom: 2rem;
}

.post-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    }
    
.author-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-main-content {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
}

.post-main-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.replies-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forum-replies-section {
    margin-bottom: 2rem;
}

.forum-replies-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    }
    
.no-replies {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.no-replies i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.replies-list {
    display: flex;
        flex-direction: column;
        gap: 1rem;
}

.reply-card {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.reply-card:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.reply-header {
    margin-bottom: 1rem;
}

.reply-author-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.author-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    }

.reply-content {
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
}

.reply-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.reply-form-section {
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: 2rem;
}

.reply-form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

.reply-form .form-group {
    margin-bottom: 1.5rem;
}

.reply-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.reply-form label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.reply-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    -webkit-appearance: none;
    appearance: none;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.reply-login-prompt {
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
}

.reply-login-prompt a {
    color: var(--primary-color);
    text-decoration: none;
}

.reply-login-prompt a:hover {
    text-decoration: underline;
}

.nested-reply {
    border-left: 3px solid var(--primary-color);
    margin-top: 1rem;
    background: var(--bg-dark);
    margin-left: calc(var(--reply-depth, 0) * 2rem) !important;
}

/* 移动端嵌套回复优化 */
@media (max-width: 768px) {
    .nested-reply {
        margin-left: calc(var(--reply-depth, 0) * 0.75rem) !important;
        padding-left: 0.875rem;
        border-left-width: 2px;
    }
}

@media (max-width: 480px) {
    .nested-reply {
        margin-left: calc(var(--reply-depth, 0) * 0.5rem) !important;
        padding-left: 0.75rem;
        border-left-width: 2px;
    }
}

.reply-to {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: 5px;
}

.reply-to i {
    margin-right: 0.3rem;
    color: var(--primary-color);
}

.reply-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-reply-to {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    touch-action: manipulation;
}

.btn-reply-to:hover {
    background: var(--primary-color);
    color: white;
}

.nested-reply-form {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.reply-form-inline textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    -webkit-appearance: none;
    appearance: none;
}

.reply-form-inline textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* 支付说明区域样式已在.payment-instructions基础样式中定义 */
.payment-instructions h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* ================================
   全局响应式优化和修复
   确保所有页面在所有设备上正确显示
   ================================ */

/* 桌面端大屏优化 (>= 1441px) */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }
}

/* 桌面端标准屏 (769px - 1440px) */
@media (min-width: 769px) and (max-width: 1440px) {
    .container {
        max-width: 1200px;
        padding: 0 20px;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
}

/* 平板横屏 (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 1.5rem 0.75rem;
    }
}

/* 移动端竖屏 (<= 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
        padding-left: calc(12px + env(safe-area-inset-left, 0px));
        padding-right: calc(12px + env(safe-area-inset-right, 0px));
    }
    
    .main-content {
        padding: 1rem 0.5rem;
    }
    
    body {
        font-size: 14px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
}

/* 确保所有表格在小屏幕上可以横向滚动 */
@media (max-width: 768px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table thead,
    table tbody,
    table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}

/* 确保所有表单元素在小屏幕上可读 */
@media (max-width: 480px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important; /* 防止iOS自动缩放 */
        min-height: 44px; /* 触摸友好的最小高度 */
    }
}

/* 确保所有按钮在小屏幕上易于点击 */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1rem;
    }
    
    button,
    a.btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.3);
    }
}

/* 确保所有卡片和容器在小屏幕上正确显示 */
@media (max-width: 768px) {
    .card,
    .product-card,
    .feature-card,
    .post-card,
    .order-card {
        width: 100%;
        margin: 0 auto 1.5rem;
        padding: 1rem;
    }
}

/* PWA 桌面端特殊优化 */
@media (min-width: 769px) and (display-mode: standalone) {
    body {
        zoom: 1;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    html {
        zoom: 1;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }
}

/* ================================
   全局居中覆盖 - 确保所有设备和模式都居中
   最高优先级，覆盖所有之前的样式
   ================================ */

/* 强制所有hero元素居中 */
.hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.hero-title,
.hero-subtitle,
.hero-description {
    text-align: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

.hero-buttons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
}

.hero-buttons .btn {
    margin: 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* 确保在所有响应式断点中都居中 */
@media (max-width: 768px) {
    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-description {
        text-align: center !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    .hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
    
    .hero-buttons .btn {
        margin: 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* PWA模式下的居中覆盖 */
@media (display-mode: standalone) {
    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-description {
        text-align: center !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
    
    .hero-buttons {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
    }
    
    .hero-buttons .btn {
        margin: 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    /* PWA移动端：按钮垂直排列 */
    @media (max-width: 768px) {
        .hero-buttons {
            flex-direction: column !important;
        }
        
        .hero-buttons .btn {
            width: 100% !important;
            max-width: 300px !important;
        }
    }
}

/* 桌面端：按钮水平排列 */
@media (min-width: 769px) {
    .hero-buttons {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .hero-buttons .btn {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
    }
}

/* 论坛消息列表布局 */
.forum-messages-container {
    min-height: calc(100vh - 200px);
    background: var(--bg-dark);
    padding: 2rem 0;
}

.forum-messages-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - 300px);
    min-height: 600px;
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

/* 左侧消息列表面板 */
.messages-list-panel {
    width: 400px;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    overflow: hidden;
}

.messages-list-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 14, 39, 0.5);
}

.messages-list-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-new-post {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-new-post:hover {
    background: #00b8e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.messages-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.messages-search input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: rgba(26, 31, 58, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.messages-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(26, 31, 58, 0.8);
}

.messages-search i {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.messages-list::-webkit-scrollbar {
    width: 6px;
}

.messages-list::-webkit-scrollbar-track {
    background: transparent;
}

.messages-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.messages-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 消息项 */
.message-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.message-item:hover {
    background: rgba(0, 212, 255, 0.05);
}

.message-item.active {
    background: rgba(0, 212, 255, 0.1);
    border-left: 3px solid var(--primary-color);
}

.message-item.pinned {
    border-left: 3px solid var(--primary-color);
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.1) 0%, var(--bg-card) 5%);
}

.message-item-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.message-info {
    flex: 1;
    min-width: 0;
}

.message-author-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.message-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.pinned-badge {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.message-time {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.message-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-preview {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.message-date,
.message-replies-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 右侧消息详情面板 */
.message-detail-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    overflow: hidden;
}

.message-detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0;
}

.message-detail-content::-webkit-scrollbar {
    width: 6px;
}

.message-detail-content::-webkit-scrollbar-track {
    background: transparent;
}

.message-detail-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.message-detail-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.btn-back-mobile {
    display: none;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back-mobile:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
}

.message-detail-header h2 {
    font-size: 1.75rem;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.message-detail-meta {
    margin-top: 1rem;
}

.message-detail-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.message-detail-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-detail-body {
    padding: 2rem;
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1rem;
    background: var(--bg-dark);
}

.message-detail-body p {
    margin: 0;
}

.message-detail-replies {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    flex: 1;
}

.message-detail-replies h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.replies-list {
    margin-bottom: 2rem;
}

.no-replies {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-replies i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.message-detail-reply-form {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.message-detail-reply-form h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-detail-reply-form .reply-form {
    margin-top: 1rem;
}

.message-detail-reply-form .form-group {
    margin-bottom: 1rem;
}

.message-detail-reply-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(26, 31, 58, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.message-detail-reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(26, 31, 58, 0.8);
}

.message-detail-login-prompt {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.message-detail-login-prompt a {
    color: var(--primary-color);
    text-decoration: none;
}

.message-detail-login-prompt a:hover {
    text-decoration: underline;
}

.message-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    padding: 2rem;
}

.message-detail-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.message-detail-empty p {
    font-size: 1.1rem;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .forum-messages-container {
        padding: 1rem 0;
    }
    
    .forum-messages-layout {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 200px);
        border-radius: 0;
    }
    
    .messages-list-panel {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .messages-list-panel.hidden-mobile {
        display: none;
    }
    
    .message-detail-panel {
        display: none;
    }
    
    .message-detail-panel.show {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        background: var(--bg-dark);
    }
    
    .btn-back-mobile {
        display: inline-flex;
    }
    
    .messages-list-header {
        padding: 1rem;
    }
    
    .messages-list-header h2 {
        font-size: 1.25rem;
    }
    
    .message-item {
        padding: 1rem;
    }
    
    .message-detail-header,
    .message-detail-body,
    .message-detail-replies,
    .message-detail-reply-form {
        padding: 1.5rem;
    }
}