:root {
    /* Apple-style colors */
    --color-primary: #ffffff;
    --color-secondary: #f5f5f7;
    --color-tertiary: #fbfbfd;
    --color-quaternary: #f9f9fb;
    --color-text-primary: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-text-tertiary: #86868b;
    --color-blue: #007aff;
    --color-blue-light: #0071e3;
    --color-green: #30d158;
    --color-orange: #ff9500;
    --color-red: #ff453a;
    --color-purple: #bf5af2;
    --color-indigo: #5856d6;
    
    /* Announcement specific colors */
    --announcement-bg: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    --announcement-border: rgba(0, 122, 255, 0.1);
    --announcement-accent: #007aff;
    
    /* Shadows */
    --shadow-light: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-announcement: 0 2px 16px rgba(0, 122, 255, 0.08);
    
    /* Border radius */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 18px;
    --radius-xl: 24px;
    
    /* Typography */
    --font-family: 'SF Pro Display', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: var(--color-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    font-size: 17px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 22px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header h1 {
    margin: 0;
    color: var(--color-text-primary);
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
}

/* 主要内容区域 - 统一背景 */
.main-content {
    background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    margin: 0 -22px;
    padding: 0 22px;
    min-height: 100vh;
}

/* Section spacing */
.section {
    padding: 60px 0;
}

.section:first-child {
    padding-top: 40px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.08;
    text-align: center;
}

.section-subtitle {
    font-size: 21px;
    color: var(--color-text-secondary);
    margin-bottom: 48px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Programs Section特殊处理 */
.programs-section .section-subtitle {
    margin-bottom: 60px;
}

/* Announcements - 重新设计 */
.announcements-section {
    position: relative;
}

.announcements-container {
    display: grid;
    gap: 24px;
    margin-top: 32px;
}

.announcement-item {
    background: var(--announcement-bg);
    border-radius: var(--radius-large);
    padding: 32px;
    border: 1px solid var(--announcement-border);
    box-shadow: var(--shadow-announcement);
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.announcement-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-blue) 0%, var(--color-blue-light) 100%);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.announcement-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 122, 255, 0.15);
    border-color: rgba(0, 122, 255, 0.2);
}

.announcement-item:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

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

.announcement-item h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
    flex: 1;
    line-height: 1.3;
}

.announcement-content {
    margin-bottom: 20px;
}

.announcement-item p {
    margin: 0;
    font-size: 17px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.announcement-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.announcement-date {
    font-size: 14px;
    color: var(--color-text-tertiary);
    font-weight: 500;
}

/* Programs Section */
.programs-section {
    background-color: var(--color-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    margin: 0 -22px;
    padding: 60px 22px 80px;
    position: relative;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.04);
}

.programs-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
}

.programs-section-sticky-header {
    position: sticky;
    top: 85px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 999;
    margin: -60px -22px 40px;
    padding: 24px 22px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.program-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    background-color: var(--color-secondary);
    border-radius: var(--radius-medium);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.program-tabs::-webkit-scrollbar {
    display: none;
}

.program-tab {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius-small);
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: fit-content;
    cursor: pointer;
}

.program-tab:hover {
    color: var(--color-text-primary);
    background-color: rgba(255, 255, 255, 0.6);
}

.program-tab.active {
    color: var(--color-text-primary);
    background-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Program Cards */
.program-cards-container {
    transition: opacity 0.3s ease;
}

.program-cards-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.program-card {
    background-color: var(--color-primary);
    border-radius: var(--radius-xl);
    margin-bottom: 48px;
    padding: 48px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.program-header {
    margin-bottom: 32px;
}

.program-header h3 {
    margin: 0 0 8px 0;
    font-size: 40px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.program-version {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--color-secondary);
    color: var(--color-text-secondary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.program-description {
    font-size: 19px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    line-height: 1.5;
    padding: 24px;
    background-color: var(--color-tertiary);
    border-radius: var(--radius-medium);
    border-left: 4px solid var(--color-blue);
}

/* Tasks */
.tasks-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

.task-item {
    padding: 32px;
    margin-bottom: 24px;
    border-radius: var(--radius-large);
    background-color: var(--color-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

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

/* 可展开的任务标题 */
.task-title-toggle {
    font-size: 22px;
    color: var(--color-text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: -0.01em;
}

.task-title-toggle:hover {
    color: var(--color-blue);
}

/* 静态的任务标题（无详细信息时） */
.task-title-static {
    font-size: 22px;
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.toggle-icon {
    margin-right: 12px;
    transition: transform 0.3s ease;
    font-style: normal;
    font-size: 18px;
    color: var(--color-text-tertiary);
}

.task-title-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
    color: var(--color-blue);
}

.task-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.task-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    line-height: 1;
}

/* Status badges */
.status-todo { background-color: rgba(0, 122, 255, 0.1); color: var(--color-blue); }
.status-inprogress { background-color: rgba(255, 149, 0, 0.1); color: var(--color-orange); }
.status-testing { background-color: rgba(191, 90, 242, 0.1); color: var(--color-purple); }
.status-completed { background-color: rgba(48, 209, 88, 0.1); color: var(--color-green); }
.status-onhold { background-color: rgba(255, 204, 0, 0.1); color: #ff9500; }
.status-cancelled { background-color: rgba(255, 69, 58, 0.1); color: var(--color-red); }
.status-default { background-color: var(--color-secondary); color: var(--color-text-secondary); }

/* Priority badges */
.priority-low { background-color: rgba(48, 209, 88, 0.1); color: var(--color-green); }
.priority-medium { background-color: rgba(255, 149, 0, 0.1); color: var(--color-orange); }
.priority-high { background-color: rgba(255, 69, 58, 0.1); color: var(--color-red); }

/* Progress bar */
.progress-container {
    background-color: var(--color-secondary);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-top: 8px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-green) 0%, #32d74b 100%);
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -28px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.task-description {
    display: none;
    margin-top: 24px;
    padding: 24px;
    background-color: var(--color-primary);
    border-radius: var(--radius-medium);
    font-size: 17px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.task-description p {
    margin: 0 0 16px 0;
}

.task-description p:last-child {
    margin-bottom: 0;
}

.no-data {
    text-align: center;
    color: var(--color-text-tertiary);
    padding: 64px 32px;
    font-size: 19px;
    font-style: normal;
}

/* Loading状态 */
.loading-spinner {
    display: none;
    margin: 20px auto;
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-secondary);
    border-top: 3px solid var(--color-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 1068px) {
    .container {
        padding: 0 22px;
    }

    .main-content {
        margin: 0 -22px;
        padding: 0 22px;
    }

    .programs-section {
        margin: 0 -22px;
        padding: 60px 22px 80px;
    }

    .programs-section-sticky-header {
        margin: -60px -22px 40px;
        padding: 24px 22px;
    }
}

@media (max-width: 834px) {
    .site-header {
        padding: 16px 0;
    }

    .site-header h1 {
        font-size: 28px;
    }

    .container {
        padding: 0 16px;
    }

    .main-content {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .section {
        padding: 48px 0;
    }

    .section:first-child {
        padding-top: 32px;
    }

    .section-title {
        font-size: 40px;
    }

    .section-subtitle {
        font-size: 19px;
        margin-bottom: 32px;
    }

    .programs-section .section-subtitle {
        margin-bottom: 50px;
    }

    .announcement-item {
        padding: 24px;
    }

    .announcement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .programs-section {
        margin: 0 -16px;
        padding: 48px 16px 64px;
    }

    .programs-section-sticky-header {
        top: 80px;
        margin: -48px -16px 32px;
        padding: 16px 16px;
    }

    .program-card {
        padding: 32px 24px;
        margin-bottom: 32px;
    }

    .program-header h3 {
        font-size: 32px;
    }

    .program-description {
        font-size: 17px;
        padding: 20px;
        margin-bottom: 32px;
    }

    .tasks-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .task-item {
        padding: 24px 20px;
        margin-bottom: 16px;
    }

    .task-title-toggle, .task-title-static {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .task-meta {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 430px) {
    .site-header h1 {
        font-size: 24px;
    }

    .section-title {
        font-size: 32px;
    }

    .program-header h3 {
        font-size: 28px;
    }

    .program-tabs {
        padding: 4px;
        gap: 4px;
    }

    .program-tab {
        padding: 10px 16px;
        font-size: 14px;
    }

    .task-title-toggle, .task-title-static {
        font-size: 18px;
    }

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

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

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

.program-card,
.announcement-item,
.task-item {
    animation: fadeInUp 0.6s ease-out;
}

/* 增强连贯性的动画 */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.announcements-container {
    animation: slideInFromTop 0.8s ease-out;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}