.ad-banner {
    width: 100%;
    max-width: 1240px;
    height: auto;
    padding-top: 70px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 8px;
}

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

.ad-banner a {
    display: block;
    width: 100%;
    height: 100%;
}

.ad-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media screen and (max-width: 768px) {
    .ad-banner {
        margin: 20px auto;
    }
}

.stock-index-container {
    max-width: 1240px;
    margin: 0 auto 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
}

.stock-index-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
    flex: 1;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin: 0 5px;
    border-right: none;
    transition: background-color 0.3s ease;
}

.stock-index-item:last-child {
    border-right: none;
}

.stock-index-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stock-index-name-change {
    display: flex;
    justify-content: center;
    align-items: center;
}

.stock-index-name {
    margin-right: 5px;
}

.stock-index-change {
    font-size: 14px;
}

.stock-up {
    color: #f00;
}

.stock-down {
    color: #0c0;
}

.stock-up-bg {
    background: linear-gradient(to bottom, #fee, #fdd);
}

.stock-down-bg {
    background: linear-gradient(to bottom, #efe, #dfd);
}
.market-selector {
    margin-bottom: 15px;
}
a:link {
    color: #0669ff;
}
a:visited {
    color: #0669ff;
}
.market-selector a {
    display: inline-block;
    padding: 5px 15px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
}
.market-selector a.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}
.mkt table {
    width: 100%;
    border-collapse: collapse;
}
.mkt th, .mkt td {
    padding: 8px;
    text-align: right;
    border: 1px solid #ddd;
}
.mkt th {
    background: #f5f5f5;
}
.mkt td.green {
    color: #0c0;
}
.mkt td.red {
    color: #f00;
}
.mkt tr:hover {
    background: #f9f9f9;
}
.mkt td:nth-child(2),
.mkt td:nth-child(3) {
    text-align: left;
}
.error-message {
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    background-color: #f8d7da;
}
.no-data {
    text-align: center !important;
    padding: 20px !important;
    color: #666;
}
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sortable div span {
    margin-right: 5px;
}

.sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    vertical-align: middle;
    content: "";
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
    border-top: 6px solid #ccc;
}

.sortable.asc .sort-icon {
    border-bottom: 6px solid #333;
    border-top: none;
}

.sortable.desc .sort-icon {
    border-top: 6px solid #333;
    border-bottom: none;
}

.sortable:hover .sort-icon {
    opacity: 0.7;
}

.search-container {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-container button {
    padding: 8px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-container button:hover {
    background: #0056b3;
}
/* 排名列居中对齐 */
.mkt td:first-child,
.mkt th:first-child {
    text-align: center;
}

/* 加载动画容器 */
.loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 200px;
    padding: 20px;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 加载文字 */
.loading-text {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.loading-text::after {
    content: '...';
    display: inline-block;
    vertical-align: bottom;
    animation: ellipsis 1.5s infinite;
    margin-left: 2px;
    letter-spacing: 2px;
}

/* 加载动画关键帧 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 省略号动画 */
@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
    100% { content: '.'; }
}

/* 淡入淡出效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 表格加载状态 */
td .loading-container {
    min-height: 150px;
    margin: 0;
    padding: 20px 0;
}