/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1890ff;
    --secondary-color: #40a9ff;
    --accent-color: #69c0ff;
    --dark-bg: #f0f5ff;
    --card-bg: #ffffff;
    --text-light: #262626;
    --text-gray: #8c8c8c;
    --success-color: #52c41a;
    --border-color: #d9d9d9;
    --shadow-light: rgba(24, 144, 255, 0.08);
    --shadow-medium: rgba(24, 144, 255, 0.15);
    --gradient-1: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    --gradient-2: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    --gradient-3: linear-gradient(135deg, #69c0ff 0%, #40a9ff 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, #e6f7ff 0%, #f0f5ff 100%);
    z-index: -1;
}

/* 容器 */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航 */
.header {
    background: var(--card-bg);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px var(--shadow-light);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.user-balance {
    background: var(--gradient-1);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    color: white;
    box-shadow: 0 2px 8px var(--shadow-medium);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-balance:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

/* 公告弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 12px 48px var(--shadow-medium);
    border: 1px solid rgba(24, 144, 255, 0.1);
}

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

.modal-header {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
}

.modal-body {
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 24px;

}
.gonggao {
    white-space: pre-wrap;      /* 保留换行符和空格 */
    word-wrap: break-word;      /* 长单词自动换行 */
    overflow-wrap: break-word;  /* 确保内容不会溢出 */
}

.modal-close {
    background: var(--gradient-1);
    border: none;
    padding: 14px 32px;
    border-radius: 28px;
    /*color: #0d75e2;*/
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-medium);
}

.modal-close:active {
    transform: translateY(0);
}

/* 主要内容区 */
.main-content {
    padding: 20px 0 180px;
    min-height: calc(100vh - 140px);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

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

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

.main-content::-webkit-scrollbar-thumb {
    background: rgba(24, 144, 255, 0.3);
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(24, 144, 255, 0.5);
}

/* 商品网格 - 一列4个 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 8px var(--shadow-light);
    border: 1px solid rgba(24, 144, 255, 0.08);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px var(--shadow-medium);
    border-color: var(--primary-color);
}

.product-card:active {
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    padding: 12px;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 10px;
    background: white;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-light);
}

.product-price {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.product-probability {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    display: inline-block;
    border: 1px solid var(--accent-color);
    font-weight: 500;
}

/* 抽奖按钮组 */
.draw-buttons {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, var(--dark-bg) 80%, transparent);
}

.draw-btn-group {
    display: flex;
    gap: 12px;
    max-width: 750px;
    margin: 0 auto;
    align-items: flex-end;
}

.draw-btn {
    flex: 1;
    border: none;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.draw-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.draw-btn:hover::before {
    opacity: 1;
}

.draw-btn:hover {
    transform: translateY(-6px) scale(1.02);
}

.draw-btn:active {
    transform: translateY(-3px) scale(1);
}

/* 一连抽 - 普通 */
.draw-btn-1 {
    background: var(--gradient-1);
    padding: 14px;
    border-radius: 16px;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.draw-btn-1:hover {
    box-shadow: 0 8px 20px rgba(24, 144, 255, 0.4);
}

/* 二连抽 - 高级 */
.draw-btn-2 {
    background: var(--gradient-2);
    padding: 16px;
    border-radius: 18px;
    font-size: 16px;
    box-shadow: 0 6px 16px rgba(64, 169, 255, 0.35);
    border: 2px solid rgba(255,255,255,0.3);
}

.draw-btn-2:hover {
    box-shadow: 0 10px 24px rgba(64, 169, 255, 0.45);
}

.draw-btn-2::after {
    content: '🔥';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    animation: fire 1.5s ease-in-out infinite;
}

@keyframes fire {
    0%, 100% { transform: scale(1) rotate(-10deg); }
    50% { transform: scale(1.2) rotate(10deg); }
}

/* 三连抽 - 超级豪华 */
.draw-btn-3 {
    background: var(--gradient-3);
    padding: 18px;
    border-radius: 20px;
    font-size: 17px;
    box-shadow: 0 8px 20px rgba(105, 192, 255, 0.4), 0 0 0 3px rgba(255,255,255,0.4);
    border: 2px solid rgba(255,255,255,0.5);
    position: relative;
}

.draw-btn-3:hover {
    box-shadow: 0 12px 28px rgba(105, 192, 255, 0.5), 0 0 0 3px rgba(255,255,255,0.6);
}

.draw-btn-3::after {
    content: '⭐';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 18px;
    animation: star 2s ease-in-out infinite;
}

@keyframes star {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 0.8;
    }
}

.draw-btn-3::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    opacity: 1;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(200%) skewX(-15deg); }
}

.draw-btn-price {
    display: block;
    font-size: 13px;
    opacity: 0.95;
    margin-top: 6px;
    font-weight: 500;
}

.draw-btn-1 .draw-btn-price {
    font-size: 12px;
}

.draw-btn-2 .draw-btn-price {
    font-size: 13px;
    font-weight: 600;
}

.draw-btn-3 .draw-btn-price {
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 12px;
    box-shadow: 0 -2px 12px var(--shadow-light);
    border-top: 1px solid rgba(24, 144, 255, 0.08);
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    padding: 5px 15px;
    border-radius: 12px;
}

.nav-item:hover {
    background: #e6f7ff;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}

/* 抽奖动画 */
.draw-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.draw-animation.active {
    display: flex;
}

.draw-box {
    width: 180px;
    height: 180px;
    background: var(--gradient-1);
    border-radius: 20px;
    animation: boxShake 0.5s infinite;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5);
    position: relative;
}

.draw-box::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: var(--gradient-1);
    border-radius: 25px;
    opacity: 0.3;
    filter: blur(10px);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes boxShake {
    0%, 100% {
        transform: rotate(-8deg) scale(1);
    }
    25% {
        transform: rotate(8deg) scale(1.05);
    }
    50% {
        transform: rotate(-8deg) scale(1);
    }
    75% {
        transform: rotate(8deg) scale(1.05);
    }
}

.draw-results {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90%;
    min-height: 200px;
}

.result-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    min-width: 140px;
    max-width: 160px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    opacity: 0;
    transform: scale(0) rotate(180deg);
}

.result-card.show {
    animation: resultPopIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes resultPopIn {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.15) rotate(-10deg);
        opacity: 1;
    }
    80% {
        transform: scale(0.95) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.result-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 2px solid rgba(255,255,255,0.1);
}

.result-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.result-value {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
}

.result-probability {
    color: var(--accent-color);
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.8;
}

/* 个人中心 - 蓝白主题 */
.profile-header {
    background: var(--gradient-1);
    padding: 50px 20px 60px;
    border-radius: 0 0 40px 40px;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 8px 32px var(--shadow-medium);
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.15)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
}

.profile-name {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid white;
    color: white;
    padding: 10px 32px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.logout-btn:active {
    transform: translateY(0);
}

.inventory-list {
    padding: 0 15px 100px;
}

.inventory-item {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: 0 2px 12px var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(24, 144, 255, 0.08);
}

.inventory-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-1);
}

.inventory-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px var(--shadow-medium);
    border-color: var(--primary-color);
}

.inventory-actions {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.inventory-expire-time {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 6px 12px;
    background: rgba(24, 144, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(24, 144, 255, 0.1);
}

.inventory-exchanged {
    color: var(--text-gray);
    font-size: 14px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    white-space: nowrap;
}

.inventory-image {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid #e6f7ff;
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    padding: 8px;
}

.inventory-info {
    flex: 1;
}

.inventory-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
    color: var(--text-light);
}

.inventory-value {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
}

.exchange-btn {
    background: var(--gradient-1);
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-medium);
    font-size: 14px;
}

.exchange-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-medium);
}

.exchange-btn:active {
    transform: translateY(0);
}

/* 兑换表单 */
.exchange-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-gray);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.3s ease;
}

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

.form-input::placeholder {
    color: var(--text-gray);
}

.form-radio-group {
    display: flex;
    gap: 15px;
}

.radio-label {
    flex: 1;
    padding: 12px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label input {
    display: none;
}

.radio-label input:checked + span {
    color: var(--primary-color);
}

.radio-label:has(input:checked) {
    border-color: var(--primary-color);
    background: #e6f7ff;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-1);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f5ff 100%);
}

.login-box {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 48px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px var(--shadow-medium);
    border: 1px solid rgba(24, 144, 255, 0.1);
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: block;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 16px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-avatar-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-medium);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.code-btn {
    background: var(--gradient-2) !important;
    white-space: nowrap;
    min-width: 120px;
    font-size: 14px !important;
    padding: 12px 16px !important;
}

/* 后台管理 */
.admin-container {
    padding: 20px;
}

.admin-header {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.admin-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--gradient-1);
}

.admin-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
}

.product-form {
    display: grid;
    gap: 15px;
}

.image-upload {
    width: 100%;
    height: 150px;
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.image-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-text {
    color: var(--text-gray);
}

.product-list {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.product-item {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.product-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.product-item-info {
    flex: 1;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-edit, .btn-delete {
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .product-name {
        font-size: 11px;
    }

    .product-price {
        font-size: 12px;
    }

    .product-info {
        padding: 8px;
    }

    .product-image {
        padding: 0; /* 去掉内边距 */
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-name {
        font-size: 11px;
    }
}

/* 个人中心移动端适配 */
@media (max-width: 600px) {
    /* 个人中心头部 */
    .profile-header {
        padding: 40px 20px 50px;
        border-radius: 0 0 30px 30px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .profile-name {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .logout-btn {
        padding: 8px 24px;
        font-size: 14px;
    }

    /* 背包列表 */
    .inventory-list {
        padding: 0 10px 100px;
    }

    /* 背包商品卡片 */
    .inventory-item {
        flex-wrap: wrap;
        padding: 12px;
        gap: 12px;
    }

    .inventory-image {
        width: 70px;
        height: 70px;
    }

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

    .inventory-name {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .inventory-value {
        font-size: 16px;
    }

    .inventory-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-left: 0;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed rgba(24, 144, 255, 0.1);
    }

    .inventory-expire-time {
        font-size: 10px;
        padding: 4px 8px;
        gap: 3px;
    }

    .inventory-expire-time span:first-child {
        font-size: 14px;
    }

    .exchange-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .inventory-exchanged {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 400px) {
    .profile-header {
        padding: 35px 15px 45px;
    }

    .profile-avatar {
        width: 70px;
        height: 70px;
    }

    .profile-name {
        font-size: 20px;
    }

    .inventory-list {
        padding: 0 8px 100px;
    }

    .inventory-item {
        padding: 10px;
        gap: 10px;
    }

    .inventory-image {
        width: 60px;
        height: 60px;
    }

    .inventory-name {
        font-size: 13px;
    }

    .inventory-value {
        font-size: 15px;
    }

    .inventory-expire-time {
        font-size: 9px;
        padding: 3px 6px;
    }

    .exchange-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 3000;
    animation: toastSlideDown 0.3s ease;
}

@keyframes toastSlideDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--primary-color);
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--card-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 支付方式选择样式 */
.payment-info {
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f5ff 100%);
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 28px;
    border: 2px solid rgba(24, 144, 255, 0.15);
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.payment-info::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(24, 144, 255, 0.1) 0%, transparent 70%);
    animation: paymentGlow 3s ease-in-out infinite;
}

@keyframes paymentGlow {
    0%, 100% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(-10%, -10%); opacity: 0.8; }
}

.payment-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.payment-detail:last-child {
    margin-bottom: 0;
    padding-top: 14px;
    border-top: 2px dashed rgba(24, 144, 255, 0.2);
}

.payment-detail span:first-child {
    color: var(--text-gray);
    font-weight: 500;
}

.payment-detail span:last-child {
    font-weight: 600;
    color: var(--text-light);
}

.payment-amount {
    font-size: 32px !important;
    font-weight: 800 !important;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.payment-method-item {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.payment-method-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.payment-method-content {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.payment-method-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-method-item:hover .payment-method-content {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 24px rgba(24, 144, 255, 0.15);
    border-color: var(--accent-color);
}

.payment-method-item:hover .payment-method-content::before {
    opacity: 1;
}

.payment-method-item input:checked + .payment-method-content {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #e6f7ff 0%, #ffffff 100%);
    box-shadow: 0 8px 24px rgba(24, 144, 255, 0.25), 0 0 0 4px rgba(24, 144, 255, 0.1);
    transform: translateY(-4px) scale(1.05);
}

.payment-method-item input:checked + .payment-method-content::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    animation: checkmarkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.payment-method-icon {
    font-size: 48px;
    margin-bottom: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method-icon svg {
    width: 48px;
    height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-method-item:hover .payment-method-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.payment-method-item:hover .payment-method-icon svg {
    filter: brightness(1.1);
}

.payment-method-item input:checked + .payment-method-content .payment-method-icon {
    transform: scale(1.15);
    animation: iconBounce 0.5s ease;
    filter: drop-shadow(0 4px 16px rgba(24, 144, 255, 0.3));
}

.payment-method-item input:checked + .payment-method-content .payment-method-icon svg {
    filter: brightness(1.15) saturate(1.2);
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1.15) translateY(0); }
    50% { transform: scale(1.15) translateY(-8px); }
}

.payment-method-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.payment-method-item input:checked + .payment-method-content .payment-method-name {
    color: var(--primary-color);
    font-weight: 700;
    transform: scale(1.05);
}

/* 支付按钮增强 */
#confirmPayBtn {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    padding: 18px;
    box-shadow: 0 6px 20px var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#confirmPayBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#confirmPayBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px var(--shadow-medium);
}

#confirmPayBtn:hover::before {
    width: 400px;
    height: 400px;
}

#confirmPayBtn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px var(--shadow-medium);
}

/* 移动端适配 */
@media (max-width: 600px) {
    .payment-methods {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .payment-method-content {
        flex-direction: row;
        justify-content: flex-start;
        padding: 18px 20px;
        gap: 16px;
    }

    .payment-method-icon {
        font-size: 40px;
        margin-bottom: 0;
    }

    .payment-method-name {
        font-size: 16px;
        flex: 1;
        text-align: left;
    }

    .payment-method-item input:checked + .payment-method-content::after {
        position: static;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .payment-info {
        padding: 20px;
        margin-bottom: 24px;
    }

    .payment-amount {
        font-size: 28px !important;
    }

    .payment-method-content {
        padding: 16px 18px;
    }

    .payment-method-icon {
        font-size: 36px;
    }
}
