/* 六爻排盘样式 */

/* 六爻选择区域 */
.liuyao-yao-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    width: 100%;
}

.liuyao-yao-inputs > div {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.liuyao-yao-input {
    flex: 1;
    border: 1px solid #c4b5a0;
    border-radius: 4px;
    background: #FFFCF5;
    padding: 4px 10px;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    color: #000000;
    font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    height: 35px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.liuyao-yao-input option {
    font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: #000000;
    background: #FFFCF5;
}

.liuyao-yao-input:focus {
    outline: none;
    border-color: #c4b5a0;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

.liuyao-yao-input-label {
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    min-width: 40px;
    color: #000000;
}

/* 六爻按钮样式 */
.liuyao-btn {
    border: 1px solid #c4b5a0;
    border-radius: 6px;
    background: #FFFCF5;
    color: #000000;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin: 10px 5px;
    display: inline-block;
    transition: all 0.2s ease;
    font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.liuyao-btn:hover {
    border-color: #000000;
}

.liuyao-btn:active {
    background: #000000;
    color: #FFFCF5;
}

.liuyao-btn-primary {
    background: #000000;
    color: #FFFCF5;
    border-color: #000000;
}

.liuyao-btn-primary:hover {
    background: #333333;
}

.liuyao-btn-small {
    padding: 4px 10px;
    font-size: 12px;
    border: none;
    background: transparent;
    color: #9333ea;
    font-weight: 400;
    white-space: nowrap;
}

.liuyao-btn-small:hover {
    color: #a855f7;
    background: transparent;
}

/* 六爻起卦方式切换按钮 */
.liuyao-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 15px;
    border: 1px solid #c4b5a0;
    border-radius: 6px;
    overflow: hidden;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.liuyao-mode-toggle button {
    flex: 1;
    border: none;
    border-right: 1px solid #c4b5a0;
    background: #FFFCF5;
    color: #000000;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'HuiwenMingchao', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.liuyao-mode-toggle button:last-child {
    border-right: none;
}

.liuyao-mode-toggle button.active {
    background: #000000;
    color: #FFFCF5;
}

.liuyao-mode-toggle button:hover:not(.active) {
    background: #f5f3ee;
}

/* 硬币样式 */
.liuyao-coins {
    display: flex;
    gap: 5px;
    align-items: center;
}

.liuyao-coin-wrapper {
    position: relative;
    width: 22px;
    height: 22px;
}

.liuyao-coin-wrapper::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 1px solid #c4b5a0;
    border-radius: 50%;
    top: 0;
    left: 0;
    z-index: 0;
}

.liuyao-coin {
    position: absolute;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #000000;
    top: 0;
    left: 0;
    font-size: 12px;
    font-weight: 500;
    z-index: 1;
}

/* 卦象结果容器 */
#liuyao-gua-result {
    position: relative;
    margin: 15px 0;
}

/* 卦象显示区域 */
.liuyao-gua-display {
    border: 1px solid #c4b5a0;
    border-radius: 8px;
    padding: 15px;
    background: #faf8f3;
    position: relative;
}

/* 本卦和变卦排列容器 */
.liuyao-gua-comparison {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin: 15px 0;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.liuyao-gua-section-wrapper {
    flex: 1;
    min-width: 140px;
    max-width: none;
    display: flex;
    flex-direction: column;
}

.liuyao-gua-section-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #000000;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.liuyao-gua-section-label .liuyao-gua-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
}

.liuyao-gua-section {
    flex: 1;
    padding: 6px 5px;
    background: #FFFCF5;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
}

.liuyao-no-biangua {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #333333;
}

.liuyao-gua-title {
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    margin-bottom: 12px;
}

/* 六爻显示 */
.liuyao-yao-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    margin-top: 15px;
    align-items: flex-start;
    width: 100%;
}

.liuyao-yao-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    box-sizing: border-box;
    width: 100%;
}

.liuyao-yao-info {
    min-width: 55px;
    font-size: 10px;
    font-weight: 500;
    text-align: right;
    flex-shrink: 0;
    line-height: 1.2;
    color: #333333;
    white-space: nowrap;
}

.liuyao-yao {
    width: 35px;
    height: 4px;
    background: #000000;
    position: relative;
    flex-shrink: 0;
    border-radius: 1px;
}

.liuyao-yao.yin {
    background: transparent;
}

.liuyao-yao.yin::before,
.liuyao-yao.yin::after {
    content: '';
    position: absolute;
    width: 35%;
    height: 4px;
    background: #000000;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 1px;
}

.liuyao-yao.yin::before {
    left: 0;
}

.liuyao-yao.yin::after {
    right: 0;
}

.liuyao-yao-mark {
    min-width: 14px;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    color: #000000;
    flex-shrink: 0;
}

.liuyao-yao-arrow {
    min-width: 12px;
    font-size: 10px;
    color: #000000;
    text-align: center;
    flex-shrink: 0;
}

/* 卦信息表格 */
.liuyao-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid #c4b5a0;
    border-radius: 6px;
    overflow: hidden;
}

.liuyao-info-table td {
    border: 1px solid #c4b5a0;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 500;
}

.liuyao-info-table td:first-child {
    background: #000000;
    color: #FFFCF5;
    width: 30%;
}

.liuyao-info-table td:last-child {
    background: #FFFCF5;
    color: #000000;
}

/* 世应标记 */
.liuyao-shiying {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 1px solid #c4b5a0;
    border-radius: 4px;
    background: #000000;
    color: #FFFCF5;
    text-align: center;
    line-height: 26px;
    font-weight: 600;
    font-size: 12px;
    margin-left: 10px;
}

/* 变卦显示 */
.liuyao-biangua {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 六爻输入区域容器 */
.liuyao-input-section {
    width: 100%;
}

.liuyao-section-title {
    font-size: 13px;
    font-weight: 500;
    margin: 15px 0 10px 0;
    color: #333333;
    text-align: center;
}

/* 日期显示 */
.liuyao-date-display {
    text-align: center;
    margin-bottom: 15px;
    font-size: 11px;
    color: #333333;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .liuyao-yao-inputs {
        grid-template-columns: 1fr;
    }

    .liuyao-gua-comparison {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .liuyao-gua-section-wrapper {
        flex: 1;
        min-width: 0;
    }
}
