/**
 * 星座运势查询模块样式表
 * 完全按照 ixzys.com 样式设计
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f7f7f7;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #f60;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ==================== 头部 ==================== */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.header-top {
    padding: 15px 0;
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.logo span {
    color: #6b4c9a;
}

/* 星座配对选择器 */
.pairing-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gender-label {
    color: #666;
    font-size: 14px;
}

.pairing-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    color: #333;
}

.btn-pairing {
    background: #6b4c9a;
    color: #fff;
    padding: 6px 15px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.btn-pairing:hover {
    background: #7d5fb0;
}

/* 导航栏 */
.nav-bar {
    background: #6b4c9a;
}

.nav-bar .container {
    display: flex;
    align-items: center;
}

.nav-item {
    color: #fff;
    padding: 12px 15px;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.nav-item.active {
    border-bottom: 2px solid #fff;
}

/* ==================== 主内容区 ==================== */
.main-content {
    padding: 20px 0;
    min-height: calc(100vh - 200px);
}

/* ==================== 星座详情头部 ==================== */
.sign-detail-box {
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8bc2 100%);
    border-radius: 5px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    gap: 25px;
    align-items: center;
    color: #fff;
}

.sign-avatar-large {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sign-avatar-large img {
    width: 80px;
    height: 80px;
}

.sign-info-box {
    flex: 1;
}

.sign-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}

.sign-title small {
    font-size: 14px;
    font-weight: normal;
    opacity: 0.9;
}

.sign-detail-text {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 8px;
    opacity: 0.95;
}

.sign-detail-text strong {
    color: #fff;
}

.sign-date-label {
    display: inline-block;
    background: rgba(255,255,255,0.3);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    margin-top: 10px;
}

/* ==================== 区块标题 ==================== */
.section-header {
    margin: 25px 0 15px;
    padding-left: 10px;
    border-left: 4px solid #6b4c9a;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.section-header small {
    font-size: 13px;
    color: #999;
    font-weight: normal;
    margin-left: 10px;
}

/* ==================== 十二星座网格 ==================== */
.sign-list-box {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sign-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #e8e8e8;
}

.sign-row:last-child {
    border-bottom: none;
}

.sign-item {
    display: flex;
    gap: 12px;
    padding: 18px;
    border-right: 1px solid #e8e8e8;
    transition: background 0.3s;
    text-decoration: none;
}

.sign-item:nth-child(3n) {
    border-right: none;
}

.sign-item:hover {
    background: #f9f9f9;
}

.sign-icon-box {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.sign-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sign-text-box {
    flex: 1;
}

.sign-name {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.sign-name-tag {
    display: inline-block;
    background: #ffe6e6;
    color: #ff4d4f;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 6px;
}

.sign-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== 运势卡片 ==================== */
.fortune-box {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.fortune-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #e8e8e8;
}

.fortune-row:last-child {
    border-bottom: none;
}

.fortune-item {
    display: flex;
    gap: 12px;
    padding: 18px;
    border-right: 1px solid #e8e8e8;
    transition: background 0.3s;
    text-decoration: none;
}

.fortune-item:nth-child(3n) {
    border-right: none;
}

.fortune-item:hover {
    background: #f9f9f9;
}

.fortune-icon-circle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
}

.fortune-text-box {
    flex: 1;
}

.fortune-title {
    font-size: 15px;
    font-weight: bold;
    color: #1890ff;
    margin-bottom: 5px;
}

.fortune-star-row {
    margin-bottom: 5px;
}

.fortune-star-label {
    font-size: 13px;
    color: #666;
}

.fortune-stars {
    color: #faad14;
    font-size: 14px;
    margin-left: 5px;
}

.fortune-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== 配对卡片 ==================== */
.pairing-box {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.pairing-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-bottom: 1px solid #e8e8e8;
}

.pairing-row:last-child {
    border-bottom: none;
}

.pairing-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border-right: 1px solid #e8e8e8;
    transition: background 0.3s;
    text-decoration: none;
}

.pairing-item:nth-child(2n) {
    border-right: none;
}

.pairing-item:hover {
    background: #f9f9f9;
}

.pairing-sign-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.pairing-avatar-small {
    width: 40px;
    height: 40px;
}

.pairing-avatar-small img {
    width: 100%;
    height: 100%;
}

.pairing-heart-icon {
    color: #ff4d4f;
    font-size: 14px;
    margin: 0 5px;
}

.pairing-label-text {
    font-size: 13px;
    color: #666;
}

.pairing-score-box {
    text-align: right;
}

.pairing-score-label {
    font-size: 12px;
    color: #999;
}

.pairing-score-value {
    font-size: 18px;
    font-weight: bold;
    color: #ff4d4f;
}

/* ==================== 工具卡片 ==================== */
.tools-box {
    background: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

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

.tool-card {
    text-align: center;
    text-decoration: none;
    color: #333;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.tool-card:hover {
    background: #f9f9f9;
}

.tool-icon-box {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    background: #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.tool-name-text {
    font-size: 13px;
    color: #333;
}

/* ==================== 文章列表 ==================== */
.article-box {
    background: #fff;
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.article-item {
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

.article-item:last-child {
    border-bottom: none;
}

.article-link {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    display: block;
}

.article-link:hover {
    color: #f60;
}

.article-tag {
    color: #6b4c9a;
    font-weight: bold;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .sign-detail-box {
        flex-direction: column;
        text-align: center;
    }
    
    .sign-row,
    .fortune-row {
        grid-template-columns: 1fr;
    }
    
    .sign-item,
    .fortune-item {
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .pairing-row {
        grid-template-columns: 1fr;
    }
    
    .pairing-item {
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .pairing-selector {
        display: none;
    }
}

/* ==================== 详情页样式 ==================== */

/* 运势指数卡片 */
.fortune-index-box {
    background: #fff;
    border-radius: 5px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.fortune-index-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.fortune-index-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.fortune-index-icon img {
    width: 100%;
    height: 100%;
}

.fortune-index-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

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

.index-item {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.index-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.index-value {
    font-size: 28px;
    font-weight: bold;
    color: #6b4c9a;
}

/* 标签页切换 */
.tabs-box {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #e8e8e8;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-size: 15px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-item:hover {
    color: #6b4c9a;
    background: #f9f9f9;
}

.tab-item.active {
    color: #6b4c9a;
    border-bottom-color: #6b4c9a;
    font-weight: bold;
}

/* 运势详情内容 */
.fortune-detail-content {
    padding: 25px;
}

.fortune-detail-text {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

/* 星座详情表格 */
.sign-detail-table-box {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

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

.sign-detail-table tr {
    border-bottom: 1px solid #e8e8e8;
}

.sign-detail-table tr:last-child {
    border-bottom: none;
}

.sign-detail-table td {
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.6;
}

.sign-detail-table td:first-child {
    width: 120px;
    background: #f9f9f9;
    font-weight: bold;
    color: #666;
}

.sign-detail-table td:last-child {
    color: #333;
}

/* 配对区块 */
.pairing-section-box {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.pairing-section-header {
    padding: 15px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #e8e8e8;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.pairing-section-header img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}

.pairing-section-list {
    padding: 0;
}

.pairing-section-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #e8e8e8;
    text-decoration: none;
    transition: background 0.3s;
}

.pairing-section-item:last-child {
    border-bottom: none;
}

.pairing-section-item:hover {
    background: #f9f9f9;
}

.pairing-section-sign {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.pairing-section-name {
    font-size: 14px;
    color: #333;
}

.pairing-section-desc {
    font-size: 13px;
    color: #999;
}

.pairing-section-score {
    font-size: 18px;
    font-weight: bold;
    color: #ff4d4f;
}

/* 响应式 - 详情页 */
@media (max-width: 768px) {
    .fortune-index-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-item {
        flex: 0 0 50%;
    }
    
    .sign-detail-table td:first-child {
        width: 100px;
    }
}
