/* ============================================
   知玩玩123 - 主样式表
   现代简约高级科技风
   ============================================ */

:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #818CF8;
    --accent: #06B6D4;
    --accent-dark: #0891B2;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg: #0F172A;
    --bg-card: #1E293B;
    --bg-card-hover: #273449;
    --bg-input: #1E293B;
    --border: #334155;
    --border-light: #475569;
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

/* ============================================
   容器
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm { max-width: 800px; }
.container-lg { max-width: 1440px; }

/* ============================================
   导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.navbar-brand .logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.navbar-brand span { background: linear-gradient(135deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.navbar-nav { display: flex; align-items: center; gap: 4px; list-style: none; }

.navbar-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--white);
    background: rgba(79, 70, 229, 0.15);
}

.navbar-nav a .nav-icon { font-size: 1.1rem; }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-user .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    cursor: pointer;
}

.navbar-user .vip-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-vip-month { background: linear-gradient(135deg, #6366F1, #8B5CF6); color: #fff; }
.badge-vip-quarter { background: linear-gradient(135deg, #06B6D4, #0EA5E9); color: #fff; }
.badge-vip-year { background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff; }
.badge-free { background: var(--border); color: var(--text-muted); }

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   按钮
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4); color: #fff; }

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4); color: #fff; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.9; color: #fff; }

.btn-warning { background: var(--warning); color: #000; }
.btn-danger { background: var(--danger); color: #fff; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(79, 70, 229, 0.1); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-block { width: 100%; }

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

.btn .btn-icon { font-size: 1.1rem; }

/* ============================================
   卡片
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover { border-color: var(--border-light); }

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

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body { padding: 20px; }
.card-footer { padding: 16px 20px; border-top: 1px solid var(--border); }

/* ============================================
   表单
   ============================================ */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

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

.form-textarea { resize: vertical; min-height: 100px; }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-select option { background: var(--bg-card); color: var(--text); }

.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }

.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }

/* ============================================
   网格布局
   ============================================ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   首页 Hero
   ============================================ */
.hero {
    position: relative;
    padding: 120px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
    animation: heroBg 20s ease-in-out infinite;
}

@keyframes heroBg {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(2%, -1%); }
    66% { transform: translate(-1%, 2%); }
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stat .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================
   区块标题
   ============================================ */
.section {
    padding: 60px 0;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .title-icon { font-size: 1.5rem; }

.section-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================
   作品卡片
   ============================================ */
.work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.work-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.work-card-cover {
    height: 180px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(6, 182, 212, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.work-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 60%, rgba(15, 23, 42, 0.8));
}

.work-card-cover .cover-emoji { position: relative; z-index: 1; }

.work-card-cover .cover-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
    background: rgba(0,0,0,0.6);
    color: #fff;
    backdrop-filter: blur(4px);
}

.work-card-body { padding: 16px; }

.work-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    line-height: 1.5;
}

.work-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.work-card-meta .meta-item { display: flex; align-items: center; gap: 4px; }

.work-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.work-card-footer .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.work-card-footer .user-avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #fff;
    font-weight: 600;
}

/* ============================================
   分类标签
   ============================================ */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.tag-accent {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border-color: rgba(6, 182, 212, 0.3);
}

.tag-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

/* ============================================
   子分类网格
   ============================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

.category-item:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.category-item .cat-icon { font-size: 1.3rem; }
.category-item .cat-name { font-size: 0.9rem; font-weight: 500; }

/* ============================================
   分页
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination .page-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.pagination .page-item:hover { border-color: var(--primary); color: var(--primary-light); }
.pagination .page-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-item.disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================
   弹窗/模态框
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-lg { max-width: 900px; }
.modal-sm { max-width: 420px; }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 600; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover { color: var(--text); }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   提示消息
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-info { background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.3); color: var(--accent); }
.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); color: var(--success); }
.alert-warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--warning); }
.alert-danger { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--danger); }

/* ============================================
   工具栏
   ============================================ */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 12px; }

/* ============================================
   搜索框
   ============================================ */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.search-box:focus-within { border-color: var(--primary); }

.search-box input {
    flex: 1;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    min-width: 200px;
}

.search-box button {
    padding: 10px 16px;
    background: var(--primary);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover { background: var(--primary-dark); }

/* ============================================
   页脚
   ============================================ */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
    margin-top: 80px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand { font-weight: 600; color: var(--text-secondary); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   AI 生成页面
   ============================================ */
.generate-page { padding-top: 100px; padding-bottom: 60px; }

.generate-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.generate-form .form-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.generate-form .form-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.quota-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 20px;
}

/* ============================================
   游戏播放页
   ============================================ */
.game-page { padding-top: 80px; min-height: 100vh; }

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.game-title { font-size: 1.2rem; font-weight: 600; }

.game-actions { display: flex; align-items: center; gap: 8px; }

.game-frame {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
}

.game-frame iframe {
    width: 100%;
    min-height: 600px;
    border: none;
}

.game-info { margin-top: 24px; }

/* ============================================
   个人中心
   ============================================ */
.user-center {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding-top: 100px;
    padding-bottom: 60px;
}

.user-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 84px;
}

.user-sidebar .user-profile {
    text-align: center;
    margin-bottom: 24px;
}

.user-sidebar .user-profile .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.user-sidebar .user-profile .profile-name { font-size: 1.1rem; font-weight: 600; }
.user-sidebar .user-profile .profile-role { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.sidebar-nav { list-style: none; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 4px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-light);
}

.sidebar-nav a .nav-icon { font-size: 1.1rem; }

.user-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    min-height: 400px;
}

/* ============================================
   VIP 会员中心
   ============================================ */
.vip-page { padding-top: 100px; padding-bottom: 60px; }

.vip-hero {
    text-align: center;
    padding: 48px 0 32px;
}

.vip-hero .vip-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.vip-hero .vip-desc { color: var(--text-muted); font-size: 0.95rem; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover { border-color: var(--primary); }

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(79, 70, 229, 0.2);
}

.pricing-card.featured::before {
    content: '推荐';
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.pricing-card .plan-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }

.pricing-card .plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 12px 0;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-card .plan-price .unit { font-size: 0.9rem; -webkit-text-fill-color: var(--text-muted); }

.pricing-card .plan-original { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; margin-bottom: 4px; }

.pricing-card .plan-features {
    list-style: none;
    text-align: left;
    margin: 24px 0;
}

.pricing-card .plan-features li {
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-card .plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* ============================================
   登录/注册
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-card .auth-subtitle { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-bottom: 24px; }

.auth-card .auth-footer { text-align: center; margin-top: 24px; font-size: 0.85rem; color: var(--text-muted); }

/* ============================================
   签到
   ============================================ */
.sign-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.sign-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sign-day.checked { background: rgba(16, 185, 129, 0.15); border-color: var(--success); color: var(--success); }
.sign-day.today { border-color: var(--primary); color: var(--primary-light); }

/* ============================================
   后台通用
   ============================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.admin-sidebar .admin-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.2rem;
}

.admin-nav { list-style: none; padding: 0 12px; }

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 2px;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-light);
}

.admin-nav a .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 24px 32px;
    min-height: 100vh;
    min-width: 0;
    overflow-x: auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.admin-header h1 { font-size: 1.3rem; font-weight: 600; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-card .stat-icon { font-size: 1.5rem; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* 后台表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.admin-table th {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:hover td { background: rgba(79, 70, 229, 0.05); }
.admin-table tr:last-child td { border-bottom: none; }

/* ============================================
   状态标签
   ============================================ */
.status-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-approved { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-rejected { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.status-private { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }

/* ============================================
   Toast通知
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: #fff;
    animation: slideInRight 0.3s ease;
    max-width: 360px;
    box-shadow: var(--shadow);
}

@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); color: #000; }
.toast-info { background: var(--primary); }

/* ============================================
   加载动画
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    animation: fadeIn 0.3s ease;
}

.loading-overlay .loading-icon {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay .loading-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.loading-overlay .loading-ring:nth-child(2) {
    inset: 12px;
    border-top-color: var(--accent);
    border-right-color: var(--primary-light);
    animation-duration: 0.9s;
    animation-direction: reverse;
}

.loading-overlay .loading-ring:nth-child(3) {
    inset: 24px;
    border-top-color: var(--primary-light);
    border-right-color: var(--accent);
    animation-duration: 0.6s;
}

.loading-overlay .loading-emoji {
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
    animation: bounce 0.6s ease-in-out infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

.loading-overlay .loading-text {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
}

.loading-overlay .loading-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    max-width: 360px;
    line-height: 1.6;
}

.loading-overlay .loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

.loading-overlay .loading-progress {
    width: 280px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-overlay .loading-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    animation: progress 8s ease-in-out infinite;
    width: 40%;
}

@keyframes progress {
    0% { width: 10%; margin-left: 0; }
    30% { width: 60%; margin-left: 0; }
    60% { width: 30%; margin-left: 50%; }
    90% { width: 70%; margin-left: 10%; }
    100% { width: 10%; margin-left: 0; }
}

.loading-cancel {
    margin-top: 20px;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.loading-cancel:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* ============================================
   空状态
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state .empty-text { font-size: 0.95rem; margin-bottom: 16px; }

/* ============================================
   工具类
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.hidden { display: none !important; }
.relative { position: relative; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card.featured { transform: none; }
    .user-center { grid-template-columns: 1fr; }
    .user-sidebar { position: static; }
}

@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .navbar-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        padding: 12px;
    }
    .mobile-menu-btn { display: block; }
    
    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 24px; }
    
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    
    .admin-layout { display: block; }
    .admin-sidebar { display: none; position: static; width: auto; }
    .admin-main { margin-left: 0; }
    
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    
    .game-frame iframe { min-height: 400px; }
    
    .modal { width: 95%; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .hero { padding: 100px 0 40px; }
    .hero-title { font-size: 1.6rem; }
    .hero-actions { flex-direction: column; }
    .section-title { font-size: 1.2rem; }
    .toolbar { flex-direction: column; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .search-box input { min-width: auto; }
    .auth-card { padding: 24px; }
    .generate-form { padding: 20px; }
}
