/* 运势结果样式表 - 黑色主题 */

/* 结果区域容器 */
#fortuneResult {
    display: none;
    background-color: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 结果头部 */
.result-header {
    text-align: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.result-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #bb86fc;
}

.result-date {
    color: #9e9e9e;
    font-size: 0.95rem;
}

/* 总体运势概览 */
.result-overview {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.result-score {
    font-size: 3.5rem;
    font-weight: bold;
    color: #bb86fc;
    text-align: center;
    width: 120px;
    height: 120px;
    line-height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c2c2c, #222);
    box-shadow: 0 5px 15px rgba(187, 134, 252, 0.2);
    margin-right: 2rem;
}

.result-status {
    font-size: 2rem;
    font-weight: bold;
    color: #e0e0e0;
    background: linear-gradient(45deg, #bb86fc, #03dac6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 生命灵数部分 */
.result-lifenumber {
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.result-lifenumber:hover {
    transform: translateY(-5px);
}

.result-lifenumber h4 {
    color: #bb86fc;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.result-lifenumber h4::before {
    content: "✧";
    margin-right: 0.5rem;
    color: #03dac6;
}

.result-lifenumber p {
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* 五行元素分析部分 */
.result-elements {
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 15px;
}

.result-elements h4 {
    color: #03dac6;
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.element-chart {
    display: flex;
    height: 120px;
    margin-bottom: 6px;
    align-items: flex-end;
    justify-content: space-around;
}

.element-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.element-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    width: 100%;
}

.element-bar-container {
    flex: 1;
    height: 24px;
    background-color: #222;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.element-bar {
    width: 18%;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.element-bar:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
}

.element-bar:hover .element-value {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.element-bar:hover::after {
    content: attr(data-percentage);
    position: absolute;
    top: -25px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

@keyframes barRise {
    from {
        height: 0;
    }
    to {
        height: var(--bar-height);
    }
}

.element-value {
    width: 100%;
    height: var(--bar-height, 0%);
    background: linear-gradient(to bottom, var(--element-color-light, rgba(255,255,255,0.8)), var(--element-color-dark, rgba(200,200,200,0.9)));
    border-radius: 4px 4px 0 0;
    transition: height 1s cubic-bezier(0.23, 1, 0.32, 1);
    animation: barRise 1s ease-out forwards;
}

.element-explanation {
    margin-top: 10px;
    color: #e0e0e0;
    line-height: 1.4;
}

.element-relationship {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #bbbbbb;
    border-top: 1px dashed #444;
    padding-top: 6px;
}

/* 各项运势类别 */
.result-categories {
    margin-bottom: 2rem;
}

.result-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #2c2c2c;
    transition: transform 0.3s ease;
}

.result-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.category-name {
    font-weight: bold;
    font-size: 1.2rem;
    color: #bb86fc;
}

.category-stars {
    color: #ffd700;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.category-description {
    margin-bottom: 0.75rem;
    color: #e0e0e0;
    line-height: 1.5;
}

.category-suggestion {
    color: #9e9e9e;
    font-size: 0.95rem;
    line-height: 1.5;
    border-left: 3px solid #03dac6;
    padding-left: 10px;
}

/* 幸运信息 */
.result-lucky {
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #2a2a2a;
    display: flex;
    justify-content: space-around;
}

.result-lucky div {
    font-size: 1.1rem;
    color: #e0e0e0;
}

.result-lucky strong {
    color: #bb86fc;
    margin-right: 5px;
}

/* 按钮区域 */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background-color: #333333;
    color: #e0e0e0;
    border: 1px solid #444;
}

.btn-secondary:hover {
    background-color: #444444;
}

.btn-primary {
    background-color: #bb86fc;
    color: #121212;
    border: none;
}

.btn-primary:hover {
    background-color: #e9c2ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(187, 134, 252, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-overview {
        flex-direction: column;
        align-items: center;
    }
    
    .result-score {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .result-lucky {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .element-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .element-name {
        width: 100%;
        text-align: left;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
}

/* 打印时的样式 */
@media print {
    body * {
        visibility: hidden;
    }
    
    #fortuneResult, #fortuneResult * {
        visibility: visible;
    }
    
    #fortuneResult {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        padding: 1rem;
        background-color: white;
        color: black;
    }
    
    .result-actions {
        display: none;
    }
    
    .element-bar {
        background: #aaa !important;
        color: #000 !important;
    }
    
    .element-bar.strongest {
        background: #666 !important;
    }
}

/* 运势结果样式 */
.fortune-result {
    margin-top: 40px;
    background-color: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.fortune-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #bb86fc, #03dac6);
}

.result-header {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
}

.result-date {
    font-size: 0.9rem;
    color: #bb86fc;
    margin-bottom: 10px;
}

.result-name {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: #e0e0e0;
}

.result-overall {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 20px;
}

.result-score {
    font-size: 3rem;
    font-weight: bold;
    color: #bb86fc;
    margin-bottom: 5px;
}

.result-status {
    font-size: 1.2rem;
    font-weight: 500;
    color: #03dac6;
    margin-bottom: 10px;
}

.result-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: #e0e0e0;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 25px;
    padding: 0 10px;
}

/* 生命灵数样式 */
.result-lifenumber {
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    border-left: 4px solid #bb86fc;
}

.result-lifenumber h4 {
    color: #bb86fc;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.result-lifenumber p {
    color: #e0e0e0;
    line-height: 1.6;
}

/* 五行属性分析样式 */
.result-elements {
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 15px;
}

.result-elements h4 {
    color: #03dac6;
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.element-chart {
    display: flex;
    height: 120px;
    margin-bottom: 6px;
    align-items: flex-end;
    justify-content: space-around;
}

.element-bar {
    width: 18%;
    position: relative;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.element-bar:hover {
    transform: translateY(-5px);
}

.element-value {
    height: 0;
    border-radius: 4px 4px 0 0;
    transition: height 1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 金属性 */
.element-bar[data-element="metal"] .element-value {
    background: linear-gradient(to top, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.8));
}

.element-bar[data-element="metal"] .element-score {
    color: #b8860b;
}

.element-bar[data-element="metal"] .element-name {
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* 木属性 */
.element-bar[data-element="wood"] .element-value {
    background: linear-gradient(to top, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.8));
}

.element-bar[data-element="wood"] .element-score {
    color: #2e7d32;
}

.element-bar[data-element="wood"] .element-name {
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

/* 水属性 */
.element-bar[data-element="water"] .element-value {
    background: linear-gradient(to top, rgba(3, 169, 244, 0.2), rgba(3, 169, 244, 0.8));
}

.element-bar[data-element="water"] .element-score {
    color: #0277bd;
}

.element-bar[data-element="water"] .element-name {
    text-shadow: 0 0 5px rgba(3, 169, 244, 0.5);
}

/* 火属性 */
.element-bar[data-element="fire"] .element-value {
    background: linear-gradient(to top, rgba(244, 67, 54, 0.2), rgba(244, 67, 54, 0.8));
}

.element-bar[data-element="fire"] .element-score {
    color: #c62828;
}

.element-bar[data-element="fire"] .element-name {
    text-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}

/* 土属性 */
.element-bar[data-element="earth"] .element-value {
    background: linear-gradient(to top, rgba(121, 85, 72, 0.2), rgba(121, 85, 72, 0.8));
}

.element-bar[data-element="earth"] .element-score {
    color: #5d4037;
}

.element-bar[data-element="earth"] .element-name {
    text-shadow: 0 0 5px rgba(121, 85, 72, 0.5);
}

.element-emoji {
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    width: 60px;
    margin: 0 auto 3px;
    position: relative;
    border-radius: 50%;
}

.element-score {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

.element-text {
    margin-top: 20px;
    font-size: 0.9rem;
    text-align: center;
}

/* 运势分类样式 */
.result-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-category {
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e0e0e0;
}

.category-stars {
    color: #bb86fc;
    letter-spacing: 2px;
}

.category-description {
    color: #bbbbbb;
    margin-bottom: 10px;
    line-height: 1.5;
}

.category-suggestion {
    color: #03dac6;
    font-size: 0.95rem;
    line-height: 1.5;
}

.result-lucky {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    color: #e0e0e0;
}

.result-lucky div {
    margin: 5px 10px;
}

.result-lucky strong {
    color: #bb86fc;
}

.result-actions {
    text-align: center;
    margin-top: 20px;
}

.result-actions button {
    margin: 0 5px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-categories {
        grid-template-columns: 1fr;
    }
    
    .fortune-result {
        padding: 15px;
    }
}

/* 五行属性类别图标 */
.category-icons {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.element-icon {
    font-size: 1.8rem;
    margin: 0 10px;
    position: relative;
}

.element-icon-metal {
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.element-icon-wood {
    color: #4CAF50;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.element-icon-water {
    color: #03A9F4;
    text-shadow: 0 0 5px rgba(3, 169, 244, 0.5);
}

.element-icon-fire {
    color: #F44336;
    text-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}

.element-icon-earth {
    color: #795548;
    text-shadow: 0 0 5px rgba(121, 85, 72, 0.5);
}

/* 修改各属性图标的背景色 */
.element-bar[data-element="metal"] .element-emoji {
    background-color: rgba(255, 215, 0, 0.25);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.element-bar[data-element="wood"] .element-emoji {
    background-color: rgba(76, 175, 80, 0.25);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.element-bar[data-element="water"] .element-emoji {
    background-color: rgba(3, 169, 244, 0.25);
    box-shadow: 0 0 15px rgba(3, 169, 244, 0.5);
}

.element-bar[data-element="fire"] .element-emoji {
    background-color: rgba(244, 67, 54, 0.25);
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.5);
}

.element-bar[data-element="earth"] .element-emoji {
    background-color: rgba(121, 85, 72, 0.25);
    box-shadow: 0 0 15px rgba(121, 85, 72, 0.5);
}

.element-emoji {
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    width: 60px;
    margin: 0 auto 3px;
    position: relative;
    border-radius: 50%;
}

.element-text {
    margin-top: 20px;
    font-size: 0.9rem;
    text-align: center;
}

/* 修改星标样式 */
.strongest-element .element-emoji::after {
    content: '★';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: #bb86fc;
    text-shadow: 0 0 8px rgba(187, 134, 252, 0.5);
}

/* 防止土元素显示星标 */
.element-bar[data-element="earth"].strongest-element .element-emoji::after {
    content: none;
}

/* 元素图标悬浮效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.element-bar:hover .element-emoji {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

[data-element="metal"] {
    --element-color-light: rgba(255, 215, 0, 0.9);
    --element-color-dark: rgba(218, 165, 32, 0.9);
}

[data-element="wood"] {
    --element-color-light: rgba(76, 175, 80, 0.9);
    --element-color-dark: rgba(56, 142, 60, 0.9);
}

[data-element="water"] {
    --element-color-light: rgba(3, 169, 244, 0.9);
    --element-color-dark: rgba(2, 119, 189, 0.9);
}

[data-element="fire"] {
    --element-color-light: rgba(244, 67, 54, 0.9);
    --element-color-dark: rgba(198, 40, 40, 0.9);
}

[data-element="earth"] {
    --element-color-light: rgba(121, 85, 72, 0.9);
    --element-color-dark: rgba(93, 64, 55, 0.9);
}

.strongest-element .element-value {
    box-shadow: 0 0 15px var(--element-color-light);
}

[data-element="metal"] .element-emoji {
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

[data-element="wood"] .element-emoji {
    color: #4caf50;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

[data-element="water"] .element-emoji {
    color: #03a9f4;
    text-shadow: 0 0 5px rgba(3, 169, 244, 0.5);
}

[data-element="fire"] .element-emoji {
    color: #f44336;
    text-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}

[data-element="earth"] .element-emoji {
    color: #795548;
    text-shadow: 0 0 5px rgba(121, 85, 72, 0.5);
}

/* 最强元素脉冲效果 */
.strongest-element .element-emoji {
    animation: pulse 2s infinite;
    box-shadow: 0 0 15px var(--element-color-light);
}

/* 防止土元素跳动 */
.element-bar[data-element="earth"].strongest-element .element-emoji {
    animation: none;
    box-shadow: 0 0 15px rgba(121, 85, 72, 0.5);
} 