
:root {
    --primary-accent: #007AFF;
    --text-main: #1d1d1f;
    --text-secondary: #86868b;
    
    /* 玻璃拟态 - 大卡片背景 */
    --glass-card-bg: rgba(255, 255, 255, 0.65);
    --glass-card-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(25px);
    
    /* 交互态 */
    --item-hover-bg: rgba(255, 255, 255, 0.5);
    
    --shadow-card: 0 8px 40px -5px rgba(0, 0, 0, 0.08);
    --shadow-icon: 0 4px 12px rgba(0, 0, 0, 0.05);
    
    --radius-box: 24px;
    --radius-item: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #e6e9f0 100%); 
    min-height: 100vh;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.4;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: gradientMove 30s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes gradientMove {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -20px) scale(1.05); }
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header.scrolled {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-box {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    margin-left: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #333, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-right-text {
    margin-right: 10px;
}

.top-right-text a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}

/* Hero Section */
.hero-section {
    padding: 30px 24px 20px;
    display: flex;
    justify-content: center;
}

.hero-glass-card {
    width: 100%;
    max-width: 1072px;
    border: none;
    border-radius: var(--radius-box);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: end; 
    padding: 0 4px;
}

.date-widget {
    display: flex;
    flex-direction: column;
    padding-left: 6px;
}

.date-text {
    font-size: 22px; 
    font-weight: 600; 
    color: #1d1d1f;
    line-height: 1;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #333, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; 
}

.week-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 6px;
    margin-left: 2px;
}


.time-widget {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: right;
    height: 100%;
    padding-right: 6px;
}

.clock-text {
    font-size: 20px;
    font-weight: 300; 
    font-feature-settings: "tnum"; /* 等宽数字，防止秒针跳动时文字抖动 */
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary); 
    line-height: 1;
    letter-spacing: -0.5px;
}

#currentDate {
        width: 88px;
    }
#currentClock {
        width: 88px;
    }

.search-container-inner {
    width: 100%;
    display: flex;
    justify-content: center;
}

.search-box {
    width: 100%;
    max-width: 800px;
    height: 56px;
    background: rgba(255, 255, 255, 0.65); 
    border: 1px solid rgba(0, 0, 0, 0.08); 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-box); 
    padding: 8px; 
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.search-box:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.select-box {
    position: relative;
    margin-right: 8px;
    height: 100%;
    display: flex;
    align-items: center;
}

.select-box::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(0,0,0,0.1);
}

.search-select {
    /* 去除 macOS Safari 的原生下拉样式 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 0 20px 0 16px;
    height: 100%;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #1d1d1f;
    font-weight: 400;
    outline: none;
    padding: 0 12px;
    height: 100%;
}

.search-input::placeholder {
    color: #a1a1a6;
}

.search-button {
    background: var(--primary-accent);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 0 24px;
    height: 100%;
    border-radius: 18px;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.search-button:hover {
    background: #0062cc;
    transform: scale(1.02);
}

/* 推荐胶囊 */
.trending-area {
    margin-bottom: 6px;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 6px; /* 胶囊间距 */
    
    /* 溢出处理：渐变隐藏 */
    overflow-x: auto; /* 允许横向滚动 */
    overflow-y: hidden;
    white-space: nowrap;
    
    /* 隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    
    /* 右侧渐变遮罩 */
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
}

.trending-area::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.trending-pill {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 5px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
    flex-shrink: 0;
    
    /* 作为链接时的样式重置 */
    text-decoration: none; /* 去除下划线 */
    color: var(--text-secondary); /* 默认文字颜色 */
    cursor: pointer;
}

.trending-pill:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    color: var(--primary-accent); /* hover时文字变蓝 */
}

.trending-content {
    color: #555; 
    font-weight: 500;
}

.trending-icon { width: 18px; height: 18px; }
.trending-content a {
    color: inherit;
    text-decoration: none;
    pointer-events: none; 
}
.trending-content a:hover { color: var(--primary-accent); }


/* Main Content */
.main-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.section.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-left: 10px;
}

.section-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* 分类容器样式 */
.section-card-container {
    background: var(--glass-card-bg);
    backdrop-filter: var(--glass-blur) saturate(180%);
    border: 1px solid var(--glass-card-border);
    border-radius: var(--radius-box);
    padding: 20px;
    box-shadow: 0 8px 40px -5px rgba(0, 0, 0, 0.05);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

/* 列表项样式 */
.card {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-item);
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
}

.card:hover {
    background: var(--item-hover-bg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
    margin-right: 12px;
    box-shadow: var(--shadow-icon);
    background: #fff; /* 防止透明图标在复杂背景上看不清 */
}

.card-info {
    flex: 1;
    overflow: hidden;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-description {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

/* Footer */
.footer {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 10px;
}

/* Responsive */
@media (max-width: 1080px) {
    .date-widget, .time-widget {
        display: none;
    }

    .dashboard-header {
        display: flex;
        justify-content: center;
        align-items: end; 
        padding: 0 4px;
    }

    .hero-section {
        padding: 40px 24px 20px;
    }
}

@media (max-width: 768px) {
    .header-box, .search-container { padding-left: 16px; padding-right: 16px; }
    .main-content { padding-left:20px;padding-right:20px }

    .hero-glass-card {
        max-width: 100%;
        padding: 10px 20px 20px;
        border-radius: 20px;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .date-widget, .time-widget {
        display: none;
    }
    
    .hero-section { padding:20px 0 0; }
    .search-box { flex-wrap: wrap; height: auto; padding: 10px; border-radius: 20px; }
    .select-box { width: 100%; border-right: none; margin-bottom: 5px; height: 40px; }
    .select-box::after { display: none; }
    .search-select { width: 100%; padding-left: 8px; }
    .search-input { width: 100%; height: 40px; margin-bottom: 10px; padding-left: 8px; }
    .search-button { width: 100%; height: 44px; }
    .trending-area {padding: 0 0;}

    .section-card-container { padding: 16px; }
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
    .card { padding: 8px; }
    .card-icon { width: 32px; height: 32px; }
    .card-title { font-size: 13px; }
}
