/* 医保药品目录查询系统 - 样式表 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.greeting {
    font-size: 1.2em;
    opacity: 0.95;
}

/* 主内容区 */
.main-content {
    padding: 30px 0;
}

/* 搜索区域 */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.search-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5em;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.search-btn {
    padding: 12px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.filter-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 500;
    color: #555;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

/* 统计信息 */
.statistics {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.statistics h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* 分类展示 */
.category-section {
    margin-bottom: 30px;
}

.category-section > h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.category-block {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.category-block h3 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 0.8em;
    color: #667eea;
    text-decoration: none;
    font-weight: normal;
}

.view-all:hover {
    text-decoration: underline;
}

.drug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.drug-card {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s, transform 0.3s;
}

.drug-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.drug-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.05em;
}

.drug-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.drug-class {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 8px;
}

.class-a {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.class-b {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* 搜索结果 */
.results-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.results-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.results-info {
    color: #666;
    font-size: 0.95em;
}

.results-info strong {
    color: #667eea;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results p {
    margin: 10px 0;
    font-size: 1.1em;
}

.no-results a {
    color: #667eea;
    text-decoration: none;
}

.results-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

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

.results-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.drug-name-col {
    min-width: 200px;
}

.drug-name-col strong {
    color: #2c3e50;
}

.special-mark {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background-color: #fff3cd;
    color: #856404;
    border-radius: 3px;
    font-size: 0.85em;
}

.remarks-col {
    max-width: 400px;
}

.remarks-text {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

.payment-info {
    margin-top: 8px;
    padding: 6px 10px;
    background-color: #e8f5e9;
    border-radius: 4px;
    font-size: 0.85em;
    color: #2e7d32;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.badge-type {
    background-color: #f3e5f5;
    color: #6a1b9a;
}

.badge-class-a {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-class-b {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #667eea;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination span.current {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: 600;
}

/* 使用说明 */
.help-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.help-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.help-content p {
    margin-bottom: 12px;
    line-height: 1.8;
    color: #555;
}

.help-content strong {
    color: #667eea;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    margin: 5px 0;
    opacity: 0.9;
}

.footer a {
    color: white;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .greeting {
        font-size: 1em;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-group label {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input[type="text"] {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .drug-grid {
        grid-template-columns: 1fr;
    }
    
    .results-table {
        font-size: 0.85em;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px;
    }
}
/* 药品卡片链接样式 */
.drug-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: transform 0.3s ease;
}

.drug-card-link:hover {
    transform: translateY(-2px);
}

.drug-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.drug-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #4facfe;
}




/* 表格响应式优化 */
.results-table {
    overflow-x: auto;
    margin: 20px 0;
}

.results-table table {
    width: 100%;
    min-width: 800px;
    table-layout: fixed;
}

.results-table th,
.results-table td {
    padding: 12px;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
}

/* 分页样式优化 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination .page-link,
.pagination .current {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination .page-link:hover {
    background-color: #4facfe;
    color: white;
    border-color: #4facfe;
}

.pagination .current {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
    font-weight: bold;
}

