/* 全局样式 */
* {
    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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部横幅 */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.hero-banner h1 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero-banner .subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
    line-height: 1.6;
}

.online-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
}

.online-count .count {
    font-weight: 700;
    color: #ffd700;
    font-size: 16px;
}

/* 付费上墙按钮 */
.pay-button-container {
    text-align: center;
    margin-bottom: 25px;
}

.btn-pay-wall {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-pay-wall:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.5);
}

/* 分类标签 */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    background: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn:hover {
    background: #f0f0f0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 用户列表 */
.user-list-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.list-icon {
    font-size: 20px;
}

.list-title {
    font-size: 18px;
    font-weight: 600;
}

.hot-badge {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
}

/* 用户卡片 */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.user-card:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-qq {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.user-qq-number {
    font-weight: 600;
    color: #2563eb;
    font-size: 15px;
}

.vip-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

.vip-permanent {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.vip-quarterly {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.vip-monthly {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.user-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.user-signature {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.btn-copy {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    opacity: 0.9;
}

.btn-visit {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-visit:hover {
    opacity: 0.9;
}

/* 底部 */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 1.8;
    margin-top: 30px;
}

.footer .contact {
    margin-top: 10px;
    opacity: 0.7;
}

.footer .contact a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

/* 后台入口 */
.admin-entry {
    text-align: center;
    margin-top: 20px;
}

.admin-entry a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-decoration: none;
}

.admin-entry a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* 付费页面 */
.pay-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.pay-form-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.pay-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.title-underline {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    border-radius: 2px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* 头像预览 */
.avatar-preview {
    text-align: center;
}

.avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
}

/* 价格显示 */
.price-display {
    background: #fef2f2;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.price-symbol {
    font-size: 18px;
    color: #ef4444;
    font-weight: 600;
}

.price-value {
    font-size: 28px;
    color: #ef4444;
    font-weight: 700;
}

.price-unit {
    font-size: 14px;
    color: #ef4444;
}

/* 提交按钮 */
.btn-submit-pay {
    width: 100%;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-submit-pay:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.back-home {
    text-align: center;
    margin-top: 20px;
}

.back-home a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.back-home a:hover {
    text-decoration: underline;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: modalIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 500px;
    text-align: left;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.modal-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.btn-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal:hover {
    opacity: 0.9;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* 后台登录页 */
.admin-login-page {
    background: linear-gradient(135deg, #1e3a8a 0%, #581c87 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: 0;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.login-tip {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #9ca3af;
}

.back-to-site {
    text-align: center;
    margin-top: 25px;
}

.back-to-site a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
}

.back-to-site a:hover {
    color: white;
}

/* 后台管理页面 */
.admin-page {
    background: #f3f4f6;
    min-height: 100vh;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 移动端遮罩层 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-overlay.show {
    display: block;
}

/* 侧边栏 */
.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.sidebar-header .site-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-menu {
    flex: 1;
    padding: 15px 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: block;
    text-align: center;
    padding: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* 主内容区 */
.admin-main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.header-left {
    display: flex;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    margin-right: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-user {
    font-size: 14px;
    color: #6b7280;
}

.view-site {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.view-site:hover {
    text-decoration: underline;
}

.admin-content {
    flex: 1;
    padding: 30px;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* 数据概览 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 36px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 13px;
    color: #6b7280;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
}

.recent-orders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
}

.recent-order-item .order-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.recent-order-item .order-qq {
    font-weight: 500;
    color: #2563eb;
}

.recent-order-item .order-amount {
    font-weight: 600;
    color: #ef4444;
}

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

.toolbar-left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* 数据表格 */
.data-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f9fafb;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.data-table td {
    padding: 15px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.data-table tr:hover td {
    background: #f9fafb;
}

.data-table img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-inactive {
    background: #fee2e2;
    color: #dc2626;
}

.status-paid {
    background: #dcfce7;
    color: #16a34a;
}

.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.status-expired {
    background: #fee2e2;
    color: #dc2626;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-edit {
    background: #dbeafe;
    color: #2563eb;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: #bfdbfe;
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #fecaca;
}

/* 设置页面 */
.settings-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-form h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-form h3:not(:first-child) {
    margin-top: 30px;
}

.btn-save {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .hero-banner h1 {
        font-size: 22px;
    }

    .hero-banner .subtitle {
        font-size: 13px;
    }

    .category-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 8px 15px;
        font-size: 13px;
    }

    .user-card {
        flex-wrap: wrap;
    }

    .user-actions {
        flex-direction: row;
        width: 100%;
        justify-content: flex-end;
    }

    /* 后台响应式 */
    .mobile-menu-btn {
        display: flex;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        width: 240px;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-header h2,
    .sidebar-header .site-name,
    .menu-item span:not(.menu-icon),
    .logout-btn span {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header {
        padding: 15px;
    }

    .admin-content {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        font-size: 28px;
    }

    .stat-info h3 {
        font-size: 20px;
    }

    .data-table-container {
        overflow-x: auto;
    }

    .data-table {
        min-width: 600px;
    }

    .settings-form {
        padding: 20px;
    }

    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    .admin-user {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-actions {
        flex-direction: column;
    }

    .btn-copy,
    .btn-visit {
        width: 100%;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-content h3 {
        font-size: 18px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 15px;
        font-size: 13px;
    }
}
