/* 诸葛神算自定义样式 */

/* 全局样式 */
:root {
    --primary-color: #8B4513;
    --secondary-color: #D2B48C;
    --accent-color: #CD853F;
    --dark-color: #3E2723;
    --light-color: #F5F5DC;
    --bg-color: #F9F6F0;
    --border-radius: 0.75rem;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition-base: all 0.3s ease;
}

/* 字体 */
body {
    font-family: 'SimHei', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 500; /* 增加字体粗细，使黑体更明显 */
}

/* 全局黑体字体设置 */
* {
    font-family: 'SimHei', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif !important;
}

/* 标题字体加粗 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    font-family: 'SimHei', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif !important;
}

/* 按钮字体 */
button, .btn-primary, .btn-secondary, a[class*="bg-primary"] {
    font-family: 'SimHei', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif !important;
    font-weight: 600 !important;
}

/* 强制所有按钮使用黑体 */
#divine-button, a[href="#divination"] {
    font-family: 'SimHei', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif !important;
    font-weight: 600 !important;
}

/* 导航栏 */
#navbar {
    transition: var(--transition-base);
    z-index: 1000;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

/* 链接样式 */
a {
    transition: var(--transition-base);
}

a:hover {
    text-decoration: none;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: #7A3C11;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition-base);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* 装饰元素 */
.divider {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 2rem auto;
    width: 6rem;
}

/* 卦象显示 */
.hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* 动画效果 */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 69, 19, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(139, 69, 19, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 69, 19, 0);
    }
}

/* Logo专用动画效果 */
@keyframes logoRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoRotateSlow {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(90deg) scale(1.02);
    }
    50% {
        transform: rotate(180deg) scale(1);
    }
    75% {
        transform: rotate(270deg) scale(1.02);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(139, 69, 19, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(139, 69, 19, 0.6));
    }
    100% {
        filter: drop-shadow(0 0 5px rgba(139, 69, 19, 0.3));
    }
}

@keyframes logoFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-5px) rotate(120deg);
    }
    66% {
        transform: translateY(2px) rotate(240deg);
    }
    100% {
        transform: translateY(0px) rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Logo动画类 - 自动持续转动 */
.logo-rotate {
    animation: logoRotate 6s linear infinite;
}

.logo-rotate-slow {
    animation: logoRotateSlow 12s ease-in-out infinite;
}

.logo-glow {
    animation: logoGlow 3s ease-in-out infinite;
}

.logo-float {
    animation: logoFloat 15s ease-in-out infinite;
}

.shake-on-hover:hover {
    animation: shake 0.5s ease-in-out;
}

.logo-interactive {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* 自动转动的logo在悬停时增强效果 */
.logo-interactive:hover {
    animation-duration: 2s; /* 悬停时加速转动 */
    filter: drop-shadow(0 0 15px rgba(139, 69, 19, 0.7));
    transform: scale(1.05);
}

.logo-interactive:active {
    animation-duration: 1s; /* 点击时更快转动 */
    transform: scale(0.98);
}

/* 滚动显示动画 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 加载动画 */
.loader {
    border: 4px solid rgba(139, 69, 19, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* 历史记录项 */
.history-item {
    transition: var(--transition-base);
    border-left: 3px solid transparent;
}

.history-item:hover {
    border-left: 3px solid var(--primary-color);
    background-color: rgba(210, 180, 140, 0.1);
}

/* 卦象解释文本样式 */
.hexagram-content {
    white-space: pre-line;
    line-height: 1.8;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
}

footer a {
    color: var(--secondary-color);
}

footer a:hover {
    color: white;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 打印样式 */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .divider {
        border-top: 1px solid #ccc;
    }
}

/* 新版页面重构样式 */
.oracle-tool-shell {
    position: relative;
    background:
        radial-gradient(circle at top right, rgba(205, 133, 63, 0.14), transparent 28%),
        radial-gradient(circle at top left, rgba(139, 69, 19, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(245, 245, 220, 0.86) 0%, rgba(255, 255, 255, 0.98) 24%, #ffffff 100%);
}

.oracle-page-body {
    position: relative;
}

.oracle-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(139, 69, 19, 0.09);
    color: var(--primary-color);
    font-size: 0.74rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.oracle-topbar {
    box-shadow: 0 18px 42px rgba(62, 39, 35, 0.12);
}

.oracle-nav-link,
.oracle-mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary-color);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    transition: var(--transition-base);
}

.oracle-nav-link:hover,
.oracle-mobile-link:hover {
    background: rgba(139, 69, 19, 0.09);
    color: var(--accent-color);
}

.oracle-mobile-link {
    justify-content: flex-start;
    padding-left: 0.25rem;
}

.oracle-hero-card,
.oracle-side-card,
.oracle-feature-card,
.oracle-summary-panel,
.oracle-history-panel,
.oracle-info-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(210, 180, 140, 0.24);
    box-shadow: 0 22px 48px rgba(62, 39, 35, 0.08);
}

.oracle-hero-card {
    padding: clamp(1.6rem, 3vw, 2.6rem);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 245, 220, 0.88));
}

.oracle-hero-card::after,
.oracle-side-card::after,
.oracle-action-panel::after,
.oracle-result-panel::after,
.oracle-history-panel::after,
.oracle-info-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 40%);
    pointer-events: none;
}

.oracle-side-card {
    padding: 1.6rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 250, 245, 0.98), rgba(255, 255, 255, 0.92));
}

.oracle-side-label {
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.oracle-side-list {
    display: grid;
    gap: 0.8rem;
}

.oracle-side-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(139, 69, 19, 0.06);
    color: rgba(62, 39, 35, 0.82);
    font-size: 0.92rem;
    line-height: 1.7;
}

.oracle-side-list-item i {
    margin-top: 0.18rem;
    color: var(--accent-color);
}

.oracle-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.oracle-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 180, 140, 0.22);
}

.oracle-stat-value {
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    font-weight: 800;
    color: var(--primary-color);
}

.oracle-stat-label {
    font-size: 0.85rem;
    color: rgba(62, 39, 35, 0.7);
}

.oracle-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.oracle-feature-card {
    border-radius: 24px;
    padding: 1.4rem;
    background: rgba(255, 255, 255, 0.92);
}

.oracle-feature-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.12), rgba(205, 133, 63, 0.2));
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.oracle-feature-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.oracle-feature-card p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.75;
    color: rgba(62, 39, 35, 0.75);
}

.oracle-origin-highlight,
.oracle-origin-story {
    border-radius: 30px;
    padding: clamp(1.4rem, 2.5vw, 2rem);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(210, 180, 140, 0.24);
    box-shadow: 0 22px 48px rgba(62, 39, 35, 0.08);
}

.oracle-origin-highlight {
    background: linear-gradient(155deg, rgba(255,255,255,0.96), rgba(245,245,220,0.86));
}

.oracle-origin-story {
    position: relative;
    overflow: hidden;
}

.oracle-origin-story::after,
.oracle-origin-highlight::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 44%);
    pointer-events: none;
}

.oracle-quote-block {
    margin: 0;
    padding: 1rem 1.1rem;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 18px 18px 0;
    background: rgba(139, 69, 19, 0.06);
    color: var(--primary-color);
    font-size: 1rem;
    line-height: 1.8;
    font-style: italic;
}

.oracle-action-panel,
.oracle-result-panel,
.oracle-summary-panel,
.oracle-history-panel,
.oracle-info-card {
    border-radius: 30px;
    padding: clamp(1.4rem, 2.5vw, 2rem);
    background: rgba(255, 255, 255, 0.94);
}

.oracle-orb-wrap {
    position: relative;
    width: min(100%, 18rem);
    aspect-ratio: 1;
    margin: 2.2rem auto 0;
}

.oracle-orb-shadow {
    position: absolute;
    inset: auto 18% 0;
    height: 1.3rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(62, 39, 35, 0.24), transparent 70%);
    filter: blur(10px);
}

.oracle-orb-ring,
.oracle-orb-core {
    position: absolute;
    inset: 0;
    border-radius: 999px;
}

.oracle-orb-ring {
    border: 1px solid rgba(139, 69, 19, 0.16);
}

.oracle-orb-ring-a {
    animation: oracleSpin 16s linear infinite;
}

.oracle-orb-ring-b {
    inset: 9%;
    border-style: dashed;
    animation: oracleSpinReverse 18s linear infinite;
}

.oracle-orb-core {
    inset: 18%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.98), rgba(245,245,220,0.92) 55%, rgba(210,180,140,0.68) 100%);
    box-shadow: inset 0 0 0 1px rgba(210, 180, 140, 0.34), 0 22px 40px rgba(139, 69, 19, 0.16);
}

.oracle-orb-logo {
    width: 52%;
    height: 52%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(139, 69, 19, 0.2));
    animation: logoRotateSlow 20s linear infinite;
}

.oracle-primary-button,
.oracle-ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 3.3rem;
    border-radius: 999px;
    font-size: 0.96rem;
    font-weight: 700;
    transition: var(--transition-base);
}

.oracle-primary-button {
    width: 100%;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #8B4513, #B66A33);
    box-shadow: 0 16px 30px rgba(139, 69, 19, 0.24);
}

.oracle-primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgba(139, 69, 19, 0.28);
}

.oracle-ghost-button {
    border: 1px solid rgba(139, 69, 19, 0.18);
    padding: 0 1.25rem;
    background: rgba(245, 245, 220, 0.52);
    color: var(--primary-color);
}

.oracle-ghost-button:hover:not(:disabled) {
    background: rgba(139, 69, 19, 0.08);
}

.oracle-guide-list {
    display: grid;
    gap: 0.85rem;
}

.oracle-guide-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(139, 69, 19, 0.05);
}

.oracle-guide-item span,
.oracle-step-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    background: rgba(139, 69, 19, 0.14);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 800;
}

.oracle-guide-item p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.8;
    color: rgba(62, 39, 35, 0.76);
}

.oracle-result-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.oracle-result-divider {
    height: 1px;
    margin: 1.2rem 0;
    background: linear-gradient(90deg, rgba(139,69,19,0.12), rgba(139,69,19,0.4), rgba(139,69,19,0.12));
}

.oracle-result-content {
    white-space: pre-line;
    line-height: 1.9;
    font-size: 0.97rem;
    color: rgba(62, 39, 35, 0.84);
}

.oracle-result-note {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(245, 245, 220, 0.72);
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(62, 39, 35, 0.66);
}

.oracle-summary-grid,
.oracle-bullet-grid {
    display: grid;
    gap: 1rem;
}

.oracle-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oracle-bullet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oracle-bullet-card {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(139, 69, 19, 0.05);
}

.oracle-bullet-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--primary-color);
}

.oracle-bullet-card p,
.oracle-info-card p {
    color: rgba(62, 39, 35, 0.78);
    line-height: 1.85;
}

.oracle-step-list {
    display: grid;
    gap: 0.9rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.oracle-step-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(139, 69, 19, 0.05);
}

.oracle-step-list p {
    margin: 0;
}

.oracle-history-head {
    align-items: center;
}

.oracle-empty-state {
    padding: 3rem 1.2rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(245,245,220,0.58), rgba(255,255,255,0.95));
    border: 1px dashed rgba(139, 69, 19, 0.18);
}

.oracle-empty-icon {
    width: 4.25rem;
    height: 4.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(139, 69, 19, 0.08);
    color: rgba(139, 69, 19, 0.5);
    font-size: 1.5rem;
}

@keyframes oracleSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes oracleSpinReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@media (max-width: 1024px) {
    .oracle-section-head,
    .oracle-history-head,
    .oracle-result-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .oracle-summary-grid,
    .oracle-bullet-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .oracle-topbar {
        border-radius: 24px;
    }

    .oracle-hero-card,
    .oracle-side-card,
    .oracle-origin-highlight,
    .oracle-origin-story,
    .oracle-action-panel,
    .oracle-result-panel,
    .oracle-summary-panel,
    .oracle-history-panel,
    .oracle-info-card {
        border-radius: 24px;
        padding: 1.25rem;
    }

    .oracle-stat-grid {
        grid-template-columns: 1fr;
    }

    .oracle-orb-wrap {
        width: min(100%, 15rem);
    }
}

@media (max-width: 480px) {
    .oracle-eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
    }

    .oracle-primary-button,
    .oracle-ghost-button {
        width: 100%;
    }
}