/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f5f7;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* 页面主体容器 - 锁定 9:16 比例基准 */
.app-container {
    width: 100vw;
    min-height: 177.77vw;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 6vw 4vw;
    position: relative;
}

/* 顶部搜索区域 */
.search-header {
    width: 100%;
    margin-bottom: 6vw;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 2vw;
}

.search-input {
    flex: 1;
    height: 12vw;
    background-color: #f2f2f7;
    border: 0.4vw solid transparent;
    border-radius: 6vw; /* 胶囊圆角 */
    padding: 0 5vw;
    font-size: 4vw;
    color: #1d1d1f;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #0071e3;
    background-color: #ffffff;
}

.search-button {
    width: 20vw;
    height: 12vw;
    background-color: #0071e3;
    color: #ffffff;
    border: none;
    border-radius: 6vw;
    font-size: 3.8vw;
    font-weight: 600;
    cursor: pointer;
}

/* 结果统计 */
.results-count {
    font-size: 3.5vw;
    color: #86868b;
    margin-bottom: 4vw;
    padding-left: 2vw;
}

/* 搜索结果列表容器 */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 3vw; /* 卡片之间的间距 */
}

/* 块状搜索结果项 */
.result-card {
    background-color: #f2f2f7; /* 与输入框类似的浅灰色背景 */
    border-radius: 5vw; /* 较大的圆角，模仿图片样式 */
    padding: 3.5vw 5vw; /* 控制内边距以保持紧凑高度 */
    display: flex;
    flex-direction: column;
    gap: 1vw; /* 标题和日期之间的微小间距 */
    transition: transform 0.2s ease;
}

.result-card:active {
    transform: scale(0.98);
    background-color: #e5e5ea;
}

/* 结果标题 */
.result-title {
    font-size: 4.2vw;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
    /* 限制为一行，确保整齐并控制高度 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 发布日期 */
.result-date {
    font-size: 3vw;
    color: #86868b;
    font-weight: 400;
}

/* 加载指示器 */
#loading-indicator {
    text-align: center;
    padding: 4vw;
    color: #86868b;
    font-size: 3.5vw;
    display: none;
}

/* 错误状态 */
.error-message {
    color: #ff3b30;
    text-align: center;
    padding: 4vw;
    font-size: 3.5vw;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 8vw 4vw;
    color: #86868b;
    font-size: 3.5vw;
}