/* ============================================
   用户后台样式
   ============================================ */

/* 整体布局 */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* 头部积分显示 */
.points-display {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.points-display:hover {
    transform: scale(1.05);
}

.points-icon {
    font-size: 16px;
}

/* 认证区域 */
.auth-section {
    display: grid;
    grid-template-columns: 1fr 460px;
    gap: 80px;
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 0 40px;
    align-items: center;
    min-height: calc(100vh - 60px - 100px);
}

.auth-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.auth-tab.active {
    background: white;
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.auth-form {
    padding: 30px;
}

.auth-form h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.auth-subtitle {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 14px;
}

.auth-subtitle strong {
    color: #e74c3c;
    font-size: 18px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.required-star {
    color: #e74c3c;
    margin-left: 2px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    opacity: 0.6;
    font-size: 16px;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

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

.auth-links a:hover {
    text-decoration: underline;
}

/* 品牌介绍区 */
.auth-brand {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.brand-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.brand-title {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.brand-feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.brand-feature-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.brand-feature-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-feature-info strong {
    font-size: 16px;
    color: #333;
}

.brand-feature-info span {
    font-size: 14px;
    color: #666;
}

/* 后台主界面 */
.dashboard-section {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    max-width: 1600px;
    margin: 30px auto 0;
    width: 100%;
}

/* 侧边栏 */
.dashboard-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

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

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.user-id {
    font-size: 12px;
    color: #999;
}

.points-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    color: white;
    margin-bottom: 20px;
}

.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.points-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 15px;
}

.points-value .points-balance {
    font-size: 36px;
    font-weight: bold;
}

.points-value .points-unit {
    font-size: 14px;
    opacity: 0.9;
}

.points-actions {
    display: flex;
    gap: 10px;
}

.points-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

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

.nav-item span {
    font-size: 18px;
}

/* 主内容区 */
.dashboard-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100%;
    min-width: 1100px;
    overflow-x: hidden;
    min-height: 600px;
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.tab-content h2 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #333;
}

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 35px;
}

.welcome-banner h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: white;
}

.welcome-banner p {
    margin: 0;
    opacity: 0.9;
}

/* 快速操作 */
.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 35px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.action-card:hover {
    background: white;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.action-icon {
    font-size: 40px;
}

.action-title {
    font-weight: 600;
    font-size: 15px;
}

.action-desc {
    font-size: 13px;
    color: #27ae60;
    background: #e8f5e9;
    padding: 3px 10px;
    border-radius: 10px;
}

/* 积分规则 */
.points-rules {
    margin-bottom: 30px;
}

.points-rules h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.rules-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rule-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.rule-item.free .rule-badge {
    background: #27ae60;
    color: white;
}

.rule-item.paid .rule-badge {
    background: #e74c3c;
    color: white;
}

.rule-text {
    color: #666;
    font-size: 14px;
}

/* 获取积分 */
.earn-points {
    margin-bottom: 30px;
}

.earn-points h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.earn-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.earn-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 24px;
    background: #f8f9fa;
    border-radius: 10px;
}

.earn-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
}

.earn-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.earn-info strong {
    font-size: 14px;
    color: #333;
}

.earn-info span {
    font-size: 13px;
    color: #27ae60;
    font-weight: 500;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state span {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* 历史记录 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.history-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
}

.history-info {
    flex: 1;
}

.history-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 3px;
}

.history-time {
    font-size: 12px;
    color: #999;
}

.history-amount {
    font-size: 16px;
    font-weight: bold;
}

.history-amount.positive {
    color: #27ae60;
}

.history-amount.negative {
    color: #e74c3c;
}

/* 设置 */
.settings-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
}

.settings-card h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #333;
}

.referral-code-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.referral-code-box code {
    flex: 1;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    font-size: 16px;
    color: #667eea;
    font-family: monospace;
}

.referral-tip {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 1;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

/* 充值弹窗 */
.recharge-rate {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.recharge-rate strong {
    color: #e74c3c;
    font-size: 20px;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.recharge-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.recharge-option:hover,
.recharge-option.selected {
    background: white;
    border-color: #667eea;
}

.recharge-amount {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.recharge-points {
    font-size: 14px;
    color: #27ae60;
    margin-top: 5px;
}

.recharge-custom {
    margin-bottom: 20px;
}

.recharge-custom label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.recharge-custom input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.recharge-contact {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.recharge-contact p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.recharge-contact strong {
    color: #667eea;
}

/* 按钮样式补充 */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

/* 文件上传区域 */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-upload-area:hover {
    border-color: var(--accent-color);
    background: #f0f7ff;
}

.file-upload-icon {
    font-size: 32px;
}

.file-upload-text {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 文件预览网格 */
.file-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.file-preview-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    aspect-ratio: 1;
}

.file-preview-item img,
.file-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    padding: 0;
}

.file-preview-remove:hover {
    background: rgba(0,0,0,0.8);
}

.file-preview-single {
    margin-top: 12px;
    max-width: 300px;
}

#feedback-content {
    resize: vertical;
    min-height: 120px;
}

/* 教程区域 */
.tutorial-section {
    margin-bottom: 30px;
}

.tutorial-section h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.tutorial-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.tutorial-card {
    width: calc(16.666% - 13px);
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

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

.tutorial-card-image {
    width: 100%;
    height: 60px;
    object-fit: cover;
    background: #f0f0f0;
    display: block;
}

.tutorial-card-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ccc;
}

.tutorial-card-title {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .tutorial-card {
        width: calc(25% - 12px);
    }
}

@media (max-width: 480px) {
    .tutorial-card {
        width: calc(50% - 8px);
    }
}

/* 反馈历史 */
.feedback-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.feedback-status.pending {
    background: #fff3e0;
    color: #f57c00;
}

.feedback-status.processing {
    background: #e3f2fd;
    color: #1976d2;
}

.feedback-status.resolved {
    background: #e8f5e9;
    color: #388e3c;
}

/* 响应式 */
@media (max-width: 1024px) {
    .auth-section {
        grid-template-columns: 1fr;
        gap: 40px;
        margin: 40px auto;
        padding: 0 20px;
        min-height: auto;
    }

    .auth-brand {
        display: none;
    }

    .dashboard-section {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .auth-section {
        grid-template-columns: 1fr;
        margin: 20px auto;
        padding: 0 15px;
    }

    .auth-brand {
        display: none;
    }

    .auth-box {
        max-width: 100%;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions,
    .points-rules,
    .earn-points {
        margin-bottom: 20px;
    }

    .dashboard-container {
        padding: 15px;
    }

    .dashboard-content {
        padding: 20px;
    }
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form,
.dashboard-content {
    animation: fadeIn 0.3s ease-out;
}







