/* ===== 甜甜课堂 - 主样式表 ===== */

:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-light: #fff3ed;
    --secondary: #ffc947;
    --bg: #f5f5f7;
    --card: #ffffff;
    --text: #1d1d1f;
    --text-light: #86868b;
    --border: #e5e5e7;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 导航栏 ===== */
.navbar {
    background: var(--card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 24px;
}
.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.nav-links {
    display: flex;
    gap: 20px;
    flex: 1;
}
.nav-links a {
    font-size: 0.9rem;
    color: var(--text-light);
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-links a:hover { color: var(--primary); }
.nav-user {
    display: flex;
    gap: 8px;
    align-items: center;
}
.nav-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-btn:hover { background: var(--primary-light); }
.nav-btn-outline {
    border: 1px solid var(--border);
}
.nav-btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Flash 消息 ===== */
.flash-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.flash {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s;
    box-shadow: var(--shadow);
}
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }
.flash-info { background: #d1ecf1; color: #0c5460; }
.flash-warning { background: #fff3cd; color: #856404; }

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

/* ===== Hero Banner ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8f65 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
.hero p { font-size: 1.1rem; opacity: 0.9; }

/* ===== 公告栏 ===== */
.announcements-bar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.announcements-bar .container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ann-tag {
    background: var(--primary);
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
}
.ann-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    color: var(--text-light);
}
.ann-text a:hover { color: var(--primary); }

/* ===== 课程网格 ===== */
.section { padding: 40px 0; }
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.course-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.course-card a { display: block; }
.card-thumb {
    position: relative;
    padding-top: 56.25%;
    background: #eee;
    overflow: hidden;
}
.card-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.course-card:hover .card-thumb img { transform: scale(1.05); }
.card-badge {
    position: absolute;
    top: 10px; right: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}
.badge-free { background: var(--success); color: white; }
.badge-prereq { background: var(--warning); color: white; }
.badge-locked {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
}
.card-body { padding: 14px; }
.card-body h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}
.card-chef { color: var(--text-light); }
.card-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}
.card-price.free { color: var(--success); }

/* ===== 课程详情页 ===== */
.course-detail {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}
.course-header {
    margin-bottom: 24px;
}
.course-header h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}
.course-meta-row {
    display: flex;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

/* ===== 视频播放器 ===== */
.video-section {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.video-section video,
.video-section .video-js {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ===== 付费墙 ===== */
.paywall-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s;
}
.paywall-overlay.active {
    display: flex;
    opacity: 1;
}
.paywall-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.paywall-overlay h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 8px;
}
.paywall-overlay p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
    text-align: center;
    padding: 0 20px;
}
.btn-buy {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}
.btn-buy:hover { background: var(--primary-dark); }
.btn-buy:active { transform: scale(0.97); }
.paywall-hint {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    margin-top: 16px;
}

/* ===== 卡片/面板 ===== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ===== 购买区域 ===== */
.purchase-box {
    text-align: center;
    padding: 30px;
}
.purchase-box .price-tag {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}
.purchase-box .price-hint {
    color: var(--text-light);
    margin-bottom: 20px;
}
.payment-methods {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}
.pay-method-btn {
    padding: 12px 30px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}
.pay-method-btn:hover,
.pay-method-btn.active {
    border-color: var(--primary);
    color: var(--primary);
}
.prereq-warning {
    background: #fff3cd;
    color: #856404;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* ===== 上下课导航 ===== */
.course-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}
.course-nav a {
    flex: 1;
    padding: 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.2s;
}
.course-nav a:hover {
    box-shadow: var(--shadow-hover);
    color: var(--primary);
}
.course-nav .nav-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== 表单样式 ===== */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}
.form-control:focus { border-color: var(--primary); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: auto; }

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #d1d1d3; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; }

/* ===== 认证页面 ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 20px;
}
.auth-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}
.auth-card h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary);
}
.auth-card .btn { margin-top: 8px; }
.auth-links {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-light);
}
.auth-links a { color: var(--primary); }
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 我的课程 ===== */
.purchase-list {
    display: grid;
    gap: 16px;
}
.purchase-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.2s;
}
.purchase-item:hover { box-shadow: var(--shadow-hover); }
.purchase-thumb {
    width: 120px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}
.purchase-thumb img { width: 100%; height: 100%; object-fit: cover; }
.purchase-info { flex: 1; }
.purchase-info h4 { margin-bottom: 4px; }
.purchase-info .meta { font-size: 0.85rem; color: var(--text-light); }
.purchase-action { flex-shrink: 0; }

/* ===== 公告页 ===== */
.announcement-list { display: grid; gap: 16px; }
.ann-item {
    background: var(--card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.ann-item .ann-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ann-item .ann-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 12px;
}
.ann-item .ann-content {
    color: #555;
    line-height: 1.8;
}
.pinned-badge {
    background: var(--primary);
    color: white;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--text);
    color: rgba(255,255,255,0.6);
    padding: 30px 20px;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 60px;
}
.footer-links { margin-top: 8px; }
.footer-links a { color: rgba(255,255,255,0.8); }
.footer-links a:hover { color: white; }

/* ===== 厨师筛选条 ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.filter-btn {
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== 微信支付二维码 ===== */
.wechat-pay-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 20px;
}
.wechat-pay-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    text-align: center;
    max-width: 400px;
}
.wechat-pay-card h2 { color: #07c160; margin-bottom: 8px; }
.qr-container { margin: 24px 0; }
.qr-container canvas, .qr-container img { margin: 0 auto; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav-links { 
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--card);
        flex-direction: column;
        padding: 16px 20px;
        box-shadow: var(--shadow);
        gap: 12px;
    }
    .nav-links.show { display: flex; }
    .mobile-menu-btn { display: block; }
    .nav-user { display: none; }
    
    .hero { padding: 40px 20px; }
    .hero h1 { font-size: 1.6rem; }
    
    .course-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .card-body { padding: 10px; }
    .card-body h3 { font-size: 0.85rem; }
    
    .course-detail { margin: 16px auto; }
    .course-header h1 { font-size: 1.2rem; }
    
    .payment-methods { flex-direction: column; }
    
    .purchase-item { flex-direction: column; align-items: flex-start; }
    .purchase-thumb { width: 100%; height: auto; padding-top: 56.25%; }
    
    .course-nav { flex-direction: column; }
    
    .auth-card { padding: 24px; }
}

/* ===== 导航栏美食豆余额 ===== */
.bean-balance {
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
    white-space: nowrap;
    transition: background 0.2s;
}
.bean-balance:hover {
    background: #ffe4d4;
}

/* ===== 课程详情 - 购买区域 ===== */
.purchase-area {
    margin-bottom: 20px;
    padding: 20px 24px !important;
    background: linear-gradient(135deg, #fff8f3, #ffffff);
    border: 1px solid #ffe0cc;
}
.purchase-area-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.purchase-area-left {
    flex: 1;
}
.purchase-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}
.purchase-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-light);
}
.purchase-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}
.purchase-area-right {
    text-align: center;
    flex-shrink: 0;
}
.btn-purchase {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-purchase:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.btn-purchase-recharge {
    background: linear-gradient(135deg, #667eea, #764ba2);
}
.btn-purchase-recharge:hover {
    background: linear-gradient(135deg, #5a6fd6, #6a4190);
}
.purchase-balance {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 8px;
}

/* ===== 充值页面 ===== */
.recharge-page {
    padding: 30px 0 60px;
}
.recharge-balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8f65 100%);
    color: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-bottom: 36px;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.25);
}
.recharge-balance-label {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 8px;
}
.recharge-balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
}
.recharge-balance-amount span {
    font-size: 1rem;
    font-weight: 400;
}
.recharge-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.recharge-pkg-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.recharge-pkg-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.recharge-pkg-card.recharge-pkg-selected {
    border-color: var(--primary);
    background: var(--primary-light);
}
.recharge-pkg-card.recharge-pkg-hot {
    border-color: var(--secondary);
}
.recharge-pkg-save {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--secondary);
    color: #333;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0 10px 0 8px;
}
.recharge-pkg-beans {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.recharge-pkg-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}
.recharge-pkg-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

/* 充值弹窗 */
.recharge-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}
.recharge-modal {
    background: var(--card);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
}
.recharge-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.recharge-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}
.recharge-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
}
.recharge-modal-body {
    padding: 24px;
}
.recharge-confirm-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 1rem;
}
.recharge-confirm-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.recharge-pay-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.recharge-pay-method {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}
.recharge-pay-method input {
    display: none;
}
.recharge-pay-method:hover,
.recharge-pay-method.active {
    border-color: var(--primary);
    background: var(--primary-light);
}
.pay-icon {
    font-size: 1.2rem;
}
.recharge-pay-btn {
    display: block;
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.recharge-pay-btn:hover {
    background: var(--primary-dark);
}
.recharge-pay-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 12px;
}
.recharge-qr-section {
    text-align: center;
}
.recharge-qr-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
}
.recharge-qr-box {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}
.recharge-qr-placeholder {
    text-align: center;
    color: var(--text-light);
}
.recharge-qr-placeholder .qr-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}
.recharge-qr-amount {
    font-size: 1.2rem;
    margin-bottom: 12px;
}
.recharge-qr-amount strong {
    color: var(--primary);
    font-size: 1.5rem;
}
.recharge-qr-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}
.recharge-cancel-btn {
    display: block;
    width: 100%;
    background: #f5f5f5;
    color: var(--text);
    border: none;
    padding: 12px;
    font-size: 1rem;
    border-radius: 24px;
    cursor: pointer;
    margin-top: 10px;
}
.recharge-cancel-btn:hover {
    background: #e8e8e8;
}

/* ===== 视频预览截图网格 ===== */
.preview-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.preview-thumb-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 16/9;
}
.preview-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.preview-thumb-item:hover img {
    transform: scale(1.05);
}
.preview-thumb-time {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
}
@media (max-width: 768px) {
    .preview-thumbnails-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== 钱包页面 ===== */
.wallet-page {
    padding: 30px 0 60px;
}
.wallet-balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, #ff8f65 100%);
    color: white;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.25);
}
.wallet-balance-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wallet-balance-label {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 6px;
}
.wallet-balance-amount {
    font-size: 2.2rem;
    font-weight: 700;
}
.wallet-recharge-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    border: 1px solid rgba(255,255,255,0.3);
}
.wallet-recharge-btn:hover {
    background: rgba(255,255,255,0.35);
}

/* Tab 切换 */
.wallet-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
}
.wallet-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 0.95rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.wallet-tab:hover {
    color: var(--primary);
}
.wallet-tab.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
}

.wallet-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

/* 钱包记录列表 */
.wallet-record-list {
    display: grid;
    gap: 12px;
}
.wallet-record-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.wallet-record-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.recharge-icon {
    background: #eef0ff;
}
.expense-icon {
    background: #fff3ed;
}
.wallet-record-info {
    flex: 1;
    min-width: 0;
}
.wallet-record-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wallet-record-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}
.wallet-record-amount {
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.recharge-amount {
    color: var(--success);
}
.expense-amount {
    color: var(--danger);
}

/* ===== 响应式 - 充值/钱包 ===== */
@media (max-width: 768px) {
    .recharge-packages {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .recharge-pkg-card {
        padding: 18px 12px;
    }
    .recharge-pkg-beans {
        font-size: 1.3rem;
    }
    .purchase-area-inner {
        flex-direction: column;
        text-align: center;
    }
    .purchase-price {
        font-size: 1.4rem;
    }
    .recharge-balance-amount {
        font-size: 2rem;
    }
    .wallet-balance-amount {
        font-size: 1.8rem;
    }
    .wallet-balance-top {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
