/* ============================================
   零感AI - 公告中心样式（优雅简约版）
   设计理念：现代卡片 + 优雅时间轴
   ============================================ */

/* ===== CSS变量（优雅配色系统） ===== */
:root {
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-text-tertiary: #6b7280;
    --color-bg-primary: #ffffff;
    --color-bg-modal: rgba(248, 250, 255, 0.98);
    --color-primary: #6366f1;
    --color-warning: #f59e0b;
    --color-neutral: #6b7280;
}

/* ===== Info Center按钮样式 ===== */
.info-center-container {
    margin-right: 15px;
}

.btn-info-center {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 10px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-info-center:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

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

.info-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff4757;
    color: #fff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: info-badge-pulse 2s infinite;
}

@keyframes info-badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== 模态框布局 ===== */
#info-center-modal .modal-content.info-center-content {
    max-width: 800px;
    width: min(96%, 800px);
    max-height: 84vh;
    padding: 32px 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-modal);
    box-shadow: 0 32px 68px rgba(15, 23, 42, 0.12);
    border-radius: 16px;
}

.info-center-content h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ===== 标签页 ===== */
.info-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
    align-self: flex-start;
}

.info-tab {
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-tab:hover:not(.is-active) {
    color: #312e81;
    background: rgba(79, 70, 229, 0.08);
}

.info-tab.is-active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ===== 面板容器 ===== */
.info-panels {
    flex: 0 1 auto;
    width: 100%;
    overflow: visible;
}

.info-panel {
    display: none;
}

.info-panel.is-active {
    display: block;
}

/* ===== 公告列表容器 ===== */
.info-feed {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0 8px 0 0;
}

.info-feed__placeholder,
.info-feed__noscript {
    font-size: 14px;
    color: var(--color-text-tertiary);
    padding: 40px 0;
    text-align: center;
}

/* ===== 公告项（优雅布局） ===== */
.announcement-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.announcement-item:last-child {
    margin-bottom: 0;
}

/* ===== 时间轴区域 ===== */
.announcement-timeline {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.announcement-time {
    font-size: 13px;
    color: var(--color-text-tertiary);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.timeline-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-height: 40px;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    margin-top: 4px;
    flex-shrink: 0;
}

.announcement-item.is-pinned .timeline-dot {
    background: var(--color-warning);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.timeline-line {
    width: 1px;
    flex: 1;
    margin-top: 8px;
    background: linear-gradient(
        180deg,
        rgba(148, 163, 184, 0.2) 0%,
        rgba(148, 163, 184, 0.05) 100%
    );
}

.announcement-item:last-child .timeline-line {
    display: none;
}

/* ===== 卡片区域 ===== */
.announcement-card {
    background: var(--color-bg-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 有链接的卡片 - 基础样式 */
.announcement-card.has-link {
    cursor: pointer;
}

/* 有链接的卡片 - 悬停效果 */
.announcement-card.has-link:hover {
    box-shadow:
        0 8px 20px rgba(99, 102, 241, 0.12),
        0 0 0 1px rgba(99, 102, 241, 0.15);
    transform: translateY(-3px);
}

/* 置顶卡片的淡色渐变背景 */
.announcement-item.is-pinned .announcement-card {
    background: linear-gradient(
        135deg,
        #fffbeb 0%,
        #ffffff 100%
    );
}

/* ===== 卡片头部 ===== */
.announcement-header {
    margin-bottom: 12px;
}

.announcement-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.announcement-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.4;
    letter-spacing: -0.01em;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.announcement-pin-badge {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.3));
    animation: pin-pulse 3s ease-in-out infinite;
    line-height: 1;
}

@keyframes pin-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 链接图标 */
.announcement-link-icon {
    margin-left: auto;
    font-size: 14px;
    color: var(--color-text-tertiary);
    opacity: 0.6;
    transition: all 0.3s ease;
    line-height: 1;
}

.announcement-card.has-link:hover .announcement-link-icon {
    color: var(--color-primary);
    opacity: 1;
    transform: translate(2px, -2px);
}

/* ===== 标签样式（3色系统） ===== */
.announcement-tag {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 0.01em;
}

/* 主题色：蓝色系（功能迭代、体验优化） */
.announcement-tag--feature,
.announcement-tag--experience {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* 警示色：橙色系（Bug修复、维护公告） */
.announcement-tag--bugfix,
.announcement-tag--maintenance {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

/* 中性色：灰色系（运营支持、其他） */
.announcement-tag--ops,
.announcement-tag--other {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    border: 1px solid rgba(107, 114, 128, 0.15);
}

/* ===== 内容区域 ===== */
.announcement-content {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    line-height: 1.6;
    letter-spacing: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== 使用指南样式（保持不变） ===== */
.info-guides {
    max-height: 50vh;
    overflow-y: auto;
    padding: 18px 20px 24px;
    background: linear-gradient(180deg, rgba(245, 246, 255, 0.7) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 18px;
}

.guide-entry {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
    margin-bottom: 18px;
    transition: box-shadow 0.24s ease, transform 0.24s ease;
}

.guide-entry:last-child {
    margin-bottom: 0;
}

.guide-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.14);
}

.guide-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.guide-summary {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #1f2937;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #4338ca;
    text-decoration: none;
}

.guide-link:hover {
    text-decoration: underline;
}

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

.guide-action {
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(67, 56, 202, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(67, 56, 202, 0.28);
}

.guide-action:active {
    transform: translateY(0);
}

/* ===== 底部按钮区域 ===== */
.info-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

#info-read-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 28px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#info-read-btn:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

#info-read-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ===== 响应式设计 ===== */
@media (max-width: 992px) {
    #info-center-modal .modal-content.info-center-content {
        padding: 28px 32px;
        max-height: 88vh;
    }

    .announcement-item {
        grid-template-columns: 70px 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    #info-center-modal .modal-content.info-center-content {
        padding: 24px;
        max-width: 96%;
    }

    .info-center-content h2 {
        font-size: 1.35rem;
        margin-bottom: 16px;
    }

    .info-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .info-tab {
        flex: 1 1 0;
        text-align: center;
        padding: 8px 12px;
    }

    .info-feed {
        max-height: 52vh;
        padding: 0;
    }

    .announcement-item {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    }

    .announcement-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    /* 移动端：时间轴横向排列 */
    .announcement-timeline {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }

    .announcement-time {
        order: 2;
        font-size: 12px;
    }

    .timeline-track {
        order: 1;
        flex-direction: row;
        align-items: center;
        min-height: 0;
        width: auto;
    }

    .timeline-dot {
        margin-top: 0;
    }

    .timeline-line {
        display: none;
    }

    .announcement-card {
        padding: 16px;
    }

    .announcement-title {
        font-size: 15px;
    }

    .announcement-content {
        font-size: 13px;
    }

    .info-footer {
        margin-top: 24px;
        padding-top: 20px;
    }

    #info-read-btn {
        width: 100%;
        padding: 12px;
    }

    .guide-entry {
        padding: 16px 18px;
    }
}

@media (max-width: 520px) {
    #info-center-modal .modal-content.info-center-content {
        width: 98%;
        padding: 20px 16px;
    }

    .info-center-content h2 {
        font-size: 1.25rem;
    }

    .announcement-item {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .announcement-card {
        padding: 14px;
    }

    .announcement-title {
        font-size: 14px;
    }

    .announcement-content {
        font-size: 13px;
    }

    .announcement-tag {
        font-size: 11px;
        padding: 3px 10px;
    }

    .guide-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-action,
    .guide-link {
        width: 100%;
    }
}

/* ===== 优化滚动条样式 ===== */
.info-feed::-webkit-scrollbar,
.info-guides::-webkit-scrollbar {
    width: 6px;
}

.info-feed::-webkit-scrollbar-track,
.info-guides::-webkit-scrollbar-track {
    background: transparent;
}

.info-feed::-webkit-scrollbar-thumb,
.info-guides::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.info-feed::-webkit-scrollbar-thumb:hover,
.info-guides::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}
