/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
}

body {
    padding-bottom: 60px;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* 容器 */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部Banner */
.header-banner {
    background: linear-gradient(135deg, #FF7043 0%, #FF9800 100%);
    padding: 20px 15px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.header-banner::before {
    content: "专业领先";
    position: absolute;
    right: -20px;
    top: 10px;
    font-size: 40px;
    font-weight: bold;
    opacity: 0.2;
    transform: rotate(-15deg);
}

.banner-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.banner-logo .logo-icon {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #FF7043;
    margin-right: 12px;
    font-weight: bold;
}

.banner-logo .logo-text {
    font-size: 24px;
    font-weight: bold;
}

.banner-notice {
    font-size: 13px;
    line-height: 1.8;
    opacity: 0.95;
}

.banner-contact {
    position: absolute;
    right: 15px;
    bottom: 20px;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
}

.banner-contact .wechat-icon {
    width: 24px;
    height: 24px;
    background: #07c160;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 14px;
}

/* 搜索框 */
.search-box {
    background: #fff;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input {
    flex: 1;
    height: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
}

.search-input:focus {
    border-color: #FF7043;
}

.search-btn {
    width: 80px;
    height: 40px;
    background: #FF7043;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.search-btn:active {
    background: #E64A19;
}

/* 资料列表 */
.post-list {
    padding: 0 15px;
}

.post-item {
    background: #fff;
    margin-bottom: 10px;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.post-rank {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: bold;
    flex-shrink: 0;
}

.post-rank.rank-1 { color: #FF5722; }
.post-rank.rank-2 { color: #FF9800; }
.post-rank.rank-3 { color: #FFC107; }

.post-rank-badge {
    position: absolute;
    left: 0;
    top: 0;
    background: #FF7043;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px 0 8px 0;
}

.post-content {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.5;
}

.post-title .emoji {
    font-size: 16px;
}

.post-meta {
    font-size: 12px;
    color: #999;
}

.post-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 15px;
}

.post-status {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
}

.post-status img {
    width: 100%;
    height: 100%;
}

.post-status .status-icon {
    width: 50px;
    height: 50px;
    border: 2px solid;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.status-icon.status-pending {
    border-color: #ccc;
    color: #ccc;
}

.status-icon.status-win {
    border-color: #07c160;
    color: #07c160;
}

.status-icon.status-lose {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.post-price {
    color: #FF5722;
    font-size: 16px;
    font-weight: bold;
}

/* 战绩表页面 */
.stats-header {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    padding: 30px 15px;
    text-align: center;
    color: #fff;
}

.stats-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

.stats-info {
    font-size: 14px;
    line-height: 2;
}

.stats-info strong {
    font-size: 18px;
}

/* 战绩列表 */
.record-item {
    background: #fff;
    margin: 0 15px 10px;
    border-radius: 8px;
    padding: 15px;
}

.record-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 5px;
}

.record-detail {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.record-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.record-result {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-icon {
    width: 30px;
    height: 30px;
}

.result-price {
    font-size: 16px;
    font-weight: bold;
}

.result-price.win { color: #07c160; }
.result-price.lose { color: #ff4d4f; }

/* 我的页面 */
.profile-header {
    background: #fff;
    padding: 32px 15px 28px;
    text-align: center;
    margin-bottom: 0;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    overflow: hidden;
    background: #f0f0f0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 17px;
    font-weight: 500;
    color: #222;
}

/* 功能区块 */
.section-card {
    background: #fff;
    margin: 12px;
    border-radius: 10px;
    overflow: hidden;
}

.section-title {
    padding: 14px 15px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 20px 15px;
    gap: 15px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.menu-icon {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 24px;
}

.menu-icon.icon-edit { color: #FF7043; }
.menu-icon.icon-order { color: #4FC3F7; }
.menu-icon.icon-service { color: #66BB6A; }
.menu-icon.icon-report { color: #FFB74D; }

.menu-text {
    font-size: 13px;
}

/* 退出登录按钮 */
.logout-btn {
    display: block;
    margin: 20px 12px;
    padding: 14px;
    background: #fff;
    color: #e64340;
    text-align: center;
    border-radius: 10px;
    font-size: 16px;
    text-decoration: none;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    display: flex;
    border-top: 1px solid #eee;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-decoration: none;
    font-size: 11px;
    padding-top: 6px;
}

.nav-item.active {
    color: #FF7043;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.nav-icon svg {
    display: block;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

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

/* 加载更多 */
.load-more {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 14px;
}

/* 保存为图片按钮 */
.save-image-btn {
    position: fixed;
    bottom: 70px;
    right: 15px;
    background: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 13px;
    color: #666;
}

/* 弹窗 */
.modal-overlay {
    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;
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    padding: 20px;
}

.modal-header {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.modal-btn.btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.modal-btn.btn-confirm {
    background: #FF7043;
    color: #fff;
}

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

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

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.form-input:focus {
    border-color: #FF7043;
}

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

/* 代理商入口 */
.agent-entry {
    display: block;
    margin: 12px;
    background: linear-gradient(135deg, #FF7043 0%, #FF9800 100%);
    border-radius: 12px;
    padding: 18px 15px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 112, 67, 0.3);
}

.agent-entry-content {
    display: flex;
    align-items: center;
}

.agent-entry-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.agent-entry-text {
    flex: 1;
}

.agent-entry-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.agent-entry-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

.agent-entry-arrow {
    opacity: 0.8;
}
