/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
}





/* 主内容区域 */
.main-content {
    /* margin-top 已在 base.html 中用 padding-top 处理 */
    min-height: calc(100vh - 60px);
}

/* 通用按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #ff4d4f;
    color: white;
}

.btn-primary:hover {
    background: #ff7875;
}

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

.btn-default:hover {
    background: #e8e8e8;
}

/* 通用卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 16px;
    overflow: hidden;
}

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

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

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #ff4d4f;
    outline: none;
}

/* 通用图标样式 */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
}

/* 响应式布局 - 只保留按钮样式调整 */
@media (max-width: 768px) {
    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 超小屏幕样式 */
@media (max-width: 375px) {
    .profile-link span {
        display: none;
    }
    
    .nav-menu-item {
        padding: 4px 6px;
        font-size: 14px;  /* 增大移动端字号从11px到14px */
        font-weight: bold;  /* 移动端也使用粗体 */
    }
    
    .user-avatar {
        width: 22px;
        height: 22px;
    }
}

/* 通用动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* 通用工具类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: #ff4d4f;
}

.text-muted {
    color: #999;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

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

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

/* 导航栏样式 */
.navbar {
    background-color: #d22222;  /* 红色背景，与战绩记录条完全一致 */
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1010;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border-bottom: 1px solid #a01a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-logo {
    display: none;
}



.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-menu-item {
    color: #ffffff;  /* 白色字体 */
    text-decoration: none;
    font-size: 17px;  /* 增大字号从15px到17px */
    font-weight: bold;  /* 改为粗体 */
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-menu-item:hover,
.nav-menu-item.active {
    color: #ffffff;  /* 悬停时保持白色 */
    background-color: rgba(255,255,255,0.2);  /* 半透明白色背景 */
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* 余额信息样式 */
.balance-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    min-width: 150px;
}

.balance-label {
    color: #888;
    font-size: 0.8rem;
    white-space: nowrap;
}

.balance-amount {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-recharge {
    background-color: #40a9ff;
    color: #fff;
    padding: 0.45rem 0.35rem;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background-color 0.3s;
    white-space: nowrap;
    line-height: 1;
}

.btn-recharge:hover {
    background-color: #096dd9;
}

/* 用户菜单样式 */
.user-menu {
    position: relative;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #f5f5f5;
}

/* 登录注册按钮样式 */
.auth-links {
    display: flex;
    gap: 1rem;
}

.btn-login, .btn-register {
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 17px !important;  /* 改为与首页按钮相同的字号，添加!important确保最高优先级 */
    font-weight: bold !important;  /* 改为粗体，与首页按钮保持一致，添加!important确保最高优先级 */
    transition: all 0.3s;
}

.btn-login {
    background-color: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-login:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-register {
    background-color: #40a9ff;
    color: #fff;
}

.btn-register:hover {
    background-color: #096dd9;
}

/* 主要内容区域样式 */
/* 删除重复的main-content定义，使用第16行的正确定义 */



/* 通用组件样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1890ff;
    color: white;
}

.btn-primary:hover {
    background-color: #096dd9;
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
}

.prediction-detail {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* 顶部导航样式 */
.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

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

.back-btn {
    color: #333;
    text-decoration: none;
    font-size: 18px;
}

.page-header h1 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

/* 作者卡片样式 */
.author-card {
    background: #fff;
    padding: 20px;
    margin: 0 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.author-info {
    flex: 1;
}

.author-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.author-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #e6f7ff;
    color: #1890ff;
    border-radius: 4px;
    font-size: 12px;
}

.follow-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    color: #666;
    border-radius: 15px;
    font-size: 14px;
}

/* 预测内容样式 */
.prediction-content {
    background: #fff;
    padding: 20px;
    margin: 0 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.prediction-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
}

.prediction-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 15px;
}

.content-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f6ffed;
    color: #52c41a;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.publish-time {
    color: #999;
    font-size: 13px;
    margin-bottom: 20px;
}

/* 支付区域样式 */
.payment-area {
    background: #fff;
    padding: 20px;
    margin: 20px 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.price-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.price-label {
    color: #666;
    font-size: 15px;
}

.price-amount {
    color: #ff4d4f;
    font-size: 20px;
    font-weight: 500;
}

.price-amount .original {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
    margin-left: 8px;
}

.payment-notice {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.payment-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-wechat, .btn-alipay {
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1890ff;
}

.btn-wechat:hover, .btn-alipay:hover {
    background: #096dd9;
}

/* 底部导航样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.nav-right .btn-buy {
    padding: 10px 25px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    cursor: pointer;
}

.nav-right .btn-buy:hover {
    background: #ff7875;
}

@media (max-width: 768px) {
    .prediction-detail {
        padding-bottom: 80px;
    }
    
    .author-card,
    .prediction-content,
    .payment-area {
        margin: 0 10px 15px;
        padding: 15px;
    }
    
    .payment-buttons {
        grid-template-columns: 1fr;
    }
    
    .bottom-nav {
        padding: 10px 15px;
    }
}

.package-count {
    color: #666;
    font-size: 0.9em;
    margin-left: 4px;
}

.master-content-images {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.content-bottom-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-bottom-image:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}



/* 添加触摸设备优化 */
@media (hover: none) {
    .btn:hover {
        transform: none;
    }

    .nav-menu-item:active,
    .btn:active {
        opacity: 0.7;
    }
}

/* 适配不同屏幕尺寸 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
    }
}

/* 优化字体大小 */
@media (max-width: 320px) {
    html {
        font-size: 14px;
    }
}

/* 优化图片显示 */
img {
    max-width: 100%;
    height: auto;
}

/* 添加暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #fff;
    }

    .card {
        background: #1e1e1e;
    }

    .form-control {
        background: #2d2d2d;
        color: #fff;
        border-color: #404040;
    }

    .btn-default {
        background: #2d2d2d;
        color: #fff;
    }
}

/* 修改首页搜索框和推荐大师区域的连接 */
.search-bar {
    margin-bottom: 0 !important;
    border-radius: 8px 8px 0 0 !important;
}

.section-title.recommend-title {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-top: 1px solid #eee !important;
    border-radius: 0 !important;
    background-color: white !important;
}

.search-tip {
    padding-bottom: 5px !important;
}

.search-bar, .search-tip, .content-tabs {
    background-color: white !important;
    margin-bottom: 0 !important;
}

.masters-section {
    margin-top: 0 !important;
}

.prediction-tabs {
    margin-bottom: 0 !important;
}

.content-tabs {
    border-radius: 8px 8px 0 0 !important;
}

/* 确保搜索框与大师标题无缝连接 */
.tab-header {
    margin-bottom: 0 !important;
}

/* 解决可能的额外空白间距 */
.page-container, .container {
    font-size: 0;  /* 消除内联元素间的空白 */
}

.page-container *, .container * {
    font-size: initial;  /* 恢复内部元素的字体大小 */
}

/* 确保发布时间在一行显示 */
.master-time,
.master-footer .master-time,
.publish-time,
.prediction-info .publish-time {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
    display: inline-block;
} 