:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 移动端首页样式 */
.mobile-body {
    background: #f5f5f5;
    min-height: 100vh;
}

.mobile-header {
    background: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mobile-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.mobile-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-logo-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.mobile-logo-text {
    font-size: 17px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-beans {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #b45309;
}

.mobile-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.mobile-login-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.mobile-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
}

.mobile-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.mobile-banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.mobile-banner-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.mobile-banner-desc {
    font-size: 14px;
    opacity: 0.9;
    letter-spacing: 2px;
}

.broadcast-bar {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    padding: 10px 0;
    overflow: hidden;
    position: relative;
}

.broadcast-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, rgba(245, 245, 245, 1), transparent);
    z-index: 2;
    pointer-events: none;
}

.broadcast-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to left, rgba(245, 245, 245, 1), transparent);
    z-index: 2;
    pointer-events: none;
}

.broadcast-container {
    display: flex;
    gap: 40px;
    animation: broadcastScroll 60s linear infinite;
    will-change: transform;
}

.broadcast-container:hover {
    animation-play-state: paused;
}

@keyframes broadcastScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.broadcast-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.broadcast-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.broadcast-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.broadcast-content {
    font-size: 13px;
    color: var(--text-primary);
}

.broadcast-user {
    color: var(--primary-color);
    font-weight: 600;
}

.broadcast-action {
    color: var(--text-secondary);
}

.broadcast-target {
    color: #f59e0b;
    font-weight: 500;
}

.broadcast-time {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.mobile-main {
    padding: 16px;
    padding-bottom: 80px;
}

/* 快速入门横幅 */
.quick-start-banner {
    display: block;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-start-banner:active {
    transform: scale(0.98);
}

.quick-start-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quick-start-title {
    font-size: 20px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.quick-start-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease;
}

.quick-start-btn svg {
    stroke: white;
}

.mobile-section {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mobile-section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-section-more {
    font-size: 12px;
    color: var(--text-muted);
}

.mobile-service-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.mobile-service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: white;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.mobile-service-item:active {
    background: var(--bg-secondary);
}

.mobile-service-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, var(--primary-light), #ddd6fe);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-service-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
}

.mobile-service-content {
    flex: 1;
    min-width: 0;
}

.mobile-service-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mobile-service-desc {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-service-price {
    text-align: right;
    margin-right: 4px;
}

.mobile-price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.mobile-price-unit {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: -2px;
}

.mobile-service-arrow {
    color: var(--text-muted);
}

.mobile-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fef3c7;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.mobile-notice-icon {
    font-size: 16px;
}

.mobile-notice-text {
    font-size: 12px;
    color: #92400e;
    line-height: 1.5;
}

.mobile-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -1px 10px rgba(0,0,0,0.08);
    z-index: 100;
}

.mobile-tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    padding: 4px 16px;
}

.mobile-tabbar-item.active {
    color: var(--primary-color);
}

.mobile-tabbar-item svg {
    stroke: currentColor;
}

/* 通用表单样式 */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.captcha-wrapper {
    display: flex;
    gap: 12px;
}

.captcha-wrapper .form-input {
    flex: 1;
}

.captcha-img {
    height: 40px;
    width: 120px;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid var(--border-color);
    object-fit: contain;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.page-wrapper {
    min-height: 100vh;
    padding: 20px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 上传区域 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: var(--text-muted);
}

.upload-text {
    font-size: 15px;
    color: var(--text-secondary);
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

/* 套餐选择 */
.package-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.package-item {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.package-item:hover,
.package-item.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.package-name {
    font-size: 15px;
    font-weight: 600;
}

.package-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.package-info {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 结果展示 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.result-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.result-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.result-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.result-item:hover .result-actions {
    opacity: 1;
}

/* 风险提示 */
.risk-tip {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    text-align: center;
    margin-top: 20px;
}

/* 充值页面 */
.recharge-notice {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 13px;
    color: #991b1b;
    text-align: center;
    margin-bottom: 20px;
}

.qrcode-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.qrcode-item {
    text-align: center;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.qrcode-item:hover,
.qrcode-item.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.qrcode-item img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

/* 记录列表 */
.record-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.record-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.record-info {
    flex: 1;
}

.record-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.record-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.record-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.record-status.success {
    background: #d1fae5;
    color: #065f46;
}

.record-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.record-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 模态框 */
.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;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* 页脚 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 16px;
    }
    
    .card {
        padding: 20px;
        border-radius: var(--radius-md);
    }
    
    .qrcode-section {
        grid-template-columns: 1fr;
    }
    
    .record-item {
        flex-direction: column;
        text-align: center;
    }
    
    .record-image {
        margin: 0 auto;
    }
}
