/* 微信分享卡片系统 - 样式表 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f0f0f0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* 顶部横幅 */
.top-banner {
    background: linear-gradient(135deg, #07C160, #06ad56);
    color: #fff;
    padding: 16px 20px;
    text-align: center;
}
.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}
.banner-icon { font-size: 28px; }
.banner-title { font-size: 20px; font-weight: 700; }
.banner-sub { font-size: 12px; opacity: 0.9; }

/* 页面容器 */
.page { padding: 12px; }

/* 登录/注册 */
.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px 24px;
    margin-top: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.login-box h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #07C160;
    font-size: 22px;
}
.login-box input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}
.login-box input:focus { border-color: #07C160; }
.login-tip {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #999;
}
.login-tip a { color: #07C160; text-decoration: none; }
.btn-primary {
    width: 100%;
    padding: 14px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    transition: opacity 0.2s;
    margin-top: 8px;
}
.btn-primary:active { opacity: 0.8; }

/* 用户信息栏 */
.user-info-bar {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}
.user-avatar-icon { font-size: 28px; }
#user-greeting { font-size: 15px; font-weight: 500; flex: 1; }
.sync-avatar-btn {
    font-size: 12px;
    color: #07C160;
    background: #e8f5e9;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
}

/* 套餐信息 */
.plan-info {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.plan-name { font-size: 15px; margin-bottom: 10px; }
.plan-name strong { color: #07C160; }
.plan-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.plan-tag {
    font-size: 13px;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 6px;
}
.status-normal { color: #07C160; }

/* 链接 */
.info-links {
    text-align: center;
    margin-bottom: 12px;
}
.info-links a {
    display: block;
    color: #07C160;
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 6px;
}

/* 统计区 */
.stats-section {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}
.qr-code-img {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.qr-placeholder {
    width: 60px;
    height: 60px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}
.qr-box p { font-size: 12px; color: #666; }
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table th {
    background: #fafafa;
    padding: 10px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    width: 110px;
}
.stats-table td {
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

/* 区块标题 */
.section-title {
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    padding: 14px 0 10px;
    color: #333;
}
.search-count { font-size: 12px; color: #999; font-weight: 400; }

/* 表单表格 */
.form-table {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.form-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}
.form-row:last-child { border-bottom: none; }
.form-label {
    width: 100px;
    min-width: 100px;
    padding: 14px 12px;
    font-weight: 600;
    font-size: 14px;
    background: #fafafa;
    text-align: center;
    border-right: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.form-label small {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
.form-label.required::before {
    content: '*';
    color: #e53935;
    margin-right: 2px;
}
.form-value {
    flex: 1;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.form-value input[type="text"],
.form-value input[type="url"],
.form-value input[type="password"],
.form-value textarea,
.form-value select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}
.form-value input:focus,
.form-value textarea:focus,
.form-value select:focus { border-color: #07C160; }
.form-value textarea { resize: vertical; }

.tip-text { font-size: 13px; color: #e65100; line-height: 1.6; }

/* 图片类型选择 */
.img-type-selector {
    width: 100%;
    font-size: 13px;
    margin-bottom: 8px;
}
.img-type-selector label {
    margin-right: 16px;
    cursor: pointer;
}

/* 分享预览 */
.share-preview {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.preview-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.preview-body {
    display: flex;
    align-items: center;
    gap: 10px;
}
.preview-desc {
    flex: 1;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}
.preview-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background: #07C160;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wechat-icon { font-size: 24px; }

/* 按钮组 */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.btn-submit, .btn-reset, .btn-new {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}
.btn-submit { background: #07C160; color: #fff; }
.btn-reset { background: #ff9800; color: #fff; }
.btn-new { background: #2196F3; color: #fff; }
.btn-submit:hover, .btn-reset:hover, .btn-new:hover { opacity: 0.85; }

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.search-bar input {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.search-bar select {
    padding: 10px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.btn-search {
    padding: 10px 20px;
    background: #ff5722;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* 搜索提示 */
.search-tips {
    background: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #e53935;
    line-height: 1.8;
}

/* 卡片列表 */
.card-list { margin-bottom: 12px; }
.card-item {
    background: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s;
}
.card-item.highlight { background: #e8f5e9; }
.card-item-info { flex: 1; min-width: 0; }
.card-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-item-desc {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-item-meta {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}
.card-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.btn-card {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}
.btn-edit { background: #2196F3; color: #fff; }
.btn-share { background: #07C160; color: #fff; }
.btn-delete { background: #f44336; color: #fff; }

/* 分页 */
.pagination {
    text-align: center;
    padding: 14px 0;
    font-size: 14px;
    color: #666;
}
.pagination a {
    color: #07C160;
    text-decoration: none;
    margin: 0 4px;
    cursor: pointer;
}
.pagination a:hover { text-decoration: underline; }
.pagination .current { font-weight: 700; color: #333; }

/* 弹窗 */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}
.modal-header h3 { font-size: 16px; }
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}
.modal-body { padding: 16px 20px; }

.add-category-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.add-category-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.btn-small {
    padding: 8px 16px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.category-list { list-style: none; }
.category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.category-list li:last-child { border-bottom: none; }
.category-name { font-size: 14px; }
.category-actions { display: flex; gap: 6px; }

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    display: flex;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    z-index: 100;
}
.nav-item {
    flex: 1;
    text-align: center;
    padding: 10px 0 8px;
    text-decoration: none;
    color: #666;
}
.nav-item.active { color: #07C160; }
.nav-icon { display: block; font-size: 20px; margin-bottom: 2px; }
.nav-item span:last-child { font-size: 11px; }

/* 链接样式 */
.link-green { color: #07C160; }
.link-orange { color: #ff9800; font-size: 13px; text-decoration: none; }

/* 加载提示 */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    font-size: 16px;
    color: #666;
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    animation: fadeInOut 2s ease;
}
@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* 响应式 */
@media (max-width: 360px) {
    .form-label { width: 80px; min-width: 80px; font-size: 13px; }
    .btn-submit, .btn-reset, .btn-new { padding: 10px 20px; font-size: 14px; }
}
