/* 3D 地球背景 */
/* 首页顶部 3D 地球横幅 */
.globe-hero {
    width: 100%;
    height: 380px;
    background: #000;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(0, 180, 255, 0.35);
}

.globe-hero iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 确保首页内容显示在地球上方 */
body {
    position: relative;
    min-height: 100vh;
    background: #000;
    color: #fff;
}

.top-header,
main,
section,
footer {
    position: relative;
    z-index: 2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: #000;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 顶部区域 */
.top-header {
    height: 86px;
    display: flex;
    align-items: center;
    padding: 8px 22px;
    border-top: 4px solid #202833;
    border-bottom: 1px solid rgba(0, 180, 255, 0.35);
    background: rgba(0, 0, 0, 0.72);
}

.logo-box {
    width: 150px;
}

.logo {
    width: 120px;
    height: 60px;
    background: linear-gradient(135deg, #ffd34e, #0066ff);
    color: #fff;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.1;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.logo span {
    font-size: 13px;
}

.logo strong {
    font-size: 16px;
}

.site-title {
    flex: 1;
}

.site-title h1 {
    font-size: 18px;
    margin: 0 0 8px;
}

.site-title p {
    margin: 0;
    font-size: 15px;
    font-weight: bold;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    border: 1px solid #bbb;
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    width: 260px;
    height: 30px;
    border: none;
    outline: none;
    padding: 0 10px;
}

.search-box button {
    width: 42px;
    border: none;
    background: #fff;
    cursor: pointer;
}

.small-btn,
.top-actions select {
    height: 30px;
    border: 1px solid #ccc;
    background: #fff;
    padding: 0 10px;
    cursor: pointer;
}

/* 大横幅 */
.hero-banner {
    position: relative;
    height: 315px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.25), transparent 30%),
        linear-gradient(90deg, #061c54, #0040a8, #101c5f 65%, #0d1f50);
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 120, 0, 0.7), transparent 25%),
        linear-gradient(300deg, rgba(255, 0, 0, 0.45), transparent 35%);
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(-10deg,
            transparent 0px,
            transparent 18px,
            rgba(255, 255, 255, 0.08) 20px);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 70px;
    color: white;
}

.big-number {
    font-size: 180px;
    font-weight: 900;
    font-style: italic;
    color: #e90000;
    text-shadow:
        4px 4px 0 #ffffff,
        8px 8px 0 rgba(0, 0, 0, 0.35);
    letter-spacing: -15px;
}

.hero-text h2 {
    font-size: 110px;
    margin: 0;
    color: white;
    text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);
}

.hero-text p {
    margin: 0;
    font-size: 42px;
    font-weight: 900;
    font-style: italic;
    color: #fff;
    background: linear-gradient(90deg, #1b1b1b, #d40000, #1b1b1b);
    padding: 5px 20px;
}

.breaking {
    position: absolute;
    right: 35px;
    top: 115px;
    background: #df0000;
    color: white;
    font-size: 30px;
    font-weight: bold;
    padding: 10px 18px;
    transform: skew(-10deg);
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.slider-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #bbb;
    border-radius: 50%;
    margin: 0 4px;
}

.slider-dots .active {
    background: #fff;
}

/* 主菜单 */
.main-tabs {
    width: 90%;
    margin: 28px auto 18px;
    display: flex;
    gap: 35px;
    align-items: center;
}

.main-tabs a {
    font-size: 16px;
    font-weight: bold;
    padding: 5px 18px;
}

.main-tabs a.active {
    background: #777;
    color: white;
}

/* 分类导航 */
.category-nav {
    width: 90%;
    margin: 0 auto 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
}

.category-nav a::after {
    content: "⌄";
    margin-left: 4px;
    color: #555;
}

/* 主体 */
.main-container {
    width: 90%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 40px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 14px;
}

.filter-row button {
    border: none;
    background: #f0f0f0;
    padding: 5px 12px;
    cursor: pointer;
}

.filter-row .filter-active {
    background: #333;
    color: white;
}

.news-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.news-item .date {
    font-size: 14px;
    color: #222;
}

.news-content h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: bold;
}

.news-content p {
    margin: 0 0 8px;
    line-height: 1.6;
    font-size: 14px;
}

.icons {
    color: #999;
    font-size: 14px;
}

/* 右侧财经日历 */
.right-panel {
    font-size: 14px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 22px;
    margin: 0;
}

.panel-header a {
    color: #8b0000;
    font-weight: bold;
}

.publish-time {
    text-align: right;
    font-weight: bold;
}

.calendar-item {
    display: grid;
    grid-template-columns: 36px 55px 1fr;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid #eee;
}

.calendar-item .flag {
    font-size: 22px;
}

.calendar-item p {
    margin: 0;
    font-size: 13px;
}

.exchange-box {
    margin-top: 24px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.exchange-box h3 {
    margin: 0 0 10px;
}

/* 手机适配 */
@media (max-width: 900px) {
    .top-header {
        height: auto;
        flex-direction: column;
        gap: 10px;
    }

    .top-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-box input {
        width: 180px;
    }

    .hero-banner {
        height: 230px;
    }

    .big-number {
        font-size: 90px;
    }

    .hero-text h2 {
        font-size: 48px;
    }

    .hero-text p {
        font-size: 22px;
    }

    .breaking {
        display: none;
    }

    .main-container {
        grid-template-columns: 1fr;
    }

    .news-item {
        grid-template-columns: 1fr;
    }
}

/* ==============================
首页新闻列表 - 紧凑版
============================== */

.home-news-section {
    max-width: 1180px;
    margin: 40px auto;
    padding: 0 24px;
}

.home-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.home-news-header h2 {
    margin: 0;
    color: #38bdf8;
    font-size: 32px;
    font-weight: 800;
}

.home-news-header a {
    color: #60a5fa;
    text-decoration: none;
    font-size: 15px;
}

.home-news-header a:hover {
    color: #93c5fd;
}

#newsMessage {
    color: #facc15;
    margin-bottom: 12px;
    font-size: 15px;
}

#newsList {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.compact-news-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: start;
    padding: 14px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.compact-news-thumb-link {
    display: block;
    width: 120px;
    text-decoration: none;
}

.compact-news-image,
.compact-news-placeholder {
    width: 120px;
    height: 90px;
    border-radius: 8px;
    display: block;
}

.compact-news-image {
    object-fit: cover;
    background: #0f172a;
}

.compact-news-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.compact-news-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.compact-news-title {
    color: #f8fafc;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 8px;
}

.compact-news-title:hover {
    color: #60a5fa;
}

.compact-news-source {
    color: #93c5fd;
    font-size: 13px;
    margin-bottom: 8px;
    word-break: break-all;
}

.compact-news-summary {
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
}

.compact-news-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.news-action-btn,
.news-action-view {
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
}

.news-action-btn {
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    cursor: pointer;
}

.news-action-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
}

.news-action-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.news-action-view {
    display: inline-flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.9);
    color: #94a3b8;
}

@media (max-width: 900px) {
    .compact-news-card {
        grid-template-columns: 1fr;
    }

    .compact-news-thumb-link {
        width: 100%;
    }

    .compact-news-image,
    .compact-news-placeholder {
        width: 100%;
        height: 200px;
    }

    .compact-news-title {
        font-size: 18px;
    }

}

@media (max-width: 600px) {
    .home-news-section {
        padding: 0 16px;
    }

    .home-news-header h2 {
        font-size: 26px;
    }

    .compact-news-image,
    .compact-news-placeholder {
        height: 180px;
    }

}

/* ==============================
   登录和注册按钮
============================== */

.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-link {
    padding: 8px 16px;
    border: 1px solid #38a9ff;
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
}

.auth-login:hover,
.auth-register {
    background: #168cff;
    color: #ffffff;
}

.auth-register:hover {
    background: #0877dc;
}


/* ==============================
   登录和注册弹窗
============================== */

.auth-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 30px 16px;
    box-sizing: border-box;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.75);
}

.auth-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.auth-modal-content {
    position: relative;
    width: 100%;
    max-width: 430px;
    margin: 40px auto;
    padding: 32px;
    box-sizing: border-box;
    border-radius: 14px;
    background: #ffffff;
    color: #222222;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.auth-modal-content h2 {
    margin: 0 0 24px;
    text-align: center;
    color: #111111;
}

.auth-close {
    position: absolute;
    top: 10px;
    right: 15px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #555555;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 7px;
    color: #333333;
    font-size: 14px;
}

.auth-form-group input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    box-sizing: border-box;
    border: 1px solid #cccccc;
    border-radius: 7px;
    background: #ffffff;
    color: #222222;
    font-size: 15px;
    outline: none;
}

.auth-form-group input:focus {
    border-color: #168cff;
}

.auth-submit-btn {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 7px;
    background: #168cff;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.auth-submit-btn:hover {
    background: #0877dc;
}

.auth-message {
    min-height: 20px;
    margin: 14px 0 0;
    text-align: center;
    color: #d32f2f;
    font-size: 14px;
}

.auth-switch-text {
    margin: 20px 0 0;
    text-align: center;
    color: #666666;
    font-size: 14px;
}

.auth-switch-text button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #168cff;
    cursor: pointer;
}

/* ==============================
我的页面 - 收藏新闻美化版
============================== */

.my-section {
    width: 100%;
    margin-top: 28px;
    padding: 24px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.my-section h2 {
    margin: 0 0 14px;
    color: #38bdf8;
    font-size: 26px;
    font-weight: 800;
}

.my-favorites-message {
    margin: 0 0 18px;
    color: #facc15;
    font-size: 15px;
    font-weight: 600;
}

.my-favorites-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.my-favorite-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.my-favorite-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.75);
    background: rgba(30, 41, 59, 0.92);
}

.my-favorite-main {
    min-width: 0;
    flex: 1;
}

.my-favorite-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.16);
    color: #facc15;
    font-size: 12px;
    font-weight: 800;
}

.my-favorite-title {
    display: block;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
    text-decoration: none;
}

.my-favorite-title:hover {
    color: #60a5fa;
}

.my-favorite-time {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 13px;
}

.my-favorite-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.my-favorite-open,
.my-favorite-remove {
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.my-favorite-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
}

.my-favorite-open:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.my-favorite-remove {
    border: 1px solid rgba(248, 113, 113, 0.45);
    background: transparent;
    color: #fca5a5;
}

.my-favorite-remove:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: #f87171;
    color: #fecaca;
}

@media (max-width: 700px) {
    .my-section {
        padding: 18px;
    }

    .my-favorite-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .my-favorite-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .my-favorite-open,
    .my-favorite-remove {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

}

/* ==============================
新闻详情页 - 评论区
============================== */

.comments-section {
    max-width: 1180px;
    margin: 28px auto 50px;
    padding: 24px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.comments-header h2 {
    margin: 0;
    color: #38bdf8;
    font-size: 26px;
    font-weight: 800;
}

.comments-header span {
    color: #cbd5e1;
    font-size: 14px;
}

.comments-header strong {
    color: #facc15;
}

.comment-form {
    padding: 16px;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
}

.comment-input {
    width: 100%;
    min-height: 110px;
    padding: 14px;
    resize: vertical;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    outline: none;
    background: rgba(2, 6, 23, 0.9);
    color: #f8fafc;
    font-size: 15px;
    line-height: 1.6;
}

.comment-input:focus {
    border-color: #38bdf8;
}

.comment-input::placeholder {
    color: #64748b;
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.comment-message {
    margin: 0;
    color: #facc15;
    font-size: 14px;
}

.comment-submit-btn {
    min-height: 38px;
    padding: 8px 18px;
    border: 0;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.comment-submit-btn:hover {
    background: #1d4ed8;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.comment-item {
    padding: 16px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.comment-author {
    color: #f8fafc;
    font-size: 15px;
    font-weight: 800;
}

.comment-time {
    color: #94a3b8;
    font-size: 13px;
}

.comment-content {
    margin: 0;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
}

@media (max-width: 700px) {
    .comments-section {
        margin: 22px 16px 40px;
        padding: 18px;
    }

    .comments-header,
    .comment-form-footer,
    .comment-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .comment-submit-btn {
        width: 100%;
    }

}