/* ==================== 重置与基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(255, 255, 255, 0.3);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    position: relative;
}

/* ==================== 头部导航栏 ==================== */
.app-header {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.header-left.has-logo {
    justify-content: center;
    position: relative;
}

.logo-container {
    display: none;
    align-items: center;
    justify-content: center;
}

.logo-section {
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.logo-section.has-logo {
    margin-left: 12px;
}

.app-title {
    font-size: 18px;
    font-weight: 800;
    color: #74cb62;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.app-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

.app-logo {
    border-radius: 8px;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* ==================== 玩家信息区域布局调整 ==================== */
.player-section {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.player-section.active {
    display: flex;
}

.player-info-top {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
}

.player-name-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-align: right;
    word-break: break-all;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: auto;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:active {
    transform: scale(0.95);
}

/* ==================== 公告栏样式 ==================== */
.announcement-bar {
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #8b5cf6);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
    color: white;
    padding: 10px 0;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.announcement-container {
    position: relative;
    height: 22px;
    overflow: hidden;
}

.announcement-content {
    position: absolute;
    white-space: nowrap;
    display: flex;
    align-items: center;
    animation: seamlessScroll 30s linear infinite;
    min-width: 2000px;
}

.announcement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-right: 80px;
    flex-shrink: 0;
}

/* 无缝滚动动画 - 关键：从右侧开始到左侧完全消失 */
@keyframes seamlessScroll {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 鼠标悬停暂停 */
.announcement-bar:hover .announcement-content {
    animation-play-state: paused;
}

/* ==================== 主内容区域 ==================== */
.app-main {
    flex: 1;
    padding: 16px;
    padding-bottom: 100px; /* 增加底部内边距以适应抬高的dock栏 */
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* ==================== 登录界面 ==================== */
.login-card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    animation: slideUp 0.6s ease-out;
}

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

.login-card-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-card-header .logo-container {
    display: none;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.login-card-header .app-logo {
    transform: scale(2.5);
    border-radius: 12px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.login-card-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.login-card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

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

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

.input-field {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    font-weight: 500;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.username-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    font-weight: 500;
}

/* ==================== 按钮系统 ==================== */
.glass-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

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

.glass-btn:hover::before {
    left: 100%;
}

.glass-btn:active {
    transform: scale(0.98);
}

.glass-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.glass-btn.secondary {
    background: linear-gradient(135deg, var(--secondary), #db2777);
}

.glass-btn.success {
    background: linear-gradient(135deg, var(--success), #059669);
}

.glass-btn.warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
}

.glass-btn.outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

/* 登录卡片按钮 */
.login-card-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.vertical-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
}

/* ==================== 页面容器 ==================== */
.page-container {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

.page-container.active {
    display: block;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.gold-badge {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500; /* 整体正常字体 */
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    min-width: 140px;
    margin-bottom: 0;
    order: 1;
    flex-shrink: 0;
    width: 100%;
    justify-content: center;
}

/* 修复：emoji绝对不加粗 */
.gold-icon {
    font-size: 18px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 400;
    display: inline-block;
}

/* 数字和文本都要加粗 */
.gold-amount-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    display: inline-block;
}

/* ==================== 商店界面布局 ==================== */
#hardware-shop-page .page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

#hardware-shop-page .gold-badge {
    width: 100%;
    justify-content: center;
    margin-bottom: 0;
}

#hardware-shop-page .shop-buttons-container {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-bottom: 0;
}

#hardware-shop-page .shop-button-row {
    display: flex;
    width: 100%;
    gap: 8px;
}

#hardware-shop-page .app-download-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#hardware-shop-page .global-refresh-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== 长条形动物卡片 ==================== */
.hardware-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hardware-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    min-height: 120px;
    animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hardware-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 为不同卡片设置延迟动画 */
.hardware-card:nth-child(1) { animation-delay: 0.1s; }
.hardware-card:nth-child(2) { animation-delay: 0.2s; }
.hardware-card:nth-child(3) { animation-delay: 0.3s; }
.hardware-card:nth-child(4) { animation-delay: 0.4s; }
.hardware-card:nth-child(5) { animation-delay: 0.5s; }

/* ==================== 仓库界面动物卡片优化 ==================== */
.hardware-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    position: relative;
}

/* 动物图片/图标放在右上角 */
.hardware-icon-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    font-size: 28px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.9);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(2deg); }
}

.hardware-card:hover .hardware-icon-container {
    animation: float 3s ease-in-out infinite;
    transform: scale(1.05);
}

/* 动物图片样式 */
.animal-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

.animal-emoji {
    font-size: 32px;
}

/* 标题区域占据剩余空间 */
.hardware-title-section {
    flex: 1;
    padding-right: 80px;
}

.hardware-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.2;
}

.stage-indicator {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
}

/* 硬件内容区域调整 */
.hardware-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 进度条区域 */
.stage-progress-container {
    margin: 8px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 详细信息网格 */
.hardware-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 13px;
}

.hardware-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 13px;
}

/* ==================== 商店界面动物卡片优化 ==================== */
.shop-hardware {
    min-height: 140px;
    position: relative;
}

/* 商店卡片头部布局 */
.shop-hardware .hardware-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
}

/* 商店动物图片容器 */
.hardware-icon-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    font-size: 28px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.9);
    animation: float 6s ease-in-out infinite;
    overflow: hidden;
}

/* 价格和名称垂直布局 */
.hardware-power {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 8px;
}

.power-icon {
    font-size: 16px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.power-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

/* 商店动物名称 */
.shop-hardware .hardware-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    order: 2;
}

/* 商店卡片信息区域调整 */
.shop-hardware .hardware-info {
    margin-top: 8px;
}

.shop-hardware .hardware-details {
    grid-template-columns: 1fr;
    gap: 8px;
}

.shop-hardware .hardware-detail {
    border-bottom: none;
    padding: 4px 0;
}

.shop-hardware .detail-label {
    font-size: 11px;
}

.shop-hardware .detail-value {
    font-size: 12px;
}

/* 特殊标签样式 */
.special-label {
    color: var(--primary);
    font-weight: 700;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    text-align: center;
    margin-top: 4px;
}

/* 操作按钮 */
.hardware-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn:active {
    transform: scale(0.95);
}

.harvest-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.feed-btn {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
}

/* 商店操作按钮 */
.shop-hardware .hardware-actions {
    margin-top: 16px;
}

/* 购买按钮样式 */
.buy-btn {
    background: linear-gradient(135deg, var(--success), #059669);
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buy-btn:disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    cursor: not-allowed;
    transform: none !important;
}

.buy-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* ==================== 底部导航栏 ==================== */
.floating-dock {
    position: fixed;
    bottom: 20px; /* 提高悬浮dock栏位置 */
    left: 10px;
    right: 10px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    padding: 12px 16px;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg); /* 添加圆角 */
}

.dock-btn {
    background: none;
    border: none;
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 56px;
    position: relative;
    white-space: pre-line; /* 关键：允许空格换行 */
    line-height: 1.2; /* 调整行高 */
    text-align: center; /* 文本居中 */
    justify-content: center; /* 垂直居中 */
    min-height: 50px; /* 确保有足够高度容纳多行文本 */
    word-break: break-word; /* 允许单词换行 */
}

.dock-btn.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.dock-btn.active::after {
    content: '';
    position: absolute;
    top: -12px;
    width: 3px;
    height: 3px;
    background: var(--primary);
    border-radius: 50%;
}

.dock-btn .emoji {
    font-size: 18px; /* 稍微缩小图标 */
    transition: transform 0.3s ease;
    flex-shrink: 0; /* 防止图标被压缩 */
}

.dock-btn.active .emoji {
    transform: scale(1.1);
}

.dock-btn span:last-child {
    font-weight: 600;
    letter-spacing: -0.2px;
    word-break: break-word; /* 允许单词换行 */
    overflow-wrap: break-word; /* 确保长单词也能换行 */
}

/* ==================== 钱包操作容器样式 ==================== */
.wallet-actions-container {
    display: flex;
    flex-direction: column;
    gap: 16;
    margin-bottom: 24px;
    position: relative;
}

.wallet-action-item {
    position: relative;
    transition: all 0.3s ease;
}

.wallet-action-item.expanding {
    z-index: 10;
}

/* ==================== 钱包操作按钮样式 ==================== */
.wallet-action-btn {
    width: 100%;
    padding: 14px 12px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.wallet-action-btn.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

/* ==================== 展开区域样式 ==================== */
.expand-section {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.expand-section.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.expand-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    margin-top: 60px; /* 按钮高度 + 间距 */
    animation: expandSlideDown 0.3s ease-out;
}

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

.expand-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.expand-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.expand-actions .glass-btn {
    flex: 1;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
}

/* ==================== 充值档位样式 ==================== */
.recharge-tiers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.recharge-tier-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
}

.recharge-tier-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.recharge-tier-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.tier-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tier-amount {
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
    color: #000000;
}

.tier-bonus {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.2;
    color: #ff0000;
}

/* ==================== 金额提示样式 ==================== */
.min-amount-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.hint-icon {
    font-size: 14px;
}

.hint-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* ==================== 模态框系统 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--card-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.4s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.modal-body {
    padding: 0 24px 24px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .glass-btn {
    flex: 1;
    padding: 16px;
}

/* ==================== 钱包页面样式 ==================== */
.wallet-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--card-border);
}

.wallet-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wallet-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.wallet-tab-content.active {
    display: block;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.order-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.order-status {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.order-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-detail {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* ==================== 空状态样式 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    animation: fadeIn 0.6s ease;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-subtext {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* ==================== 加载状态 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    flex-direction: column;
    gap: 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ==================== 通知系统 ==================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 4000;
    max-width: 320px;
    border-left: 4px solid var(--primary);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-message {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.4;
}

.notification.success {
    border-left-color: var(--success);
}

.notification.error {
    border-left-color: var(--error);
}

.notification.warning {
    border-left-color: var(--warning);
}

.notification.info {
    border-left-color: var(--primary);
}

/* ==================== 客服按钮 ==================== */
#customer-service-button {
    position: fixed;
    bottom: 110px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 9999; /* 提高z-index确保在最前面 */
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8); }
    50% { transform: scale(0.85); }
}

#customer-service-button:active {
    transform: scale(0.75);
}

/* ==================== 我的页面样式 ==================== */
.user-profile {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

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

.user-info {
    flex: 1;
}

.user-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-gold {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-grid-four {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 20px 16px;
    border: 1px solid var(--card-border);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==================== 邀请页面样式 ==================== */
.invite-main-account,
.invite-sub-account {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.invite-header {
    text-align: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.invite-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.subsection-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.invite-link-section {
    margin-bottom: 24px;
}

.invite-link-container {
    display: flex;
    gap: 8px;
}

.invite-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    font-weight: 500;
}

.copy-btn {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.invite-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.invite-stat-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--card-border);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
}

.tip-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.tip-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.invite-note-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.note-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.note-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 480px) {
    .app-main {
        padding: 12px;
        padding-bottom: 100px; /* 同步调整底部内边距 */
    }
    
    .app-header {
        padding: 10px 12px;
    }
    
    .player-name {
        font-size: 13px;
    }
    
    .logout-btn {
        padding: 5px 10px;
        font-size: 10px;
        min-width: 50px;
    }
    
    .gold-badge {
        padding: 10px 12px;
        min-width: 120px;
    }
    
    .hardware-card {
        padding: 12px;
    }
    
    .hardware-details {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .hardware-icon-container {
        width: 55px;
        height: 55px;
    }
    
    .animal-image {
        width: 32px;
        height: 32px;
    }
    
    .animal-emoji {
        font-size: 24px;
    }
    
    .hardware-name {
        font-size: 16px;
    }
    
    .shop-hardware .hardware-icon-container {
        width: 50px;
        height: 50px;
    }
    
    .power-amount {
        font-size: 18px;
    }
    
    .wallet-action-btn {
        padding: 16px 12px;
        font-size: 14px;
    }
    
    .expand-content {
        padding: 16px;
        margin-top: 55px;
    }
    
    .expand-actions {
        flex-direction: column;
    }
    
    .expand-actions .glass-btn {
        width: 100%;
    }
    
    .stats-grid-four {
        grid-template-columns: 1fr;
    }
    
    .invite-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .invite-link-container {
        flex-direction: column;
    }
    
    .recharge-tiers {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .recharge-tier-btn {
        padding: 8px 6px;
        min-height: 55px;
    }
    
    .tier-amount {
        font-size: 13px;
    }
    
    .tier-bonus {
        font-size: 11px;
    }
    
    #hardware-shop-page .app-download-btn,
    #hardware-shop-page .global-refresh-btn {
        font-size: 12px;
        padding: 10px 6px;
    }
    
    .dock-btn {
        min-width: 50px;
        padding: 6px 4px;
        font-size: 9px;
        min-height: 45px;
        white-space: pre-line; /* 保持空格换行 */
    }
    
    .dock-btn .emoji {
        font-size: 16px;
    }
    
    .floating-dock {
        padding: 10px 12px;
        bottom: 15px; /* 移动端也适当提高 */
        left: 8px;
        right: 8px;
    }
    
    /* 移动端客服按钮进一步缩小 */
    #customer-service-button {
        transform: scale(0.7); /* 移动端缩放系数: 0.7 */
        bottom: 80px;
        right: 10px;
    }
    
    @keyframes pulse {
        0%, 100% { transform: scale(0.7); }
        50% { transform: scale(0.75); }
    }
    
    #customer-service-button:active {
        transform: scale(0.65);
    }
}

@media (max-width: 360px) {
    .app-title {
        font-size: 16px;
    }
    
    .app-subtitle {
        font-size: 10px;
    }
    
    .player-name {
        font-size: 12px;
    }
    
    .gold-badge {
        min-width: 110px;
        padding: 8px 10px;
    }
    
    .gold-amount {
        font-size: 16px;
    }
    
    .hardware-card {
        padding: 10px;
    }
    
    .hardware-title-section {
        padding-right: 60px;
    }
    
    .hardware-icon-container {
        width: 50px;
        height: 50px;
    }
    
    .animal-emoji {
        font-size: 20px;
    }
    
    #hardware-shop-page .app-download-btn,
    #hardware-shop-page .global-refresh-btn {
        font-size: 11px;
        padding: 8px 4px;
    }
    
    .dock-btn {
        min-width: 45px;
        padding: 4px 3px;
        font-size: 8px;
        min-height: 40px;
        white-space: pre-line; /* 保持空格换行 */
    }
    
    .dock-btn .emoji {
        font-size: 14px;
    }
    
    .floating-dock {
        padding: 8px 10px;
    }
}

@media (max-width: 320px) {
    .app-header {
        padding: 8px 10px;
    }
    
    .player-name {
        font-size: 11px;
    }
    
    .logout-btn {
        padding: 4px 8px;
        font-size: 9px;
        min-width: 45px;
    }
    
    .gold-badge {
        min-width: 100px;
        padding: 6px 8px;
    }
    
    .gold-amount {
        font-size: 14px;
    }
    
    .gold-text {
        font-size: 10px;
    }
    
    .hardware-card {
        padding: 8px;
    }
    
    .hardware-title-section {
        padding-right: 55px;
    }
    
    .hardware-icon-container {
        width: 45px;
        height: 45px;
    }
    
    #hardware-shop-page .app-download-btn,
    #hardware-shop-page .global-refresh-btn {
        font-size: 10px;
        padding: 6px 3px;
    }
    
    .dock-btn {
        min-width: 40px;
    }
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }

.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* 提现审核状态样式 */
.status-pending-review {
    background: linear-gradient(135deg, #ffb347, #ffcc33);
    color: #8a6d3b;
}

.status-under-review {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.status-auto-approved {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.status-rejected {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* 订单详情样式优化 */
.order-detail .detail-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
    display: inline-block;
}

.order-detail .detail-value {
    color: #333;
    word-break: break-all;
}