/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

/* 全局取消滚动条 */
*::-webkit-scrollbar {
    display: none !important;
}

* {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* 页面基础背景 */
body {
    background-color: #f8d7da !important;
    color: #333;
    overflow-x: hidden;
}

html {
    background-color: #f8d7da !important;
}

/* 主容器 */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: #f8d7da;
    min-height: 100vh;
    position: relative;
    padding-bottom: 70px;
    overflow-x: hidden;
}

/* ====================== 头部标题栏 ====================== */
.app-header {
    background-color: #f8d7da;
    padding: 8px 15px;
    text-align: center;
    border-bottom: 1px solid #e6b8bc;
}

.app-header h1 {
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

/* ====================== 内容区域通用 ====================== */
.app-content {
    padding: 15px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* ====================== 首页 - 横幅 ====================== */
.banner {
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 4px solid #A67C80;
}

.banner img {
    width: 100%;
    display: block;
}

/* ====================== 首页 - 功能按钮 ====================== */
.function-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.func-btn {
    flex: 1;
    margin: 0 5px;
    padding: 12px 0;
    background-color: #f5e6e8;
    border: 2px solid #d4a5a9;
    border-radius: 15px;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.func-btn:hover {
    background-color: #e6b8bc;
}

/* ====================== 首页 - 板块标题 ====================== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.cloud-icon {
    font-size: 24px;
    color: #a67c80;
    margin: 0 15px;
}

.section-title h2 {
    font-size: 28px;
    color: #5a3e41;
    font-weight: bold;
}

/* ====================== 首页 - 商品网格 ====================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.product-card {
    background-color: #f5e6e8;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    height: 180px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 200, 200, 0.9);
    color: #333;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.coin-icon {
    color: #f39c12;
    margin-right: 5px;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #d9534f;
}

.sales {
    font-size: 14px;
    color: #666;
}

/* ====================== 分类页 ====================== */
.search-bar {
    background-color: #e6b8bc;
    padding: 15px;
    margin: -15px -15px 15px -15px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background-color: #f5e6e8;
}

.search-icon {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

.category-container {
    display: flex;
    height: calc(100vh - 180px);
}

.category-sidebar {
    width: 120px;
    background-color: #f8d7da;
    border-right: 1px solid #e6b8bc;
    overflow-y: auto;
}

.category-logo {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e6b8bc;
}

.category-logo img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    margin-bottom: 5px;
}

.category-logo p {
    font-size: 14px;
    color: #333;
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.category-list li.active {
    background-color: #f5e6e8;
    border-left-color: #d9534f;
    font-weight: bold;
}

.category-products {
    flex: 1;
    padding: 0 10px;
    overflow-y: auto;
}

.category-product-card {
    display: flex;
    background-color: #d9888f;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-product-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-thumb {
    width: 100px;
    height: 100px;
    position: relative;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-tag {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: rgba(255, 200, 200, 0.9);
    color: #333;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.product-details {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-meta .price {
    color: #fff;
}

.product-meta .sales {
    color: #f0d0d3;
}

.empty-message {
    text-align: center;
    padding: 50px 0;
    color: #999;
    font-size: 18px;
}

/* ====================== 个人中心页 ====================== */
.profile-header {
    text-align: center;
    padding: 30px 0;
    background-color: #f8d7da;
    margin: -15px -15px 0 -15px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid #fff;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username {
    font-size: 24px;
    color: #5a3e41;
    font-weight: bold;
}

.balance-card {
    background-color: #f5e6e8;
    border-radius: 15px;
    padding: 20px;
    margin: -20px 15px 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #d4a5a9;
}

.balance-info {
    display: flex;
    align-items: center;
}

.coin-icon.large {
    font-size: 36px;
    margin-right: 15px;
}

.balance-amount {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    display: block;
}

.balance-label {
    font-size: 16px;
    color: #666;
    margin-top: 5px;
}

.functions-section {
    background-color: #d4c4c6;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.section-subtitle {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.functions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.function-item {
    text-align: center;
    cursor: pointer;
}

.function-item i {
    font-size: 32px;
    color: #5a3e41;
    margin-bottom: 10px;
}

.function-item p {
    font-size: 14px;
    color: #333;
}

.footer-link {
    text-align: center;
    color: #999;
    font-size: 14px;
}

.order-back-btn {
    display: none;
    margin: 12px 0 12px 15px;
    padding: 6px 14px;
    background: rgba(217, 83, 79, 0.1);
    border: 1px solid #d9534f;
    color: #d9534f;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    align-items: center;
    gap: 4px;
    width: fit-content;
    box-sizing: border-box;
}

.order-back-btn:hover {
    background: #d9534f;
    color: #fff;
}

.order-iframe-box {
    display: none;
    height: calc(100vh - 200px);
    width: 100%;
    border: none;
}

.profile-main {
    display: block;
}

/* ====================== 底部导航 ====================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 2px solid #d4a5a9;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 9998;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    color: #d4a5a9;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: #fff;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 5px;
}

.nav-item span {
    font-size: 14px;
}

/* ====================== 商品详情页 ====================== */
.detail-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #f8d7da;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e6b8bc;
}

.detail-header .detail-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.back-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #d4888e;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-banner {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 55px;
}

.detail-banner img {
    width: 100%;
    display: block;
}

.price-sales {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.detail-price {
    font-size: 28px;
    font-weight: bold;
    color: #d9534f;
}

.detail-sales {
    font-size: 22px;
    color: #999;
}

.service-section {
    background-color: #faf0f1;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 10px;
    border: 1px solid #f5e6e8;
}

.service-title {
    font-size: 26px;
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}

.service-content {
    font-size: 18px;
    line-height: 1.2;
    color: #333;
}

.service-content p {
    margin-bottom: 8px;
}

.detail-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 10%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background-color: #f8d7da; 
    padding: 15px;
    border-top: 1px solid #f5c6cb; 
    display: none !important;
}

.contact-btn {
    width: 100%;
    padding: 15px;
    background-color: #fff;
    border: 2px solid #d4a5a9;
    border-radius: 25px;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background-color: #f5e6e8;
}

.detail-active #main-bottom-nav {
    display: none;
}

.detail-active #detail-bottom-bar {
    display: block;
}

#detail-page {
    padding-bottom: 100px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: relative;
}

/* ====================== 下单表单 ====================== */
#order-form-wrap {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
    background-color: #fcf1f2;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #f5e6e8;
}

.login-area {
    background-color: #faf0f1;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid #f5e6e8;
}

.login-area .login-btn {
    background-color: #f5b7bd;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.order-form-section {
    padding: 15px;
    background: #fcf1f2;
    margin: 0;
    border-radius: 8px;
    box-shadow: none;
}

.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-required {
    color: #f44336;
    margin-left: 3px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #faf0f1;
}

.form-input:focus {
    outline: none;
    border-color: #d9534f;
}

.pay-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.pay-method {
    display: flex;
    align-items: center;
    padding: 12px 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    background: #faf0f1;
    transition: all 0.2s ease;
}

.pay-method.active {
    border-color: #d9534f;
    background: #fef0f0;
    box-shadow: 0 0 0 2px rgba(217,83,79,0.1);
}

.pay-method input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #d9534f;
}

.pay-method-icon {
    width: 22px;
    height: 22px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-group {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-top: 2px solid #f5c6cb; 
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 9999;
    box-sizing: border-box;
    outline: none;
}

.btn {
    flex: 1;
    padding: 15px 0;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    margin: 0;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.btn-contact {
    background: linear-gradient(135deg, #f9e0e3 0%, #f7ccd2 100%);
    color: #d4888e;
    border: 1px solid #f5b7bd;
}

.btn-order {
    background: linear-gradient(135deg, #f7ccd2 0%, #f5b7bd 100%);
    color: #fff;
    border: 1px solid #f2a4ac;
}

.btn-contact:hover {
    background: linear-gradient(135deg, #f7ccd2 0%, #f5b7bd 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

.btn-order:hover {
    background: linear-gradient(135deg, #f5b7bd 0%, #f2a4ac 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ====================== 客服弹窗 ====================== */
.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.service-modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 15px;
    width: 100%;
    max-width: 320px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8d7da;
    border-bottom: 1px solid #e6b8bc;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    text-align: center;
}

.qrcode-container {
    margin-bottom: 15px;
}

.wechat-qrcode {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 10px;
    border: 5px solid #f8d7da;
    display: block;
    margin: 0 auto;
}

.service-time {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.service-tip {
    font-size: 14px;
    color: #999;
}

/* ====================== 商务合作弹窗 ====================== */
.business-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.business-modal .modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.business-modal .modal-header {
    background: #f8d7da;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.business-modal .modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.business-modal .close-modal {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.business-modal .modal-body {
    padding: 30px 20px;
    text-align: center;
}

.business-modal .wechat-label {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.business-modal .wechat-code {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.business-modal .wechat-code span {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    background: #f5f5f5;
    padding: 10px 20px;
    border-radius: 8px;
}

.business-modal .copy-btn {
    background: #f8d7da;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.business-modal .copy-btn:hover {
    background: #f5c6cb;
}

.business-modal .tip {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* ====================== 充值弹窗 ====================== */
.recharge-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.recharge-modal.show {
    display: flex;
}
.recharge-box {
    width: 90%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
}
.recharge-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}
.recharge-levels {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.recharge-level {
    padding: 12px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}
.recharge-level.active {
    background: #d9534f;
    color: #fff;
    border-color: #d9534f;
}
.recharge-amount {
    display: none;
}
.recharge-btn {
    width: 100%;
    padding: 12px;
    background: #d9534f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}
.recharge-close {
    margin-top: 12px;
    color: #999;
    cursor: pointer;
}

/* ====================== 充值记录弹窗 ====================== */
.recharge-record-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.recharge-record-modal.show {
    display: flex;
}
.record-box {
    width: 92%;
    max-width: 400px;
    max-height: 70vh;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow-y: auto;
}
.record-title {
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}
.record-close {
    position: absolute;
    top: 15px; right: 15px;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}
.record-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.record-item {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.record-money {
    color: #d9534f;
    font-weight: bold;
}
.record-time {
    color: #999;
    font-size: 12px;
}
.no-record {
    text-align: center;
    padding: 30px 0;
    color: #999;
}

/* ====================== 支付弹窗 ====================== */
.pay-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.pay-modal.active {
    display: flex;
}
.pay-modal-content {
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    max-height: 80vh;
}
.pay-modal-header {
    padding: 15px;
    background: #d9534f;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pay-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.pay-iframe {
    width: 100%;
    height: 500px;
    border: none;
}

/* ====================== 优惠券弹窗 ====================== */
.coupon-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.coupon-modal.show {
    display: flex !important;
}
.coupon-box {
    width: 320px;
    height: 420px;
    background: #fff;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-sizing: border-box;
}
.coupon-box .record-title {
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    margin: 0 0 15px 0;
}
.coupon-box .record-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}
.coupon-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.coupon-list::-webkit-scrollbar {
    display: none;
}
.coupon-item {
    background: linear-gradient(90deg, #ff6b6b, #d9534f);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}
.coupon-item.used {
    background: #ccc !important;
}
.coupon-item.expired {
    background: #999 !important;
}
.coupon-money {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 2px;
}
.coupon-name {
    font-size: 13px;
    margin-bottom: 4px;
}
.coupon-limit {
    font-size: 11px;
    opacity: 0.9;
}
.coupon-time {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.8;
}
.no-coupon {
    text-align: center;
    padding: 20px 0;
    color: #999;
    font-size: 14px;
}

/* ====================== 售后弹窗 ====================== */
.after-sale-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.after-sale-modal.show {
    display: flex !important;
}
.after-sale-box {
    width: 420px;
    height: 520px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
}
.after-sale-box .record-title {
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}
.after-sale-box .record-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}
.after-tab-bar {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}
.after-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    cursor: pointer;
    color: #666;
}
.after-tab.active {
    color: #d9534f;
}
.after-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}
.after-order-item {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
}
.after-order-item.active {
    border-color: #d9534f;
    background: #fef5f5;
}
.after-price {
    color: #d9534f;
    font-weight: bold;
    font-size: 14px;
    margin-top: 3px;
}
.after-players {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}
#afterReason {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    height: 90px;
    margin-bottom: 12px;
}
.after-sale-box button {
    width: 100%;
    padding: 12px;
    background: #d9534f;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* ====================== PC 端适配 ====================== */
@media (min-width: 768px) {
    .app-container {
        max-width: 800px;
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .category-container {
        height: calc(100vh - 160px);
    }
    .detail-bottom-bar, .bottom-nav, .btn-group {
        max-width: 800px;
    }
    .modal-content {
        max-width: 350px;
    }
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 1000px;
    }
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .detail-bottom-bar, .bottom-nav, .btn-group {
        max-width: 1000px;
    }
}

/* 打赏弹窗 */
.gift-reward-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.gift-reward-box {
    width: 90%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}
.gift-subtitle {
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}
.peiwan-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
}
.peiwan-list {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 10px;
}
.peiwan-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.peiwan-item.active {
    background: #f0f5ff;
    color: #0066ff;
}
.selected-peiwan, .selected-gift {
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 10px;
}

/* 左右布局核心 */
.gift-history-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}
.gift-left-section {
    width: 50%;
}
.history-right-section {
    width: 50%;
}

/* 礼物图标样式 */
.gift-list-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    max-height: 160px;
    overflow-y: auto;
}
.gift-item-icon {
    width: 48%;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    box-sizing: border-box;
}
.gift-item-icon.active {
    background: #fef1f0;
    border-color: #ff4d6d;
    color: #ff4d6d;
}
.gift-icon {
    font-size: 28px !important;
    margin-bottom: 8px !important;
    display: block !important;
}
.gift-price {
    font-size: 11px;
    color: #999;
}

/* 打赏记录 - 单列竖排 */
.reward-history {
    max-height: 160px;
    overflow-y: auto;
    font-size: 12px;
    padding: 4px;
    background: #fafafa;
    border-radius: 8px;
}
.history-item {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}
.history-item span {
    display: block;
}
.history-item span:last-child {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.no-record {
    text-align: center;
    padding: 10px;
    color: #999;
}

.gift-submit-btn {
    width: 100%;
    padding: 10px;
    background: #ff4d6d;
    color: #fff;
    border: none;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: bold;
}

/* ====================== 礼物图标彩色渐变最终版（无BUG） ====================== */
.gift-item-icon .gift-icon {
    font-size: 24px !important;
    margin-bottom: 8px !important;
    display: block !important;
    text-align: center;
}

/* 火箭 */
.gift-item-icon:nth-child(1) .gift-icon i {
    background: linear-gradient(to right, #ff4d6d, #ff9a44) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 26px !important;
}
/* 飞机 */
.gift-item-icon:nth-child(2) .gift-icon i {
    background: linear-gradient(to right, #4facfe, #00f2fe) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 26px !important;
}
/* 跑车 */
.gift-item-icon:nth-child(3) .gift-icon i {
    background: linear-gradient(to right, #f7971e, #ffd200) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 26px !important;
}
/* 钻石 */
.gift-item-icon:nth-child(4) .gift-icon i {
    background: linear-gradient(to right, #84fab0, #8fd3f4) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 26px !important;
}
/* 玫瑰/告白 */
.gift-item-icon:nth-child(5) .gift-icon i {
    background: linear-gradient(to right, #fa709a, #fee140) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 26px !important;
}
/* 啤酒 */
.gift-item-icon:nth-child(6) .gift-icon i {
    background: linear-gradient(to right, #ffc371, #ff5f6d) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-size: 26px !important;
}

.gift-item-icon.active .gift-icon i {
    transform: scale(1.1) !important;
    filter: drop-shadow(0 0 3px rgba(255,77,109,0.5)) !important;
}

.gift-item-icon {
    border: 1px solid #f5f5f5 !important;
    border-radius: 10px !important;
    padding: 10px 2px !important;
    transition: all 0.2s !important;
}
.gift-item-icon:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

/* 超大尺寸广告弹窗 */
.ad-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85); /* 背景更暗，突出广告 */
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px 0; /* 上下留一点点边距 */
}
.ad-box {
    position: relative;
    width: 95%; /* 宽度占屏幕95%（超大） */
    max-width: 600px; /* 大屏也不会太宽 */
}
/* 超大长方形图片样式 */
.ad-img {
    width: 100%;
    height: auto; /* 高度自适应，保证图片不变形 */
    max-height: 90vh; /* 最大高度占屏幕90%，不会超出屏幕 */
    object-fit: contain; /* 完整显示图片，不裁剪 */
    border-radius: 12px;
    display: block;
}
/* 关闭按钮也放大一点，方便点击 */
.ad-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 44px; /* 更大的关闭按钮 */
    height: 44px;
    background: #000;
    color: #fff;
    border: 2px solid #fff; /* 加白色边框，更显眼 */
    border-radius: 50%;
    text-align: center;
    line-height: 40px; /* 居中对齐× */
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}