/* 红心页面增强样式 */

/* 主内容区域调整 */
.main-content {
    padding: 1rem;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
}

/* 统计头部 */
.stats-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.stats-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: 0;
}

/* 统计卡片增强 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.stat-icon {
    font-size: 2.2rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #ffd93d 0%, #ff9a3c 100%);
    color: white;
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-desc {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}

/* 搜索区域优化 */
.search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.search-section h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.search-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.search-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-type-selector {
    flex: 0 0 auto;
}

.search-type {
    padding: 0.85rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    min-width: 150px;
    backdrop-filter: blur(5px);
}

.search-type option {
    background: #667eea;
    color: white;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.85rem 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(5px);
    transition: border-color 0.3s;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-button:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.btn-clear {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-hint {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #4ecdc4;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.search-hint p {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 显示区域 */
.display-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.6rem;
    color: #2d3436;
    margin: 0;
}

.result-count {
    color: #667eea;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 表格样式增强 */
.results-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #eee;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

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

.results-table th {
    color: white;
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.results-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

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

.results-table td {
    padding: 1.2rem 1rem;
    color: #555;
}

.results-table td strong {
    color: #2d3436;
}

.results-table td code {
    background: #f1f3f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e74c3c;
}

.display-format {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
}

/* 红心卡片网格 */
.hearts-grid-container {
    margin-top: 1rem;
}

.hearts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

}
/* 红心卡片样式 - 修复显示问题 */
.heart-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    text-align: center;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.heart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.heart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.heart-rank {
    background: #f8f9fa;
    color: #667eea;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
}

.heart-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
}

.heart-card-body {
    margin-bottom: 1rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移除不需要的原始名字显示 */
.heart-original {
    display: none !important;
}

.heart-user-display {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3436;
    letter-spacing: 0.5px;
    word-break: break-word;
    line-height: 1.3;
}

.heart-card-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.heart-time {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.time-icon {
    font-size: 1rem;
}
/* 无数据状态 */
.no-results, .no-hearts {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-icon, .no-hearts-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.no-results h3, .no-hearts h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.75rem;
}

.no-results p, .no-hearts p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-back, .btn-go-home {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-back:hover, .btn-go-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-count {
        align-self: flex-start;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-type, .search-input, .search-button {
        width: 100%;
    }
    
    .hearts-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .display-section {
        padding: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hearts-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}