:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6c757d;
    --accent-color: #17a2b8;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --dark-text: #2c3e50;
    --light-text: #f8f9fa;
}

body {
    background-color: #f5f7fa;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* ===== 导航栏样式 ===== */
.navbar {
    min-height: 80px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.navbar .container {
    height: 100%;
}

.navbar-brand {
    height: 100%;
    padding: 0;
}

.navbar-brand h2 {
    background: linear-gradient(135deg, var(--dark-text), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo {
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 导航链接样式 */
.nav-link {
    position: relative;
    padding: 12px 16px !important;
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--dark-text) !important;
}

.nav-link:hover {
    background-color: rgba(74, 111, 165, 0.1);
    transform: translateY(-2px);
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(74, 111, 165, 0.15);
}


/* 导航菜单靠左 */
.navbar-nav {
    margin-left: 0;
}



/* 移动端调整 */
@media (max-width: 992px) {
    .navbar-nav {
        margin-left: 0;
        margin-top: 10px;
    }
}


/* 下拉菜单样式 */
.dropdown-menu {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 8px;
}

.dropdown-item {
    border-radius: 6px;
    margin: 2px 8px;
    width: calc(100% - 16px);
    padding: 0.5rem 1rem !important;
}

.dropdown-item:hover {
    background-color: rgba(74, 111, 165, 0.1);
    color: var(--primary-color) !important;
}

/* ===== 卡片样式 ===== */
.divine-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
    transition: transform 0.3s ease;
    padding: 1.5rem;
}

.divine-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* ===== 按钮样式 ===== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 24px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #3a5a8c;
    border-color: #3a5a8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 111, 165, 0.2);
}

.btn-ai {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 500;
}

.btn-ai:hover {
    background-color: #138496;
    border-color: #138496;
    color: white;
}

/* ===== 结果容器样式 ===== */
.result-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
    /*border-left: 4px solid var(--primary-color);*/
}

.ai-result {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border: 1px dashed var(--accent-color);
    animation: fadeIn 0.5s ease;
}

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

/* ===== 表单样式 ===== */
.form-control {
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(74, 111, 165, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

/* ===== 页脚样式 ===== */
footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 2rem 0;
}

footer h5 {
    color: var(--dark-text);
    font-weight: 600;
    margin-bottom: 1rem;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===== 响应式设计 ===== */
@media (max-width: 992px) {
    .navbar {
        min-height: 70px;
    }
    
    .nav-link {
        padding: 10px 12px !important;
        font-size: 1rem;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .navbar-brand .brand-text {
        display: none;
    }
    
    .navbar-brand .logo {
        margin-right: 0;
    }
    
    .divine-card {
        padding: 1rem;
    }
    
    .result-container {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    h1.display-4 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .btn-primary, .btn-ai {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ===== 工具类 ===== */
.text-primary-color {
    color: var(--primary-color) !important;
}

.bg-light-custom {
    background-color: var(--light-bg);
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* ===== 动画效果 ===== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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


/* 加收藏 */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.favorite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.favorite-btn:active {
    transform: translateY(0);
}

.favorite-btn i {
    animation: starGlow 2s infinite alternate;
}

@keyframes starGlow {
    0% {
        transform: scale(1);
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    100% {
        transform: scale(1.2);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
}


/* ===== 主内容外框样式 ===== */
.content-wrapper {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;

    min-height: 840px; /* 添加最小高度 */
    margin-top: 0.5rem; /* 减少顶部间距 */
}

/* 悬停效果 */
.content-wrapper:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* 首页特殊外框（如果需要） */
.index-page .content-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    border-left: 4px solid var(--primary-color);
}

/* 占卜页面外框 */
.divine-page .content-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #edf2f7 100%);
}

/* 页面特定外框样式 */
.privacy-page .content-wrapper,
.contact-page .content-wrapper {
    background: white;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 10px;
    }
}

@media (max-width: 576px) {
    .content-wrapper {
        padding: 1rem;
        border-radius: 8px;
    }
}


/* 调整主内容区域容器 */
.container.py-4 {
    padding-top: 1rem !important; /* 将原来的 1.5rem 减少到 1rem */
}

/* 移动端调整 */
@media (max-width: 768px) {
    .content-wrapper {
        min-height: 400px;
        margin-top: 0.25rem;
    }
    
    .container.py-4 {
        padding-top: 0.5rem !important;
    }
}


 /* Markdown内容样式 */
        .markdown-body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
            font-size: 16px;
            line-height: 1.6;
            word-wrap: break-word;
        }
        
        .markdown-body h1,
        .markdown-body h2,
        .markdown-body h3 {
            margin-top: 1.5em;
            margin-bottom: 0.5em;
            font-weight: 600;
            border-bottom: 1px solid #eaecef;
            padding-bottom: 0.3em;
        }
        
        .markdown-body h1 { font-size: 1.8em; }
        .markdown-body h2 { font-size: 1.5em; }
        .markdown-body h3 { font-size: 1.25em; }
        
        .markdown-body p {
            margin-top: 0;
            margin-bottom: 1em;
        }
        
        .markdown-body blockquote {
            padding: 0 1em;
            color: #6a737d;
            border-left: 0.25em solid #dfe2e5;
            margin: 0 0 1em 0;
        }
        
        .markdown-body ul,
        .markdown-body ol {
            padding-left: 2em;
            margin-bottom: 1em;
        }
        
        .markdown-body li {
            margin-bottom: 0.25em;
        }
        
        .markdown-body code {
            padding: 0.2em 0.4em;
            margin: 0;
            font-size: 85%;
            background-color: rgba(27,31,35,0.05);
            border-radius: 3px;
            font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
        }
        
        .markdown-body pre {
            padding: 16px;
            overflow: auto;
            font-size: 85%;
            line-height: 1.45;
            background-color: #f6f8fa;
            border-radius: 3px;
            margin-bottom: 1em;
        }
        
        .markdown-body pre code {
            background-color: transparent;
            padding: 0;
            border-radius: 0;
        }
        
        .markdown-body strong {
            font-weight: 600;
        }
        
        .markdown-body em {
            font-style: italic;
        }
        
        .markdown-body del {
            text-decoration: line-through;
        }
        
        /* 加载动画样式 */
        .spinner-border {
            animation-duration: 0.75s;
        }
        
        .progress-bar-animated {
            animation: progress-bar-stripes 1s linear infinite;
        }
        
        /* 按钮样式 */
        #show-ai-result-btn {
            transition: all 0.3s ease;
        }
        
        #show-ai-result-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

