/* NASA 每日一图 —— 宇宙深空主题 */
.na-hero {
    position: relative;
    padding: 28px 24px 22px;
    border-radius: 18px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #0b1026 0%, #1a1f4b 35%, #2b1f5e 70%, #0f0d2e 100%);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(10, 15, 60, 0.45), inset 0 0 60px rgba(99, 102, 241, 0.08);
}

/* 星空背景层 */
.na-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 12% 20%, #ffffff 50%, transparent 50%),
        radial-gradient(1px 1px at 32% 78%, #e0e7ff 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 58% 14%, #fef3c7 50%, transparent 50%),
        radial-gradient(1px 1px at 76% 52%, #ffffff 50%, transparent 50%),
        radial-gradient(1px 1px at 88% 86%, #c7d2fe 50%, transparent 50%),
        radial-gradient(1px 1px at 22% 46%, #ffffff 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 64% 92%, #fde68a 50%, transparent 50%),
        radial-gradient(1px 1px at 44% 34%, #ffffff 50%, transparent 50%);
    opacity: 0.75;
    animation: naStarTwinkle 4s ease-in-out infinite alternate;
}

@keyframes naStarTwinkle {
    0% { opacity: 0.55; }
    100% { opacity: 0.9; }
}

.na-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 品牌标题 */
.na-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.na-logo {
    font-size: 36px;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.na-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

.na-sub {
    font-size: 13px;
    color: rgba(203, 213, 225, 0.75);
    margin-top: 2px;
    letter-spacing: 0.3px;
}

/* 工具栏 */
.na-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.na-nav-buttons,
.na-action-buttons {
    display: flex;
    gap: 8px;
}

.na-date-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.na-date-label {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.85);
    font-weight: 500;
}

.na-date-input {
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.na-date-input:hover {
    border-color: rgba(129, 140, 248, 0.6);
}

.na-date-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}

/* 按钮通用 */
.na-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.5);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.na-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(129, 140, 248, 0.7);
    transform: translateY(-1px);
}

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

.na-btn-today {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.na-btn-today:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.55);
}

.na-btn-icon {
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

/* 主舞台区 */
.na-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 900px) {
    .na-content {
        grid-template-columns: 1.5fr 1fr;
    }
}

.na-stage {
    position: relative;
    background: linear-gradient(160deg, #0b1026 0%, #1e1b4b 100%);
    border-radius: 18px;
    overflow: hidden;
    min-height: 320px;
    box-shadow: 0 8px 30px rgba(10, 15, 60, 0.35);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* 加载 & 错误 */
.na-loading,
.na-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(203, 213, 225, 0.85);
    z-index: 5;
}

.na-spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid rgba(129, 140, 248, 0.2);
    border-top-color: #818cf8;
    animation: naSpin 0.9s linear infinite;
}

@keyframes naSpin {
    to { transform: rotate(360deg); }
}

.na-loading-text {
    font-size: 13px;
    letter-spacing: 1px;
}

.na-error-icon {
    font-size: 44px;
}

.na-error-text {
    font-size: 14px;
    color: rgba(248, 113, 113, 0.9);
}

/* 媒体容器 */
.na-media-wrap {
    position: relative;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.na-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
    background: #000;
}

.na-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.na-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.na-media-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(6px);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(251, 191, 36, 0.4);
    z-index: 3;
}

/* 标题栏 */
.na-title-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 22px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

.na-media-title {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.na-media-date {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.85);
    letter-spacing: 0.5px;
}

/* 信息面板 */
.na-info-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.na-explanation-wrap,
.na-meta-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 20px 22px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.na-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e5e7eb;
}

.na-panel-icon {
    font-size: 18px;
}

.na-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.3px;
}

.na-explanation {
    max-height: 360px;
    overflow-y: auto;
    padding: 6px 2px 6px 0;
    font-size: 14px;
    line-height: 1.85;
    color: #334155;
    text-align: justify;
    hyphens: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.na-explanation::-webkit-scrollbar {
    width: 6px;
}

.na-explanation::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.na-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.na-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.na-meta-key {
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
}

.na-meta-val {
    color: #1e293b;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
    max-width: 60%;
}

.na-meta-link {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.na-meta-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* 底部信息行 */
.na-footer-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-size: 12px;
    color: #94a3b8;
    border-top: 1px dashed #e2e8f0;
    margin-bottom: 12px;
}

.na-dot {
    color: #cbd5e1;
}

/* 暗色主题适配 */
[data-theme="dark"] .na-hero {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .na-stage {
    border-color: rgba(129, 140, 248, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .na-explanation-wrap,
[data-theme="dark"] .na-meta-wrap {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .na-panel-header {
    border-bottom-color: #334155;
}

[data-theme="dark"] .na-panel-title {
    color: #f1f5f9;
}

[data-theme="dark"] .na-explanation {
    color: #cbd5e1;
    scrollbar-color: #475569 transparent;
}

[data-theme="dark"] .na-meta-key {
    color: #94a3b8;
}

[data-theme="dark"] .na-meta-val {
    color: #e2e8f0;
}

/* 响应式 */
@media (max-width: 640px) {
    .na-hero {
        padding: 20px 16px 16px;
        border-radius: 14px;
    }

    .na-logo {
        width: 46px;
        height: 46px;
        font-size: 28px;
        border-radius: 12px;
    }

    .na-title {
        font-size: 20px;
    }

    .na-sub {
        font-size: 11px;
    }

    .na-toolbar {
        padding: 12px;
        gap: 10px;
    }

    .na-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .na-btn-text {
        display: none;
    }

    .na-btn-icon {
        font-size: 20px;
    }

    .na-date-input {
        padding: 7px 8px;
        font-size: 12px;
        max-width: 140px;
    }

    .na-date-label {
        font-size: 12px;
    }

    .na-media-title {
        font-size: 16px;
    }

    .na-title-bar {
        padding: 14px 16px;
    }

    .na-image {
        max-height: 360px;
    }

    .na-explanation-wrap,
    .na-meta-wrap {
        padding: 16px;
    }

    .na-explanation {
        max-height: 280px;
        font-size: 13px;
    }
}
