:root {
    --positive-color: #198754;
    --negative-color: #dc3545;
    --bg-light: #f8f9fa;
    --primary-color: #0d6efd;
    --primary-color2: #212529;
    --primary-light: #e6f0ff;
    --success-color: #198754;
    --danger-color: #dc3545;
    --text-dark: #212529;
    --text-medium: #495057;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --background-light: #f8f9fa;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.2s;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: rgb(240, 244, 250);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    padding-top: 60px; /* 为fixed header留出空间 */
}

.market-btn {
    padding: 8px 24px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    background: transparent;
    color: var(--text-medium);
    transition: all var(--transition-speed);
    cursor: pointer;
}
  
.market-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 3px 8px rgba(13, 110, 253, 0.25);
}

.market-btn:not(.active):hover {
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.08);
}

/* -------------------------------------------------------
   MODERN HEADER
------------------------------------------------------- */
.modern-header .navbar {
    background-color: white;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.modern-header .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.modern-header .brand-text {
    background: linear-gradient(90deg, var(--primary-color), #4286f4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modern-header .navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    position: relative;
    transition: color 0.2s;
}

.modern-header .navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.modern-header .navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.modern-header .navbar-nav .nav-link:hover:after {
    width: 70%;
}

.modern-header .dropdown-menu {
    border: none;
    border-radius: 8px;
    padding: 8px 0;
}

.modern-header .dropdown-item {
    font-size: 0.9rem;
    padding: 8px 16px;
    transition: all 0.2s;
}

.modern-header .dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* -------------------------------------------------------
   SEARCH SECTION
------------------------------------------------------- */
.search-section {
    background-color: white;
    padding: 30px 0 20px;
    margin-bottom: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.modern-search-container {
    max-width: 100%;
    margin: 0 auto;
}

.modern-search-container .input-group {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.search-input {
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 30px 0 0 30px !important;
    height: 48px;
}

.search-input:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.search-btn {
    border-radius: 0 30px 30px 0 !important;
    padding: 0 20px;
    height: 48px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn {
    margin-left: 8px;
    padding: 0.4rem 1rem;
}

/* 市场选择器样式 */
.market-selector {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    border-radius: 30px;
    background-color: var(--background-light);
    padding: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    max-width: 240px;
    margin: 0 auto;
}

.content-container {
    margin: 20px auto;
    padding: 0 15px;
}

.content-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), rgba(13, 110, 253, 0.6));
    opacity: 0.8;
}

/* 添加animate fade in效果 */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.animated {
    animation: fadeIn 0.6s ease-out forwards;
}

/* 新闻容器特别样式 */
.news-section {
    margin-top: 20px;
}

/* -------------------------------------------------------
   INDUSTRY SECTION
------------------------------------------------------- */
.industry-container {
    padding: 0.75rem;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.industry-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: cardFadeIn 0.5s ease-out forwards;
    opacity: 0;
    border: 1px solid rgba(0,0,0,0.04);
}

.industry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Staggered animation for multiple cards */
.industry-card:nth-child(1) { animation-delay: 0s; }
.industry-card:nth-child(2) { animation-delay: 0.1s; }
.industry-card:nth-child(3) { animation-delay: 0.2s; }
.industry-card:nth-child(4) { animation-delay: 0.3s; }
.industry-card:nth-child(5) { animation-delay: 0.4s; }

@keyframes cardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.industry-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 1rem;
}

@media (max-width: 768px) { 
    .industry-line { 
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    } 
}

.industry-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    margin-right: 1rem;
}

.industry-name:hover {
    color: var(--primary-color);
}

.change-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-right: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-width: 110px;
}

.change-badge.positive {
    background-color: rgba(25, 135, 84, 0.08);
    color: var(--positive-color);
    border-color: rgba(25, 135, 84, 0.2);
}

.change-badge.positive:hover {
    background-color: rgba(25, 135, 84, 0.12);
}

.change-badge.negative {
    background-color: rgba(220, 53, 69, 0.08);
    color: var(--negative-color);
    border-color: rgba(220, 53, 69, 0.2);
}

.change-badge.negative:hover {
    background-color: rgba(220, 53, 69, 0.12);
}

.change-badge i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

.change-badge strong {
    margin-left: 0.3rem;
    font-weight: 700;
}

.news-list {
    margin-bottom: 1rem;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background-color 0.2s;
}

.news-item:hover {
    background-color: rgba(0,0,0,0.01);
}

.news-item:last-child {
    border-bottom: none;
}

.stock-badge {
    color: #4a5568;
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 70px;
    text-align: center;
    background-color: #f8fafc;
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.stock-badge:hover {
    background-color: #f1f5f9;
    color: #2d3748;
}

.news-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.news-title-container {
    flex: 1;
    min-width: 200px;
}

.news-badge {
    display: block;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s ease;
}

.news-badge.positive {
    background-color: rgba(25, 135, 84, 0.06);
    color: var(--positive-color);
}

.news-badge.positive:hover {
    background-color: rgba(25, 135, 84, 0.1);
}

.news-badge.negative {
    background-color: rgba(220, 53, 69, 0.06);
    color: var(--negative-color);
}

.news-badge.negative:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.news-title {
    color: #1a202c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    word-break: break-word;
}

.news-title:hover {
    color: var(--primary-color);
}

.news-date-right {
    color: #718096;
    font-size: 0.85rem;
    white-space: nowrap;
    padding-top: 0.5rem;
}

/* "查看更多"按钮优化 */
.view-more-btn {
    text-align: center;
    margin-top: 1rem;
}

.view-more-btn button {
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    background-color: white;
    border: 1px solid rgba(13, 110, 253, 0.5);
    transition: all 0.25s ease;
}

.view-more-btn button:hover {
    background-color: rgba(13, 110, 253, 0.04);
    border-color: rgba(13, 110, 253, 0.7);
    transform: translateY(-2px);
}

.view-more-btn button i {
    transition: transform 0.2s ease;
}

.view-more-btn button:hover i {
    transform: translateY(1px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .industry-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .industry-name {
        margin-bottom: 0.3rem;
    }
    
    .d-flex.gap-3 {
        display: flex;
        gap: 0.6rem !important;
        width: 100%;
        justify-content: flex-start;
    }
    
    .change-badge {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 0.4rem 0.6rem;
    }
    
    .news-content {
        flex-direction: column;
    }
    
    .news-date-right {
        align-self: flex-end;
        padding-top: 0.2rem;
    }
    
    .content-container {
        margin: 15px auto;
        padding: 0 10px;
    }
}

/* -------------------------------------------------------
   NAVIGATION IMPROVEMENTS
------------------------------------------------------- */

.dropdown-menu {
    background-color: #fff;               /* White background for clarity */
    border: none;                         /* Remove default border */
    border-radius: 8px;                   /* Soften the corners */
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);/* Subtle shadow */
    padding: 0.5rem 0;                    /* Vertical space for the items */
    min-width: 180px;                     /* Slightly wider so text doesn't wrap */
    margin-top: 8px;                      /* Gap between nav link & menu */
}
  
/* Drop-down item styling */
.dropdown-item {
    padding: 8px 16px;                    /* Comfortable click/tap area */
    border-radius: 4px;                   /* Soften hover highlight shape */
    transition: background-color 0.2s;
}
  
/* Hover effect */
.dropdown-item:hover {
    background-color: #f0f0f0;            /* Light gray hover effect */
    color: #000;                          /* Ensure good text contrast */
}
  
/* Optional: style the dropdown arrow / caret more distinctly */
.nav-link.dropdown-toggle::after {
    margin-left: 6px;
    vertical-align: 0.15em;
}