/* 全局样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.navbar-brand {
    font-weight: 600;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

/* 英雄区域样式 */
.hero-section {
    background-color: var(--light-color);
}

.hero-section h1 {
    color: var(--dark-color);
}

/* 特色内容区样式 */
.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 卡片样式 */
.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    border-bottom: none;
}

/* 列表样式 */
.list-group-item {
    border: none;
    padding: 1rem;
}

.list-group-item:hover {
    background-color: var(--light-color);
}

/* 首页指标公式和炒股知识列表项更紧凑的样式 */
.home-item {
    padding: 0.6rem 1rem;  /* 减少上下padding使项目更紧凑 */
}

.home-item h6 {
    margin-bottom: 0.3rem;  /* 减少标题下方间距 */
    font-size: inherit;  /* 恢复标题字体大小 */
}

.home-item p.mb-1 {
    margin-bottom: 0.3rem !important;  /* 减少描述下方间距 */
    line-height: 1.4;  /* 减少行高使文本更紧凑 */
    font-size: inherit;  /* 恢复描述文字大小 */
}

.home-item .d-flex.align-items-center {
    margin-top: initial;  /* 恢复默认间距 */
}

.home-item small, .home-item .badge {
    font-size: initial;  /* 恢复默认字体大小 */
}

/* 移除公式分类项目悬停透明效果 */
.list-group-item-action:hover {
    opacity: 1 !important;
    background-color: rgba(var(--bs-tertiary-bg-rgb), 1) !important;
    color: var(--bs-list-group-color) !important;
}

/* 针对公式页面的列表项特定样式 */
.list-group-flush .list-group-item-action:hover {
    opacity: 1 !important;
    color: inherit !important;
    background-color: #ffffff !important;  /* 使用纯白色背景 */
}

/* 公式详情页面列表项样式 */
a.list-group-item-action:hover {
    opacity: 1 !important;
    background-color: rgba(248, 249, 250, 0.5) !important;
    color: #212529 !important;
    text-decoration: none !important;
}

/* 保持活动项目的样式一致 */
.list-group-item-action.active:hover {
    opacity: 1 !important;
    color: #fff !important;
    background-color: var(--primary-color) !important;
}

/* 按钮样式 */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* 页脚样式 */
.footer {
    background-color: var(--light-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer a:hover {
    color: var(--primary-color);
}

/* 评论区样式 */
.comments-section {
    margin-top: 2rem;
}

.comment {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.comment:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
}

.user-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
}

.username {
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;
    margin-right: 10px;
}

.date {
    font-size: 12px;
    color: #95a5a6;
}

.comment-content {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
    margin: 5px 0 18px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #34495e;
    position: relative;
    border-left: 3px solid rgba(13, 110, 253, 0.3);
    text-align: left;
}

.comment-content:after {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background-color: #f8f9fa;
    transform: rotate(45deg);
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.replies {
    margin-top: 15px;
    padding-left: 25px;
    position: relative;
}

.replies:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, rgba(13, 110, 253, 0.2), rgba(13, 110, 253, 0.05));
    border-radius: 1px;
}

.reply {
    padding: 16px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 12px;
    transition: all 0.25s ease;
    position: relative;
    border-top: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.reply-header .user-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
}

.reply-content {
    padding: 12px 0;
    color: #34495e;
    text-align: left;
}

.no-comments {
    text-align: center;
    padding: 30px;
    color: #95a5a6;
}

.no-comments i {
    font-size: 32px;
    margin-bottom: 10px;
}

.highlight-comment {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0% { background-color: rgba(255, 243, 205, 0.2); }
    50% { background-color: rgba(255, 243, 205, 0.5); }
    100% { background-color: transparent; }
}

.delete-btn {
    color: var(--danger-color);
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
}

.delete-btn:hover {
    color: #b91d2b;
    text-decoration: underline;
}

.reply-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 5px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section .btn-group {
        justify-content: center;
    }
    
    .feature-icon {
        margin: 0 auto 1rem;
    }
    
    .card-body {
        text-align: center;
    }
    
    .comment-header {
        flex-wrap: wrap;
    }
    
    .replies {
        padding-left: 15px;
    }
    
    /* 移动端登录页面优化 */
    .top-banner {
        font-size: 0.85rem;
    }
    
    .top-banner .container {
        padding: 0 10px;
    }
    
    .top-banner .d-flex {
        flex-direction: column;
        align-items: center !important;
    }
    
    .top-banner div:first-child {
        margin-bottom: 5px;
    }
    
    /* 移动端登录表单优化 */
    .card.shadow-lg {
        margin: 0 10px;
    }
    
    .col-md-6 {
        padding: 0 5px;
    }
    
    .container.mt-5 {
        margin-top: 2rem !important;
    }
    
    /* 移动端底部导航优化 */
    .footer {
        text-align: center;
    }
    
    .footer .col-md-3 {
        margin-bottom: 1.5rem;
    }
    
    .footer h5 {
        margin-bottom: 0.75rem;
    }
    
    .footer ul {
        margin-bottom: 0.5rem;
    }
    
    .footer ul li {
        margin-bottom: 0.4rem;
    }
}

/* 移动友好表单样式 */
.mobile-friendly-form input {
    height: 45px;
    font-size: 16px !important; /* 防止iOS缩放 */
}

.mobile-friendly-form .btn-lg {
    height: 48px;
    font-size: 16px;
}

/* 超小屏幕设备优化 */
@media (max-width: 576px) {
    .card-header {
        padding: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.4rem 0.75rem;
    }
    
    /* 移动端登录表单进一步优化 */
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    form input {
        font-size: 0.95rem !important;
    }
    
    .form-label {
        margin-bottom: 0.25rem;
    }
} 