* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

header {
    text-align: center;
    padding: 20px 10px;
    color: white;
    margin-bottom: 15px;
}

header h1 {
    font-size: 1.8em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    opacity: 0.9;
    font-size: 0.95em;
}

.search-panel {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.search-input {
    background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 16px center;
    padding: 16px 16px 16px 48px !important;
    border-radius: 25px !important;
    font-size: 17px;
}

.date-input, .importance-select {
    background: #f8f9fa;
    border-radius: 12px;
    border: none;
    padding: 16px;
    font-size: 16px;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.btn-reset {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-reset:active {
    transform: translateY(0);
}

.stats {
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:active {
    transform: scale(0.98);
}

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

.importance {
    font-size: 0.75em;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.importance.high {
    background: #ffebee;
    color: #c62828;
}

.importance.medium {
    background: #fff8e1;
    color: #f57c00;
}

.importance.low {
    background: #e8f5e9;
    color: #2e7d32;
}

.news-date {
    font-size: 0.8em;
    color: #999;
}

.news-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-source {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
}

.news-source a {
    color: #667eea;
    text-decoration: none;
}

.news-summary {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.news-analysis {
    font-size: 0.85em;
    color: #444;
    line-height: 1.5;
    padding: 10px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.analysis-label {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.loading, .no-results {
    text-align: center;
    padding: 40px 20px;
    color: white;
    font-size: 1.1em;
}

.no-results {
    background: rgba(255,255,255,0.9);
    color: #666;
    border-radius: 12px;
}

footer {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85em;
}

footer a {
    color: white;
}

/* 桌面端适配 */
@media (min-width: 768px) {
    body {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 2.2em;
    }

    .search-panel {
        padding: 25px 30px;
    }

    .search-row {
        flex-direction: row;
    }

    .date-input, .importance-select {
        width: 180px;
        flex-shrink: 0;
    }

    main {
        max-width: 900px;
        margin: 0 auto;
    }

    .news-card {
        padding: 25px;
    }

    .news-title {
        font-size: 1.25em;
    }
}

/* 卡片悬停效果（仅桌面端） */
@media (hover: hover) {
    .news-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    }
}
