/* ============================================
   主样式文件 - 整合所有页面CSS
   后续可增加多种配色方案方便切换
   ============================================ */

/* ============================================
   0. 配色方案系统
   ============================================ */
:root {
    /* 默认配色（炫彩缤纷） */
    --primary-color: #d92b1c;
    --primary-color-light: #ff6b6b;
    --primary-gradient: linear-gradient(135deg, #d92b1c 0%, #ff6b6b 100%);
    --primary-gradient-alt: linear-gradient(45deg, #2232ca, #e93165);
    --primary-shadow: rgba(217, 43, 28, 0.3);
    --primary-shadow-light: rgba(217, 43, 28, 0.2);
    --primary-border: #feb2b2;
    --primary-bg: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

/* 炫彩缤纷配色方案 (color_scheme=0) */
body.color-scheme-0,
body:not([class*="color-scheme"]) {
    --primary-color: #e93165;
    --primary-color-light: #2232ca;
    --primary-gradient: linear-gradient(45deg, #2232ca, #e93165) !important;
    --primary-gradient-alt: linear-gradient(45deg, #2232ca, #e93165);
    --primary-shadow: rgba(34, 50, 202, 0.3);
    --primary-shadow-light: rgba(233, 49, 101, 0.2);
    --primary-border: #e93165;
    --primary-bg: linear-gradient(135deg, #e8eaf6 0%, #fce4ec 100%);
}

/* 严肃黑白配色方案 (color_scheme=1) */
body.color-scheme-1 {
    --primary-color: #1a1a1a;
    --primary-color-light: #4a4a4a;
    --primary-gradient: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    --primary-gradient-alt: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    --primary-shadow: rgba(26, 26, 26, 0.3);
    --primary-shadow-light: rgba(26, 26, 26, 0.2);
    --primary-border: #666666;
    --primary-bg: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

/* 蓝色经典配色方案 (color_scheme=2) */
body.color-scheme-2 {
    --primary-color: #1B47C3;
    --primary-color-light: #0D2E7F;
    --primary-gradient: linear-gradient(135deg, #1B47C3 0%, #0D2E7F 100%) !important;
    --primary-gradient-alt: linear-gradient(135deg, #1B47C3 0%, #0D2E7F 100%);
    --primary-shadow: rgba(27, 71, 195, 0.3);
    --primary-shadow-light: rgba(27, 71, 195, 0.2);
    --primary-border: #4a6fc7;
    --primary-bg: linear-gradient(135deg, #e3ebf5 0%, #c5d4e8 100%);
}

/* 红红火火配色方案 (color_scheme=3) */
body.color-scheme-3 {
    --primary-color: #d92b1c;
    --primary-color-light: #ff6b6b;
    --primary-gradient: linear-gradient(135deg, #d92b1c 0%, #ff6b6b 100%);
    --primary-gradient-alt: linear-gradient(135deg, #d92b1c 0%, #ff6b6b 100%);
    --primary-shadow: rgba(217, 43, 28, 0.3);
    --primary-shadow-light: rgba(217, 43, 28, 0.2);
    --primary-border: #feb2b2;
    --primary-bg: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

/* ============================================
   1. 页面加载动画样式 (来自 header.php)
   ============================================ */
.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.page-loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}
.page-loading-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    box-shadow: 0 8px 30px var(--primary-shadow-light);
    animation: pulse-logo 1.5s ease-in-out infinite;
    margin-bottom: 24px;
    object-fit: cover;
    background: var(--primary-gradient);
}
@keyframes pulse-logo {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}
.page-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.page-loading-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 12px;
}
.page-loading-progress-container {
    width: 200px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.page-loading-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}
.page-loading-percent {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
}

/* ============================================
   2. 发现页样式 (来自 discover.php)
   ============================================ */
.discover-page-wrapper {
    background: var(--bodys);
    min-height: 100vh;
}
.no-image-save {
    -webkit-user-drag: none;
    pointer-events: none;
}
/* 发现页头像占位符样式 */
.discover-avatar-placeholder {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--primary-shadow);
    text-decoration: none;
}

/* 修复头部遮挡背景图片问题 */
.top-nav {
    position: relative;
    z-index: 100;
}
.sh-main-head {
    position: relative;
    z-index: 1;
}
.sh-main-head-img {
    position: relative;
    z-index: 0;
}
/* 修复底部导航遮挡内容问题 */
.discover-page-wrapper .centent {
    padding-bottom: 100px !important;
    margin-bottom: 0 !important;
}
.discover-page-wrapper .sh-nrbk {
    padding-bottom: 100px !important;
}
.discover-page-wrapper .bottom-nav {
    z-index: 99 !important;
}
/* 登录弹窗允许页面滚动 */
.sh-login {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sh-login-main {
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
}
/* 表情选择器样式 */
.sh-pinglun-biao {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 2em);
    gap: 5px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    background: var(--cobg, #ffffff);
    border-radius: 8px;
    margin-top: 10px;
}
.sh-pinglun-biao img {
    width: 2em;
    height: 2em;
    cursor: pointer;
    transition: transform 0.2s;
    object-fit: contain;
}
.sh-pinglun-biao img:hover {
    transform: scale(1.2);
}
.emoji-item {
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-block;
    padding: 2px;
}
.emoji-item:hover {
    transform: scale(1.3);
}
/* 修复点赞和评论按钮弹出时不撑大动态区域 */
.sh-content-right-time-right {
    position: relative;
}
.sh-content-right-time-right-left {
    position: absolute !important;
    right: 35px;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

/* ============================================
   3. 用户中心页面样式 (来自 user.php)
   ============================================ */
.page.active {
    background: #ffffff;
}
.user-center-container {
    padding-bottom: 100px;
}
/* 顶部信息条 */
.top-info {
    width: 100%;
    margin: 0 0 16px 0;
    padding: 0;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e8eef7;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.info-section {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}
.info-section:last-child {
    border-bottom: none;
}
.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.section-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--primary-gradient);
    border-radius: 2px;
}
/* 用户信息区域 */
.user-info-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--primary-bg);
    border-bottom: 1px solid var(--primary-border);
}
.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--primary-shadow);
}
.user-details {
    flex: 1;
}
.user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}
.user-uid {
    font-size: 13px;
    color: #64748b;
}
/* 分享链接区域 */
.share-box {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.share-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    font-size: 14px;
    background: #f8fafc;
    color: #334155;
    transition: all 0.3s ease;
}
.share-input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-shadow-light);
}
.copy-btn {
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--primary-shadow);
    white-space: nowrap;
}
.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-shadow);
}
.copy-btn:active {
    transform: translateY(0);
}
.copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
/* 统计和操作区域 */
.stats-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.stats-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--primary-bg);
    border-radius: 12px;
    border: 1px solid var(--primary-border);
}
.stat-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 8px var(--primary-shadow-light);
}
.stat-content {
    display: flex;
    flex-direction: column;
}
.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.change-password-btn {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-shadow);
}
.change-password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-shadow);
}
.logout-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}
.action-btn:active {
    transform: translateY(0);
}
.help-text {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
    line-height: 1.6;
}
.help-text::before {
    content: '💡 ';
    margin-right: 4px;
}
/* 修改密码弹窗 */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.modal {
    width: 86%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
    overflow: hidden;
}
.modal-hd {
    background: var(--primary-gradient);
    color: #fff;
    padding: 14px 16px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}
.modal-close:hover {
    background: rgba(255,255,255,0.2);
}
.modal-bd {
    padding: 18px 16px;
    color: #0f172a;
    line-height: 1.5;
}
.modal-ft {
    padding: 14px 16px;
    text-align: right;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.btn {
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary-color);
    color: #fff;
}
.btn-primary:hover {
    background: #b91c1c;
}
.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
.form-group {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-shadow-light);
}
.form-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}
.form-error.show {
    display: block;
}

/* ============================================
   4. 抽奖页面样式 (来自 price.php)
   ============================================ */
/* 剩余抽奖次数显示 */
.lottery-remain-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--primary-bg);
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    margin-bottom: 16px;
}
.remain-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 8px var(--primary-shadow-light);
}
.remain-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.remain-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
.remain-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}
.remain-more-btn {
    padding: 8px 16px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--primary-shadow);
}
.remain-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-shadow);
    color: #fff;
}
/* 抽奖区域样式 */
.lottery-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}
.lottery-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 12px 0 10px;
}
.lottery-subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 18px;
    font-size: 0.95rem;
}
.lottery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.lottery-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 110px;
    padding: 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    border: 2px solid #e7eef6;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
    color: #333;
    font-weight: 600;
}
.lottery-cell .desc {
    font-size: 0.92rem;
    line-height: 1.35;
}
.lottery-cell .prize-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.lottery-cell .prize-text {
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: center;
    font-weight: 600;
}
.lottery-cell.active {
    border-color: var(--primary-color-light);
    box-shadow: 0 0 0 3px var(--primary-shadow-light);
    transform: scale(1.02);
    transition: all 120ms ease;
}
.start-cell {
    background: var(--primary-color-light);
    color: #fff;
    border: none;
    box-shadow: 0 6px 16px var(--primary-shadow);
}
.start-btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    background: #fff;
    color: var(--primary-color-light);
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.start-btn:hover {
    transform: translateY(-1px);
}
.start-btn:active {
    transform: translateY(0);
}
.result-tip {
    display: none;
}
.lottery-help {
    width: 100%;
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 0.92rem;
    text-align: center;
}
/* 无奖品提示样式 */
.no-prizes-notice {
    width: 100%;
    margin: 20px 0;
    padding: 40px 30px;
    background: var(--primary-bg);
    border: 2px solid #fc8181;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(252, 129, 129, 0.2);
    text-align: center;
    animation: slideUp 0.5s ease-out;
}
.no-prizes-notice .icon {
    font-size: 64px;
    margin-bottom: 20px;
}
.no-prizes-notice .title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #c53030;
    margin-bottom: 16px;
}
.no-prizes-notice .message {
    font-size: 1rem;
    color: #742a2a;
    line-height: 1.6;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   5. 登录/注册页面样式 (来自 login.php, register.php)
   ============================================ */
.body-my {
    min-height: calc(100vh - 120px);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-wrap {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
}
.auth-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 24px 22px;
    animation: slideUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #2789ee 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}
.auth-header {
    text-align: center;
    margin-bottom: 18px;
}
.auth-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #2789ee 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    box-shadow: 0 6px 14px rgba(102, 126, 234, 0.25);
}
.auth-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.auth-sub {
    color: #64748b;
    margin-bottom: 0;
    font-size: 0.8rem;
    font-weight: 400;
}
.form-row {
    margin-bottom: 14px;
}
.form-row:last-of-type {
    margin-bottom: 0;
}
.input-group {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    pointer-events: none;
    transition: color 0.3s;
}
.input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: all .25s ease;
    font-size: 13px;
    background: #ffffff;
    box-sizing: border-box;
    color: #1e293b;
}
.input::placeholder {
    color: #94a3b8;
}
.input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
    background: #ffffff;
}
.input:focus + .input-icon {
    color: #667eea;
}
.divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
}
.divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e2e8f0;
}
.divider span {
    background: #ffffff;
    padding: 0 12px;
    color: #94a3b8;
    font-size: 13px;
    position: relative;
    z-index: 1;
}
.link-row {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 13px;
}
.link-row a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all .2s;
}
.link-row a:hover {
    color: #2789ee;
    text-decoration: underline;
}
.error-tip {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-weight: 500;
    font-size: 12px;
    animation: shake 0.5s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.error-tip::before {
    content: '⚠️';
    font-size: 14px;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}
.success-tip {
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-weight: 500;
    font-size: 12px;
    animation: slideUp 0.5s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.success-tip::before {
    content: '✓';
    font-size: 16px;
    color: #10b981;
    font-weight: 700;
}

/* ============================================
   6. 用户中心悬浮按钮样式 (来自 user-center.php)
   ============================================ */
.user-center-float {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 998;
}
.user-center-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--primary-shadow);
    transition: all 0.3s ease;
    text-decoration: none;
}
.user-center-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px var(--primary-shadow);
}
.user-center-btn.logged-in {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.user-center-btn.logged-in:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}
.user-center-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.user-center-popup-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.user-center-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}
.user-center-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}
.user-center-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-center-popup-close:hover {
    color: #1a202c;
}
.user-center-form {
    padding: 20px;
}
.user-center-form .form-group {
    margin-bottom: 16px;
}
.user-center-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}
.user-center-form .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
}
.user-center-form .form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-shadow-light);
}
.user-center-form .form-error {
    color: #dc2626;
    font-size: 12px;
    margin-bottom: 12px;
    padding: 8px;
    background: #fef2f2;
    border-radius: 6px;
}
.user-center-form .btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.user-center-form .btn-primary:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}
.form-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}
.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}
.form-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   7. 响应式样式
   ============================================ */
@media (max-width: 768px) {
    .info-section {
        padding: 14px 16px;
    }
    .stats-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .stats-left {
        flex-direction: column;
        align-items: stretch;
    }
    .stat-item {
        width: 100%;
    }
    .action-buttons {
        width: 100%;
    }
    .action-btn {
        width: 100%;
    }
    .share-box {
        flex-direction: column;
    }
    .copy-btn {
        width: 100%;
    }
    .lottery-wrapper {
        padding: 0;
    }
    .lottery-title {
        font-size: 1.4rem;
    }
    .lottery-grid {
        gap: 8px;
    }
    .lottery-cell {
        min-height: 95px;
        padding: 8px;
    }
    .start-btn {
        padding: 10px 16px;
        font-size: 1rem;
    }
    .auth-wrap {
        max-width: 100%;
    }
    .auth-card {
        padding: 20px 18px;
    }
    .auth-title {
        font-size: 1.25rem;
    }
    .auth-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    .auth-header {
        margin-bottom: 16px;
    }
    .form-row {
        margin-bottom: 12px;
    }
    .link-row {
        margin-top: 14px;
        padding-top: 14px;
    }
}
@media (max-width: 480px) {
    .lottery-grid {
        gap: 6px;
    }
    .lottery-cell {
        min-height: 88px;
        padding: 8px;
    }
    .lottery-cell .desc {
        font-size: 0.88rem;
    }
    .top-info {
        border-radius: 12px;
    }
    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .stat-value {
        font-size: 18px;
    }
}

/* ============================================
   8. 顶部导航和底部导航配色方案
   ============================================ */
/* 顶部导航分享按钮 */
.nav-action-button {
    background: var(--primary-gradient) !important;
    color: white;
}
.nav-action-button:hover {
    opacity: 0.9;
}

/* 顶部导航副标题（template_site_desc） */
.nav-subtitle {
    color: var(--primary-color) !important;
}

/* 底部导航图标和文字颜色 */
.nav-item.active {
    color: var(--primary-color) !important;
}
.nav-item.active .nav-icon {
    color: var(--primary-color) !important;
}
.nav-item.active .nav-label {
    color: var(--primary-color) !important;
}
.nav-indicator {
    background-color: var(--primary-color) !important;
}

/* ============================================
   9. 首页元素配色方案
   ============================================ */
/* 滚动公告背景色 */
.announcement-bar {
    background: var(--primary-gradient) !important;
}
/* 炫彩缤纷模式下使用黑色背景 */
body.color-scheme-0 .announcement-bar {
    background-color: #000000 !important;
    background: #000000 !important;
}
.announcement-text::after {
    background: linear-gradient(to right, transparent, var(--primary-color)) !important;
    opacity: 0.8;
}

/* app_type被选择时的背景色 */
.tab-button.active {
    background: var(--primary-gradient) !important;
    color: white !important;
}

/* app介绍的文字颜色 */
.category-card-desc {
    color: var(--primary-color) !important;
}

/* ============================================
   10. 客服页面配色方案
   ============================================ */
/* 客服图标描边颜色 */
.contact-icon {
    border-color: var(--primary-color) !important;
}

/* 炫彩缤纷模式下按钮使用渐变 */
body.color-scheme-0 .contact-copy-btn,
body.color-scheme-0 .contact-action-btn.bg-primary {
    background: var(--primary-gradient) !important;
}

/* ============================================
   11. 炫彩缤纷模式特殊效果
   ============================================ */
/* 炫彩缤纷模式下滚动公告特殊样式 */
body.color-scheme-0 .announcement-text::after {
    background: linear-gradient(to right, transparent, #000000) !important;
    opacity: 0.8;
}

body.color-scheme-0 .announcement-scroll {
    font-size: 3.5vw;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(to right, #ffffff, #ff0000 6.25%, #ff7d00 12.5%, #ffff00 18.75%, #00ff00 25%, #00ffff 31.25%, #0000ff 37.5%, #ff00ff 43.75%, #ffff00 50%, #ff0000 56.25%, #ff7d00 62.5%, #ffff00 68.75%, #00ff00 75%, #00ffff 81.25%, #0000ff 87.5%, #ff00ff 93.75%, #ffff00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: masked-animation 2s infinite linear, scrollText 20s linear infinite;
    text-shadow: none;
}

/* PC端滚动公告字体大小限制 */
@media (min-width: 768px) {
    body.color-scheme-0 .announcement-scroll {
        font-size: 1.5rem;
        max-font-size: 1.5rem;
    }
}

@keyframes masked-animation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* ============================================
   12. App列表美化样式
   ============================================ */
/* 美化category-card基础样式 */
.category-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-border);
}

/* 1列模式下的category-card */
.category-card-single {
    padding: 1.25rem;
    border-radius: 1.25rem;
}

.category-card-single .category-card-img {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-card-single:hover .category-card-img {
    transform: scale(1.05);
}

.category-card-single .category-card-content {
    margin-left: 1rem;
    flex: 1;
}

.category-card-single .category-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.category-card-single .category-card-desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 2列模式下的category-card */
.category-card-double {
    padding: 1rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 140px;
}

.category-card-double .category-card-img {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.875rem;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.category-card-double:hover .category-card-img {
    transform: scale(1.08);
}

.category-card-double .category-card-content {
    margin-left: 0;
    margin-top: 0.75rem;
    width: 100%;
    text-align: center;
}

.category-card-double .category-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.375rem;
}

.category-card-double .category-card-desc {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 立即访问按钮样式 */
.category-card-action {
    margin-left: auto;
    flex-shrink: 0;
}

.app-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px var(--primary-shadow-light);
    position: relative;
    overflow: hidden;
}

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

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

.app-visit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--primary-shadow);
}

.app-visit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--primary-shadow-light);
}

.app-visit-btn i {
    font-size: 0.6875rem;
    transition: transform 0.3s ease;
}

.app-visit-btn:hover i {
    transform: translateX(2px);
}

/* 炫彩缤纷模式下按钮使用渐变 */
body.color-scheme-0 .app-visit-btn {
    background: var(--primary-gradient) !important;
}

/* 其他模式下按钮使用主色 */
body.color-scheme-1 .app-visit-btn,
body.color-scheme-2 .app-visit-btn,
body.color-scheme-3 .app-visit-btn {
    background: var(--primary-color) !important;
}

body.color-scheme-1 .app-visit-btn:hover,
body.color-scheme-2 .app-visit-btn:hover,
body.color-scheme-3 .app-visit-btn:hover {
    background: var(--primary-color-light) !important;
}

/* 响应式优化 */
@media (min-width: 768px) {
    .category-card-single {
        padding: 1.5rem;
    }
    
    .category-card-single .category-card-img {
        width: 4.5rem;
        height: 4.5rem;
    }
    
    .category-card-single .category-card-title {
        font-size: 1.25rem;
    }
    
    .category-card-single .category-card-desc {
        font-size: 0.9375rem;
    }
    
    .app-visit-btn {
        padding: 0.5625rem 1.125rem;
        font-size: 0.875rem;
    }
    
    .app-visit-btn i {
        font-size: 0.75rem;
    }
}

