/* 易卦模块样式 */

/* 汇文明朝体字体定义 */
@font-face {
    font-family: 'HuiwenMingchao';
    src: url('../assets/fonts/huiwen-gua-subset.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    background: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    box-sizing: border-box;
    max-width: 380px;
    margin: 0 auto;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

.container {
    min-height: 100vh;
    background: #ffffff;
    padding: 0;
    box-sizing: border-box;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    justify-content: center;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 0;
    margin: 0;
}

.nav-item {
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: #e9e9e9;
    color: #000;
}

.nav-item.active {
    color: #000;
    border-bottom-color: #000;
    background: #fff;
}

/* 页面标题 */
.page-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin: 20px 0;
    padding: 10px 0;
}

/* 搜索区域 */
.search-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* 卦列表 */
.gua-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.gua-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gua-item:hover {
    background: #f0f0f0;
    border-color: #999;
}

.gua-number {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.gua-name {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.gua-symbol {
    font-size: 16px;
    color: #000;
}

/* 卦详情卡片 */
.gua-detail-card {
    background: #fff;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.gua-detail-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.gua-detail-name {
    font-size: 24px;
    font-weight: 600;
    color: #000;
}

.gua-detail-symbol {
    font-size: 32px;
    color: #000;
}

.gua-detail-meaning {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin: 15px 0;
}

.gua-detail-advice {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    text-align: left;
}

/* 竹签相关样式 */
.bamboo-grid {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 20px 0;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: none;
    position: relative;
}

.bamboo-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.bamboo-row:last-child {
    margin-bottom: 0;
}

.bamboo-stick {
    width: 10px;
    height: 110px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.bamboo-stick:hover {
    transform: translateY(-8px);
}

.bamboo-stick:active {
    transform: translateY(-4px) scale(1.02);
}

.stick-back {
    width: 100%;
    height: 100%;
    background: #B8A082;
    border-radius: 2px;
    position: relative;
    box-shadow: 
        inset 0 0 0 1px rgba(139, 115, 85, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.bamboo-stick.selected-stick .stick-back {
    background: #B8A082;
    border: 2px dashed #ff0000;
    transform: scale(1.15);
}

/* 抽签结果样式 */
.sign-result {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
}

.gua-card {
    padding: 30px 20px;
    margin: 0;
    text-align: center;
    position: relative;
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    border: 2px solid #000000;
    background: #ffffff;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
}

.gua-card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.gua-number-section {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.gua-header-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.gua-name-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gua-number {
    font-size: 18px;
    font-weight: 500;
    color: #000000;
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    margin-bottom: 5px;
}

.gua-name {
    font-size: 28px;
    font-weight: 400;
    color: #333333;
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    letter-spacing: 2px;
}

.gua-symbol-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gua-part {
    display: flex;
    align-items: center;
    margin: 5px 0;
    gap: 10px;
}

.gua-symbol-single {
    font-size: 40px;
    color: #000000;
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    line-height: 1;
    display: inline-block;
    width: 40px;
    text-align: center;
}

.gua-label {
    font-size: 14px;
    color: #666666;
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    font-weight: 400;
    letter-spacing: 0.5px;
    min-width: 40px;
}

.gua-meaning {
    text-align: center;
    margin: 20px 0;
    padding: 15px 10px;
}

.meaning-text {
    font-size: 18px;
    color: #000000;
    font-weight: 400;
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    letter-spacing: 1px;
    line-height: 1.4;
}

.gua-text-section {
    text-align: center;
    padding: 15px;
    border: none;
    background: #ffffff;
    margin-top: 20px;
}

.gua-text {
    font-size: 14px;
    color: #333333;
    line-height: 1.6;
    font-weight: 400;
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: normal;
    word-break: break-all;
    max-width: 100%;
    margin: 0 auto;
}

.redraw-button-container {
    margin-top: 15px;
    text-align: center;
}

.redraw-button {
    background: transparent;
    color: #333333;
    border: none;
    padding: 12px 24px;
    font-size: 18px !important;
    font-weight: 400;
    border-radius: 0;
    font-family: "HuiwenMingchao", "SimSun", "宋体", serif;
    letter-spacing: 1px;
    box-shadow: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.redraw-button:active {
    transform: none;
    box-shadow: none;
}

/* 响应式调整 */
@media (max-width: 380px) {
    .gua-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .gua-item {
        padding: 8px 4px;
    }
    
    .gua-symbol {
        font-size: 14px;
    }
}
