/* ==================== Fitness & Gym App - Vibrant & Block-based + Dark Mode (OLED) ==================== */
/*
设计理念: Fitness/Gym App + Energetic + Motion-Driven
配色方案: Vibrant Orange + Electric Blue + OLED Dark
- Primary: #FF6B35 (Energetic Orange - 活力橙)
- Secondary: #2563EB (Electric Blue - 电光蓝)
- Success/CTA: #16A34A (Healthy Green - 健康绿)
- Accent: #DC2626 (Energy Red - 能量红)
- Background: #0A0A0A (True OLED Black)
- Surface: #1A1A1A (Deep Dark)
- Text: #FFFFFF (Pure White)
- Border: #2A2A2A (Dark Border)
*/

/* Google Fonts - Russo One + Chakra Petch + Noto Sans SC */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Russo+One&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

/* ==================== CSS变量定义 ==================== */
:root {
    /* 主色调 - Energetic Fitness */
    --color-primary: #FF6B35;
    --color-primary-hover: #FF8C5A;
    --color-primary-light: #FFAD8F;
    --color-primary-dark: #E65520;
    --color-secondary: #2563EB;
    --color-secondary-hover: #3B82F6;
    --color-accent: #DC2626;
    --color-accent-hover: #EF4444;

    /* 背景色 - True OLED Dark */
    --color-bg-main: #0A0A0A;
    --color-bg-surface: #1A1A1A;
    --color-bg-elevated: #2A2A2A;
    --color-bg-hover: #353535;
    --color-bg-block: #141414;

    /* 文字颜色 */
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #E0E0E0;
    --color-text-tertiary: #A0A0A0;
    --color-text-muted: #707070;

    /* 边框颜色 */
    --color-border: #2A2A2A;
    --color-border-hover: #404040;
    --color-border-bright: #505050;

    /* 状态颜色 - Fitness Theme */
    --color-success: #16A34A;
    --color-success-bg: rgba(22, 163, 74, 0.15);
    --color-error: #DC2626;
    --color-error-bg: rgba(220, 38, 38, 0.15);
    --color-warning: #FF6B35;
    --color-warning-bg: rgba(255, 107, 53, 0.15);
    --color-info: #2563EB;
    --color-info-bg: rgba(37, 99, 235, 0.15);

    /* 渐变色 */
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #DC2626 100%);
    --gradient-secondary: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
    --gradient-energetic: linear-gradient(135deg, #FF6B35 0%, #2563EB 100%);

    /* 阴影 - Soft Neumorphism */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 12px 30px rgba(0, 0, 0, 0.8);
    --shadow-glow-orange: 0 0 30px rgba(255, 107, 53, 0.5);
    --shadow-glow-blue: 0 0 30px rgba(37, 99, 235, 0.5);
    --shadow-glow-red: 0 0 30px rgba(220, 38, 38, 0.5);

    /* Neumorphism 阴影 */
    --shadow-neumorphism:
        8px 8px 16px rgba(0, 0, 0, 0.8),
        -4px -4px 12px rgba(50, 50, 50, 0.1);
    --shadow-neumorphism-inset:
        inset 4px 4px 8px rgba(0, 0, 0, 0.6),
        inset -2px -2px 6px rgba(50, 50, 50, 0.1);

    /* 圆角 - Block-based */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-block: 4px;

    /* 过渡时间 */
    --transition-fast: 150ms;
    --transition-base: 250ms;
    --transition-slow: 400ms;
}

/* ==================== 全局重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== 基础样式 ==================== */
body {
    font-family: 'Chakra Petch', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg-main);
    min-height: 100vh;
    padding: 20px 16px;
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 支持动画偏好设置 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* ==================== 头部区域 ==================== */
.header {
    text-align: center;
    color: var(--color-text-primary);
    margin-bottom: 28px;
    animation: fadeInDown 0.5s ease-out;
}

.header h1 {
    font-family: 'Russo One', 'Noto Sans SC', sans-serif;
    font-size: 2.75rem;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: 1px;
    line-height: 1.1;
    text-transform: uppercase;
    background: var(--gradient-energetic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(255, 107, 53, 0.3);
}

.subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-tertiary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ==================== 搜索区域 ==================== */
.search-section {
    background: var(--color-bg-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-neumorphism);
    animation: fadeInUp 0.5s ease-out;
    max-height: 500px;
    overflow: hidden;
    transition: all var(--transition-slow) ease;
}

.search-section.collapsed {
    max-height: 0;
    padding: 0 24px;
    margin-bottom: 0;
    opacity: 0;
    box-shadow: none;
    border: none;
}

.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

#keywordInput {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    background: var(--color-bg-block);
    color: var(--color-text-primary);
    transition: all var(--transition-base) ease;
    font-family: 'Chakra Petch', sans-serif;
}

#keywordInput:hover {
    border-color: var(--color-border-hover);
    background: var(--color-bg-elevated);
}

#keywordInput:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-bg-elevated);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

#keywordInput::placeholder {
    color: var(--color-text-muted);
}

#daysSelect,
#pagesSelect {
    padding: 14px 18px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    background: var(--color-bg-block);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-base) ease;
    font-family: 'Chakra Petch', sans-serif;
}

#daysSelect:hover,
#pagesSelect:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

#daysSelect:focus,
#pagesSelect:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

#crawlBtn {
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base) ease;
    box-shadow: var(--shadow-md);
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#crawlBtn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-orange);
}

#crawlBtn:active {
    transform: translateY(-1px);
}

/* ==================== 状态消息 ==================== */
.status-message {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 320px;
    max-width: 480px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    animation: slideIn 0.4s ease-out;
    border: 2px solid;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.status-message.hiding {
    animation: slideOut 0.4s ease-in forwards;
}

.status-message.success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-color: var(--color-success);
}

.status-message.error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border-color: var(--color-error);
}

.status-message.info {
    background: var(--color-info-bg);
    color: var(--color-info);
    border-color: var(--color-info);
}

/* ==================== 操作栏 ==================== */
.action-bar {
    background: var(--color-bg-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    box-shadow: var(--shadow-neumorphism);
    animation: fadeInUp 0.5s ease-out 0.1s both;
    overflow-x: auto;
}

.sort-filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

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

.filter-group label {
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#keywordFilter,
#sortOrder {
    padding: 8px 14px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    background: var(--color-bg-block);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-base) ease;
    min-width: 120px;
    font-family: 'Chakra Petch', sans-serif;
}

#keywordFilter:hover,
#sortOrder:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

#keywordFilter:focus,
#sortOrder:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

/* ==================== 视图控制按钮 ==================== */
.view-controls {
    display: flex;
    gap: 8px;
}

.view-btn-icon {
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    background: var(--color-bg-block);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--transition-base) ease;
    line-height: 1;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn-icon:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.view-btn-icon.active,
.view-btn-icon.calendar-active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow-orange);
    transform: scale(1.05);
}

/* ==================== 批量操作按钮 ==================== */
.batch-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.selected-count {
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.selected-count strong {
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 900;
    font-family: 'Russo One', sans-serif;
}

/* 按钮样式 */
.btn-primary {
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all var(--transition-base) ease;
    box-shadow: var(--shadow-sm);
    font-family: 'Chakra Petch', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-orange);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all var(--transition-base) ease;
    font-family: 'Chakra Petch', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    padding: 8px 16px;
    background: var(--color-error);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all var(--transition-base) ease;
    box-shadow: var(--shadow-sm);
    font-family: 'Chakra Petch', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-danger:hover {
    background: #B91C1C;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-red);
}

.btn-gemini {
    padding: 10px 20px;
    background: var(--gradient-secondary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all var(--transition-base) ease;
    box-shadow: var(--shadow-sm);
    font-family: 'Chakra Petch', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-gemini:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-blue);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* ==================== 新闻容器 ==================== */
.news-container {
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

/* ==================== 列表视图 ==================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-item {
    background: var(--color-bg-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-neumorphism);
    transition: all var(--transition-base) ease;
    cursor: pointer;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.news-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-orange);
    transform: translateX(4px);
}

.news-checkbox {
    margin-top: 4px;
    flex-shrink: 0;
}

.news-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
    cursor: pointer;
    transition: color var(--transition-fast) ease;
    font-family: 'Chakra Petch', 'Noto Sans SC', sans-serif;
}

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

.news-meta {
    display: flex;
    gap: 16px;
    color: var(--color-text-tertiary);
    font-size: 13px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    font-weight: 600;
}

.news-summary {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== 卡片视图 ==================== */
.news-card-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.news-card {
    background: var(--color-bg-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-neumorphism);
    transition: all var(--transition-base) ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.news-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-orange);
    transform: translateY(-4px);
}

.news-card .news-checkbox {
    position: absolute;
    top: 18px;
    right: 18px;
}

.news-card .news-title {
    font-size: 1.0625rem;
    padding-right: 35px;
}

.news-card .news-summary {
    -webkit-line-clamp: 3;
}

/* ==================== NEW标签 ==================== */
.news-item.today-news,
.news-card.today-news {
    position: relative;
    overflow: hidden;
}

.new-badge {
    position: absolute;
    top: 0px;
    right: -39px;
    background: var(--gradient-primary);
    color: white;
    padding: 4px 40px;
    font-size: 11px;
    font-weight: 900;
    transform: rotate(45deg);
    box-shadow: var(--shadow-glow-orange);
    z-index: 10;
    letter-spacing: 2px;
    font-family: 'Russo One', sans-serif;
}

.news-card .new-badge {
    top: 0px;
    right: -39px;
    padding: 4px 38px;
    font-size: 10px;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease-out 0.3s both;
    flex-wrap: wrap;
}

/* 底部分页增加顶部间距 */
#paginationBottom {
    margin-top: 28px;
}

.page-btn {
    padding: 10px 16px;
    background: var(--color-bg-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    transition: all var(--transition-base) ease;
    min-width: 44px;
    font-family: 'Chakra Petch', sans-serif;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: var(--color-bg-elevated);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.page-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    font-weight: 900;
    box-shadow: var(--shadow-glow-orange);
    transform: scale(1.1);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==================== 弹窗 ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.4s ease-out;
}

.modal-content {
    background-color: var(--color-bg-surface);
    margin: 40px auto;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 920px;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    animation: slideInDown 0.4s ease-out;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--color-border);
}

.large-modal {
    max-width: 1040px;
}

.calendar-modal-content {
    max-width: 560px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--color-text-tertiary);
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    line-height: 1;
    padding: 6px;
    z-index: 10;
    border-radius: var(--radius-md);
}

.close:hover {
    color: var(--color-error);
    background: var(--color-error-bg);
    transform: rotate(90deg);
}

.modal-header {
    padding: 24px 60px 24px 24px;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}

.modal-header h2 {
    font-family: 'Russo One', 'Noto Sans SC', sans-serif;
    color: var(--color-text-primary);
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    color: var(--color-text-tertiary);
    font-size: 13px;
    flex-wrap: wrap;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 自定义滚动条 - 深色 */
.modal-body::-webkit-scrollbar {
    width: 12px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--color-bg-block);
    border-radius: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 6px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-hover);
}

.modal-footer {
    padding: 20px 24px;
    border-top: 2px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-full-content {
    line-height: 1.8;
    color: var(--color-text-primary);
    font-size: 15px;
}

.modal-summary-section {
    margin-bottom: 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.modal-summary-header {
    background: var(--color-bg-elevated);
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background var(--transition-base) ease;
}

.modal-summary-header:hover {
    background: var(--color-bg-hover);
}

.modal-summary-content {
    padding: 16px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    background: var(--color-bg-block);
    white-space: pre-wrap;
}

.summary-bg {
    background: #333333;
}

.modal-full-content strong {
    display: block;
    margin-bottom: 10px;
    color: var(--color-text-primary);
    font-weight: 700;
}

#modalFullContent {
    white-space: pre-wrap;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

#modalFullContent img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

/* ==================== AI相关样式 ==================== */
.summary-info,
.prompt-instruction {
    background: var(--color-info-bg);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border-left: 4px solid var(--color-info);
}

.summary-info strong {
    display: inline;
    font-weight: 700;
    color: var(--color-text-primary);
}

#aiPromptInput,
#selectedNewsContent,
#summaryScript,
#aiResultContent {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.7;
    font-family: 'Chakra Petch', 'Noto Sans SC', sans-serif;
    resize: vertical;
    transition: all var(--transition-base) ease;
    background: var(--color-bg-block);
    color: var(--color-text-primary);
}

#aiPromptInput {
    min-height: 90px;
    margin-bottom: 16px;
}

#selectedNewsContent {
    min-height: 260px;
    max-height: 420px;
    font-family: 'Courier New', monospace;
}

#summaryScript,
#aiResultContent {
    height: 682px;
    font-family: 'Courier New', monospace;
}

#aiPromptInput:hover,
#selectedNewsContent:hover,
#summaryScript:hover,
#aiResultContent:hover {
    border-color: var(--color-border-hover);
    background: var(--color-bg-elevated);
}

#aiPromptInput:focus,
#selectedNewsContent:focus,
#summaryScript:focus,
#aiResultContent:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-bg-elevated);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

.news-content-preview {
    margin-bottom: 16px;
}

.news-content-preview strong {
    display: block;
    margin-bottom: 10px;
    color: var(--color-text-primary);
    font-weight: 700;
}

.content-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 6px 16px;
    border: 2px solid var(--color-border);
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--color-bg-hover);
}

.tab-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.ai-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ai-actions-left {
    display: flex;
    align-items: center;
}

.ai-actions-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ai-loading-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
}

.ai-loading-inline .spinner-small {
    width: 20px;
    height: 20px;
    border-width: 3px;
    margin: 0;
}

.spinner-small {
    border: 3px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-error {
    background: var(--color-error-bg);
    color: var(--color-error);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 16px;
    border-left: 4px solid var(--color-error);
    font-weight: 600;
}

/* ==================== 日历组件 ==================== */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-title {
    font-family: 'Russo One', 'Noto Sans SC', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-nav {
    padding: 10px 18px;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.125rem;
    transition: all var(--transition-base) ease;
    color: var(--color-text-primary);
    font-weight: 700;
}

.calendar-nav:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: scale(1.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
    font-weight: 700;
    color: var(--color-text-tertiary);
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base) ease;
    position: relative;
    background: var(--color-bg-block);
    font-weight: 700;
    color: var(--color-text-primary);
    font-size: 14px;
}

.calendar-day:hover:not(.empty) {
    background: var(--color-bg-elevated);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-day.has-news {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--color-primary);
    font-weight: 900;
    color: var(--color-primary);
}

.calendar-day.has-news::after {
    content: attr(data-count);
    font-size: 10px;
    color: var(--color-primary);
    font-weight: 900;
    margin-top: 3px;
}

.calendar-day.selected {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow-orange);
    transform: scale(1.15);
}

.calendar-day.selected::after {
    color: white;
}

.calendar-day.today {
    border: 3px solid var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* ==================== 顶部进度条 ==================== */
.top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: slideDown 0.4s ease-out;
}

.top-progress-bar .progress-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    height: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top-progress-bar .progress-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 100px 24px;
    color: var(--color-text-tertiary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--color-text-secondary);
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
}

.empty-state-subtext {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

/* ==================== 辅助工具类 ==================== */
.btn-icon-link {
    padding: 8px 14px;
    background: var(--color-bg-elevated);
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.0625rem;
    transition: all var(--transition-base) ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
}

.btn-icon-link:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==================== 动画定义 ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-60px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .news-card-view {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 16px 12px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box > * {
        width: 100%;
    }

    .action-bar {
        padding: 10px 12px;
        gap: 8px;
    }

    .sort-filter-controls {
        display: flex !important;
        flex-wrap: nowrap;
        gap: 6px;
        flex-shrink: 0;
        min-width: 240px;
    }

    .filter-group {
        flex-shrink: 0;
        display: flex !important;
    }

    #keywordFilter,
    #sortOrder {
        min-width: 100px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .view-controls {
        flex-shrink: 0;
    }

    .view-btn-icon {
        min-width: 40px;
        min-height: 40px;
        padding: 8px 12px;
        font-size: 1.1rem;
    }

    .batch-actions {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .selected-count {
        font-size: 12px;
        white-space: nowrap;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

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

    .modal-content {
        margin: 24px auto;
        width: 95%;
    }

    .modal-header {
        padding: 20px 56px 20px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .status-message {
        right: 14px;
        left: 14px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .pagination {
        gap: 6px;
    }

    .page-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 40px;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .search-section,
    .action-bar,
    .pagination,
    .status-message,
    .top-progress-bar {
        display: none;
    }

    .news-item,
    .news-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
