/* 全局样式 - 针对手机竖屏优化 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 16px;
}

body {
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.6;
    padding: 16px;
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    -webkit-text-size-adjust: 100%;
}

/* 容器样式 */
.container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

/* Header样式 - 手机优化 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 20px;
    text-align: center;
    border-radius: 16px 16px 0 0;
    margin-bottom: 8px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Tab导航样式 - 手机优化 */
.tab-nav {
    display: flex;
    background-color: #ffffff;
    border-radius: 12px;
    margin: 0 0 20px 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab-btn {
    flex: 1;
    padding: 16px 12px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.tab-btn:hover {
    color: #495057;
    background-color: rgba(233, 236, 239, 0.5);
}

.tab-btn.active {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px 3px 0 0;
}

.tab-icon {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.tab-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-content {
    display: none;
    padding: 0;
    min-height: 400px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* 文章检索页样式 - 手机优化 */
.articles-retrieval {
    max-width: 100%;
    margin: 0;
    padding: 20px;
}

/* 搜索和筛选区域 */
.search-filter-area {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 56px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    background-color: #f8f9fa;
    color: #1d1d1f;
    transition: all 0.2s ease;
    min-height: 56px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.search-input::placeholder {
    color: #8e8e93;
    opacity: 0.8;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8e93;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.filter-group {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d1d1f;
    font-size: 0.95rem;
    line-height: 1.3;
}

.filter-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    background-color: #f8f9fa;
    color: #1d1d1f;
    transition: all 0.2s ease;
    min-height: 52px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 文章卡片网格 - 手机优化 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

/* 文章卡片样式 - 手机优化 */
.article-card {
    background-color: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.article-card:hover,
.article-card:active {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.article-card:hover::before {
    opacity: 1;
}

.article-card-header {
    margin-bottom: 16px;
}

.article-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #8e8e93;
    flex-wrap: wrap;
    gap: 8px;
}

.article-card-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: #8e8e93;
}

.article-card-source {
    background-color: #f2f4f8;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #5a5a5f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
}

.article-card-content {
    color: #3a3a3c;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
}

.article-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card-tag {
    padding: 6px 12px;
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #667eea;
    line-height: 1;
    transition: all 0.2s ease;
}

.article-card-tag:hover {
    background-color: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

/* 添加文章按钮 */
.add-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 30px;
}

.add-article-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 统计信息 */
.stats-info {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.stats-highlight {
    font-weight: 600;
    color: #667eea;
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 60px 30px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #dee2e6;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮样式 - 触摸友好优化 */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.01em;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover,
.btn-primary:active {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #7185ff 0%, #8462ab 100%);
}

.btn-secondary {
    background-color: #f2f4f8;
    color: #1d1d1f;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover,
.btn-secondary:active {
    transform: translateY(-3px);
    background-color: #e8eaf1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 天气卡片样式 - 手机竖屏优化 */
.weather-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 24px 20px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25);
    border: none;
    position: relative;
    overflow: hidden;
}

.weather-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.weather-header h3 {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    min-width: 200px;
}

.weather-update-time {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.weather-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .weather-content {
        flex-direction: row;
        gap: 30px;
    }
}

.weather-current,
.weather-forecast {
    flex: 1;
}

.weather-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.95;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.weather-temp {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.weather-condition {
    font-size: 1.1rem;
    text-align: right;
    font-weight: 500;
    line-height: 1.3;
    max-width: 50%;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.weather-detail {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 80px;
    justify-content: center;
}

.weather-detail:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.weather-detail span:first-child {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.weather-detail span:last-child {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.forecast-overview {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.forecast-item:last-child {
    border-bottom: none;
}

.forecast-label {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.forecast-value {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
}

.forecast-periods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.period-item {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 100px;
    justify-content: center;
}

.period-item:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.period-time {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.95;
}

.period-temp {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1;
}

.period-condition {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-detail {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.weather-detail span:first-child {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.weather-detail span:last-child {
    font-size: 1rem;
    font-weight: 600;
}

.weather-suggestion {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 18px;
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    font-weight: 500;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.weather-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    flex-wrap: wrap;
    gap: 16px;
}

.weather-refresh-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.01em;
}

.weather-refresh-btn:hover,
.weather-refresh-btn:active {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.weather-source {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* 聊天区域优化 - 手机竖屏 */
.chat-container {
    max-width: 100%;
    margin: 0 0 24px 0;
    padding: 0 4px;
}

.message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    position: relative;
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    z-index: -1;
}

.tt-message {
    background: rgba(102, 126, 234, 0.08);
}

.tt-message::before {
    background: rgba(102, 126, 234, 0.05);
}

.troy-message {
    background: rgba(128, 128, 128, 0.08);
}

.troy-message::before {
    background: rgba(128, 128, 128, 0.05);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tt-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.troy-avatar {
    background: linear-gradient(135deg, #8e8e93 0%, #636366 100%);
    color: white;
}

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

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.sender-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.3;
}

.timestamp {
    font-size: 0.85rem;
    color: #8e8e93;
    font-weight: 500;
    white-space: nowrap;
}

.message-text {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #1d1d1f;
    word-wrap: break-word;
    font-weight: 400;
}

/* 输入区域优化 */
.input-area {
    background-color: white;
    border-radius: 20px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.input-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-btn {
    background-color: #f2f4f8;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #5a5a5f;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.quick-btn:hover {
    background-color: #e8eaf1;
    transform: translateY(-2px);
}

.input-area textarea {
    width: 100%;
    min-height: 120px;
    padding: 18px 20px;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1d1d1f;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.input-area textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.input-area .buttons {
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.input-area .buttons .btn {
    flex: 1;
    max-width: calc(50% - 8px);
}

@media (max-width: 768px) {
    .weather-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .forecast-periods {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .weather-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .weather-refresh-btn {
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .forecast-periods {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .period-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px;
    }
    
    .period-temp {
        font-size: 1.2rem;
        margin: 0 10px;
    }
    
    .weather-details {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .weather-detail {
        padding: 8px;
    }
    
    .weather-detail span:first-child {
        font-size: 0.7rem;
    }
    
    .weather-detail span:last-child {
        font-size: 0.9rem;
    }
}

/* Footer样式 */
.footer {
    text-align: center;
    margin-top: 40px;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.page-btn {
    padding: 8px 14px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(.disabled) {
    background-color: #e9ecef;
}

.page-btn.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

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

/* 响应式设计 - 手机竖屏优化 */
@media (max-width: 768px) {
    body {
        padding: 12px;
        font-size: 1.05rem;
    }
    
    .container {
        border-radius: 20px;
        margin-bottom: 20px;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    }
    
    .header {
        padding: 20px 16px;
        border-radius: 20px 20px 0 0;
    }
    
    .header h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }
    
    .header p {
        font-size: 0.95rem;
    }
    
    .tab-nav {
        border-radius: 14px;
        margin: 0 0 16px 0;
    }
    
    .tab-btn {
        padding: 14px 8px;
        min-height: 52px;
        font-size: 0.95rem;
    }
    
    .tab-icon {
        font-size: 1.2rem;
    }
    
    .tab-label {
        font-size: 0.85rem;
    }
    
    .articles-grid {
        gap: 12px;
    }
    
    .article-card {
        padding: 18px;
        border-radius: 18px;
    }
    
    .article-card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .article-card-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .weather-card {
        padding: 20px 16px;
        border-radius: 18px;
        margin-bottom: 20px;
    }
    
    .weather-header h3 {
        font-size: 1.2rem;
    }
    
    .weather-temp {
        font-size: 2.8rem;
    }
    
    .weather-detail span:last-child {
        font-size: 1rem;
    }
    
    .forecast-item {
        padding: 10px 0;
    }
    
    .forecast-label,
    .forecast-value {
        font-size: 0.95rem;
    }
    
    .period-temp {
        font-size: 1.4rem;
    }
    
    .input-area {
        padding: 20px 16px;
        border-radius: 18px;
    }
    
    .input-area textarea {
        font-size: 1.05rem;
        padding: 16px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
        min-height: 48px;
    }
}

/* 全局手机优化规则 */
:root {
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

/* 触摸优化 */
button,
a,
input[type="button"],
input[type="submit"],
.btn,
.quick-btn,
.weather-refresh-btn,
.tab-btn {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

/* 防止手机上的双击缩放 */
* {
    touch-action: manipulation;
}

/* 优化滚动体验 */
.scrollable {
    -webkit-overflow-scrolling: touch;
}

/* 防止图片和按钮被选中 */
img, button, .btn, .article-card {
    -webkit-user-select: none;
    user-select: none;
}

/* 优化长按行为 */
.long-tap-target {
    -webkit-user-select: none;
    user-select: none;
}

/* 防止内容溢出 */
.prevent-overflow {
    overflow-x: hidden;
    word-wrap: break-word;
}

/* 优化字体渲染 */
* {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 优化输入框的字体大小 - 防止iPhone自动缩放 */
@media (max-width: 768px) {
    input[type="text"],
    input[type="search"],
    textarea {
        font-size: 16px !important;
        max-height: none !important;
    }
    
    /* 确保表单元素在手机上更容易点击 */
    select,
    input,
    textarea,
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* 隐藏滚动条但保持滚动功能 */
.scrollbar-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}

/* 优化动画性能 */
.animate-smooth {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* 优化加载状态 */
.loading-skeleton {
    animation: shimmer 1.5s infinite linear;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 优化聚焦状态 */
:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 优化移动端性能 */
@media (hover: none) and (pointer: coarse) {
    /* 在触摸设备上优化悬停效果 */
    .article-card:hover,
    .weather-detail:hover,
    .period-item:hover {
        transform: none;
    }
    
    .article-card:active,
    .weather-detail:active,
    .period-item:active {
        transform: translateY(-2px);
    }
}