/* 🎨 狗狗溯源系统 - 现代化CSS样式 */

/* ============================================================================
   🎯 全局变量和基础样式
   ============================================================================ */



:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --text-color: #2d3748;
    --bg-color: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* ============================================================================
   📱 二维码样式
   ============================================================================ */

/* ============================================================================
   🐕 狗狗溯源信息样式
   ============================================================================ */

.dog-tracing-info h3 {
    background: none;
    color: var(--primary-color);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.4em;
    font-weight: bold;
    box-shadow: none;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 500px;
}

.tracing-section h4 {
    background: none;
    color: var(--primary-color);
    padding: 0;
    border-radius: 0;
    margin-bottom: 20px;
    border-left: none;
    display: flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: 600;
    position: relative;
}

/* 核验标识样式 */
.verification-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
}

.verification-badge.verified {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* 字段验证标识 */
.field-verified {
    display: inline-block;
    margin-left: 8px;
    color: #f59e0b;
    font-size: 1.1em;
    animation: fadeInScale 0.3s ease-in-out;
}

.field-verified i {
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}

/* 字段标签图标样式 */
.tracing-label i {
    margin-right: 6px;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

/* 标题图标样式 */
.tracing-section h4 i,
.tracing-section h5 i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* 功能区域图标样式 */
.search-tips h3 i,
.system-stats h2 i,
.recent-dogs-section h2 i,
.features-section h2 i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 0.9em;
}

/* 提示项图标样式 */
.tip-icon i {
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 10px;
}

/* 统计卡片图标样式 */
.stat-icon i {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 15px;
}

/* 功能项图标样式 */
.feature-icon i {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 20px;
}

/* 核验标识动画 */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.qr-code-container {
    position: relative;
    text-align: center;
    width: 120px;
    margin: 0;
    overflow: visible;
    min-height: 140px;
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #667eea;
    float: right;
    margin-left: 20px;
    margin-bottom: 10px;
}

.qr-code-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.qr-code-container canvas,
.qr-code-container img {
    border: none;
    border-radius: 6px;
    width: 120px;
    height: 120px;
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    margin: 0 auto;
}

.qr-code-container canvas:hover,
.qr-code-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.qr-code-fallback {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.qr-code-fallback::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.qr-code-title {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.qr-code-url {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    word-break: break-all;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.qr-code-tip {
    font-size: 1em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.download-qr-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.download-qr-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

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

.download-qr-btn:hover::before {
    left: 100%;
}

/* 二维码加载动画 */
.qr-code-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

.qr-code-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================================
   🖼️ 图片预览样式
   ============================================================================ */

.dog-image {
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
    max-width: 100%;
    height: auto;
}

.dog-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
}

.image-preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-preview {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2em;
    cursor: pointer;
    background: none;
    border: none;
}

/* ============================================================================
   🎨 模态框样式
   ============================================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-modal {
    font-size: 2em;
    cursor: pointer;
    color: var(--text-color);
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    color: var(--error-color);
}

.modal .vaccination-form {
    padding: 25px;
    margin: 0;
    box-shadow: none;
    border: none;
}

/* ============================================================================
   💉 疫苗接种记录样式
   ============================================================================ */

.vaccination-section {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.vaccination-record {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 15px 0;
    box-shadow: var(--shadow);
}

.vaccination-record h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.vaccination-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.vaccination-detail {
    display: flex;
    flex-direction: column;
}

.vaccination-detail label {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 5px;
}

.vaccination-detail span {
    color: var(--text-color);
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.vaccination-form {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.vaccination-form h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1em;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--warning-color);
    color: white;
}

.btn-secondary:hover {
    background: #dd6b20;
    transform: translateY(-2px);
}

/* ============================================================================
   🔍 搜索功能样式
   ============================================================================ */

.search-container {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin: 30px 0;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1.1em;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results {
    margin-top: 20px;
}

.search-result-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 10px 0;
    transition: var(--transition);
    cursor: pointer;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

/* 搜索结果样式 */
.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px;
}

.search-results-list {
    padding: 0;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

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

.result-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
}

.result-code {
    color: #007cba;
    font-size: 14px;
    margin-bottom: 3px;
}

.result-name {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.result-link {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.result-link:hover {
    text-decoration: underline;
}

.search-suggestions {
    padding: 20px;
    text-align: center;
}

.suggestion-item {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.suggestion-item:first-child {
    color: #dc3545;
    font-weight: 600;
    font-size: 16px;
}

/* 搜索输入框容器相对定位 */
.main-search-form {
    position: relative;
}

/* ============================================================================
   📊 统计和状态样式
   ============================================================================ */

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-color);
    font-size: 1.1em;
}

/* ============================================================================
   🎨 响应式设计
   ============================================================================ */

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .vaccination-details {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .qr-code-container {
        padding: 20px;
        margin: 20px 0;
        overflow: visible;
        min-height: 190px;
    }
    
    .qr-code-container canvas,
    .qr-code-container img {
        width: 130px;
        height: 130px;
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 auto;
    }
    
    .image-preview-content {
        max-width: 95%;
        max-height: 95%;
    }
}

/* ============================================================================
   🎭 动画效果
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* ============================================================================
   🎯 加载状态
   ============================================================================ */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================================
   🎨 主题色彩
   ============================================================================ */

.theme-primary { color: var(--primary-color); }
.theme-secondary { color: var(--secondary-color); }
.theme-success { color: var(--success-color); }
.theme-warning { color: var(--warning-color); }
.theme-error { color: var(--error-color); }

.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-success { background-color: var(--success-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-error { background-color: var(--error-color); }

/* ============================================================================
   🖼️ 图片显示样式
   ============================================================================ */

.dog-image {
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 400px;
}

.dog-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.no-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3em;
    border-radius: var(--border-radius);
    opacity: 0.8;
}

.dog-photo-container {
    text-align: center;
    margin: 20px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    border-radius: var(--border-radius);
    padding: 30px;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dog-photo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.05) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(102, 126, 234, 0.02) 50%, transparent 70%);
    pointer-events: none;
}

.dog-photo-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(102, 126, 234, 0.01) 10px,
            rgba(102, 126, 234, 0.01) 20px
        );
    pointer-events: none;
}

.dog-photo-container img {
    max-width: 80%;
    max-height: 400px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
    background: white;
    padding: 10px;
}

.lineage-photo {
    margin-top: 15px;
    text-align: center;
}

.lineage-photo img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.search-result-image,
.post-card-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.search-result-image img,
.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.search-result-image .no-image-placeholder,
.post-card-image .no-image-placeholder {
    height: 200px;
    font-size: 2em;
}

/* ============================================================================
   🏠 溯源查询首页样式
   ============================================================================ */

.tracing-search-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.2em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-authority {
    font-size: 1.1em;
    margin-bottom: 40px;
    opacity: 0.85;
    color: #e8f4fd;
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-search-container {
    max-width: 600px;
    margin: 0 auto 40px;
}

.main-search-form {
    width: 100%;
}

.search-input-group {
    display: flex;
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.main-search-input {
    flex: 1;
    padding: 18px 20px;
    border: none;
    font-size: 1.1em;
    outline: none;
}

.main-search-input::placeholder {
    color: #999;
}

.main-search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 18px 30px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-search-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.search-icon {
    font-size: 1.2em;
}

.search-tips {
    margin-top: 40px;
}

.search-tips h3 {
    margin-bottom: 30px;
    font-size: 1.5em;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.tip-item {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.tip-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.15);
}

.tip-icon {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.tip-content h4 {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 1.2em;
}

.tip-content p {
    color: #64748b;
    font-size: 0.95em;
}

/* 系统统计样式 */
.system-stats {
    background: var(--bg-color);
    padding: 40px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.system-stats h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 1.8em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    color: #64748b;
}

/* 最新狗狗区域 */
.recent-dogs-section {
    background: var(--bg-color);
    padding: 40px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.recent-dogs-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

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

.recent-dog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.recent-dog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.recent-dog-card .dog-image {
    height: 200px;
    overflow: hidden;
}

.recent-dog-card .dog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-dog-card .dog-info {
    padding: 20px;
}

.recent-dog-card h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.recent-dog-card .tracing-code {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.recent-dog-card .view-details {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

.recent-dog-card .view-details:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* 功能说明区域 */
.features-section {
    background: var(--bg-color);
    padding: 40px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.features-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.feature-item h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.3em;
}

.feature-item p {
    color: #64748b;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2em;
    }
    
    .hero-subtitle {
        font-size: 1.1em;
    }
    
    .hero-authority {
        font-size: 1em;
        padding: 12px 15px;
        margin-bottom: 30px;
    }
    
    .dog-tracing-info h3 {
        min-width: 250px;
        max-width: 90%;
        font-size: 1.2em;
        padding: 12px 20px;
    }
    
    .tracing-section h4 {
        min-width: 200px;
        max-width: 90%;
        font-size: 1.1em;
        padding: 10px 15px;
    }
    
    .verification-badge {
        font-size: 0.7em;
        padding: 3px 6px;
        margin-left: 8px;
    }
    
    .field-verified {
        margin-left: 6px;
        font-size: 1em;
    }
    
    .tip-icon i,
    .stat-icon i,
    .feature-icon i {
        font-size: 1.2em;
        margin-bottom: 8px;
        color: #667eea;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .main-search-btn {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .main-search-input {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .recent-dogs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 1.8em;
    }
    
    .hero-authority {
        font-size: 0.95em;
        padding: 10px 12px;
        margin-bottom: 25px;
    }
    
    .dog-tracing-info h3 {
        min-width: 200px;
        max-width: 95%;
        font-size: 1.1em;
        padding: 10px 15px;
    }
    
    .tracing-section h4 {
        min-width: 180px;
        max-width: 95%;
        font-size: 1em;
        padding: 8px 12px;
    }
    
    .verification-badge {
        font-size: 0.65em;
        padding: 2px 5px;
        margin-left: 6px;
    }
    
    .field-verified {
        margin-left: 4px;
        font-size: 0.9em;
    }
    
    .tip-icon i,
    .stat-icon i,
    .feature-icon i {
        font-size: 1em;
        margin-bottom: 6px;
        color: #667eea;
    }
    
    .main-search-input {
        padding: 16px 20px;
        font-size: 1em;
        border-radius: 12px;
        border: 2px solid #e2e8f0;
        transition: all 0.3s ease;
    }
    
    .main-search-input:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        outline: none;
    }
    
    .main-search-btn {
        padding: 16px 24px;
        font-size: 1.1em;
        font-weight: 600;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        border: none;
        color: white;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 50px;
    }
    
    .main-search-btn:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    .main-search-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    }
    
    .search-icon {
        font-size: 1.2em;
    }
    
    /* 移动端功能卡片优化 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }
    
    .feature-item {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .feature-icon {
        font-size: 2.5em;
        margin-bottom: 15px;
    }
    
    .feature-item h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .feature-item p {
        font-size: 0.9em;
        line-height: 1.4;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 5px;
    }
    
    .feature-item {
        padding: 15px 10px;
    }
    
    .feature-icon {
        font-size: 2em;
        margin-bottom: 10px;
    }
    
    .feature-item h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .feature-item p {
        font-size: 0.8em;
        line-height: 1.3;
    }
    
    .hero-title {
        font-size: 1.6em;
    }
    
    .hero-authority {
        font-size: 0.9em;
        padding: 8px 10px;
    }
    
    /* 超小屏幕查询按钮优化 */
    .main-search-btn {
        padding: 14px 20px;
        font-size: 1em;
        min-height: 45px;
    }
    
    .search-icon {
        font-size: 1.1em;
    }
    
    /* 超小屏幕输入框优化 */
    .main-search-input {
        padding: 14px 18px;
        font-size: 0.95em;
    }
    
    /* 超小屏幕二维码优化 */
    .qr-code-container {
        padding: 15px;
        margin: 15px 0;
        overflow: visible;
        min-height: 160px;
    }
    
    .qr-code-container canvas,
    .qr-code-container img {
        width: 120px;
        height: 120px;
        max-width: 100%;
        height: auto;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .qr-code-container {
        width: 100px;
        min-height: 120px;
        padding: 6px;
        float: none;
        margin: 0 auto 15px auto;
        display: block;
    }
    
    .qr-code-container canvas,
    .qr-code-container img {
        width: 100px;
        height: 100px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .qr-code-container {
        width: 90px;
        min-height: 110px;
        padding: 5px;
    }
    
    .qr-code-container canvas,
    .qr-code-container img {
        width: 90px;
        height: 90px;
    }
}

/* 整体布局优化 */
.entry-header {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.tracing-code-display {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: bold;
    margin-bottom: 15px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* 内容区域优化 */
.entry-content {
    margin-top: 10px;
}

.dog-tracing-info {
    margin-top: 15px;
}

/* 移动端布局优化 */
@media (max-width: 768px) {
    .entry-header {
        margin-bottom: 15px;
    }
    
    .tracing-code-display {
        padding: 6px 12px;
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .entry-content {
        margin-top: 5px;
    }
    
    .dog-tracing-info {
        margin-top: 10px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .tracing-code-display {
        padding: 5px 10px;
        font-size: 13px;
        margin-bottom: 8px;
    }
}

/* 用户登录/注册区域样式 */
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.user-auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.login-btn {
    background-color: #f8f9fa;
    color: #495057;
    border-color: #dee2e6;
}

.login-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.register-btn {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.register-btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.logout-btn:hover {
    background-color: #c82333;
    border-color: #c82333;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-text {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-auth-section {
        width: 100%;
        justify-content: center;
    }
    
    .auth-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .auth-btn {
        flex: 1;
        justify-content: center;
        max-width: 120px;
    }
}

/* 登录注册页面样式 */
.auth-page {
    max-width: 450px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.auth-page h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2em;
    font-weight: 700;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--primary-color);
    width: 16px;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #495057;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #a0aec0;
}

.form-group small {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 4px;
}

.auth-submit-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

.auth-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-links p {
    margin: 10px 0;
    color: #495057;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.error-message {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #feb2b2;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.success-message {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #9ae6b4;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-page {
        margin: 30px auto;
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .auth-page h1 {
        font-size: 1.75em;
    }
}

@media (max-width: 480px) {
    .auth-page {
        margin: 20px auto;
        padding: 25px 15px;
    }
    
    .auth-page h1 {
        font-size: 1.5em;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .auth-submit-btn {
        padding: 12px 16px;
        font-size: 16px;
    }
}

/* 登录提示区域样式 */
.login-required-container {
    max-width: 500px;
    margin: 30px auto;
    text-align: center;
}

.login-required-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-required-message i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
    opacity: 0.9;
}

.login-required-message h2 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

.login-required-message p {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.login-required-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.login-required-buttons .auth-btn {
    min-width: 140px;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-required-buttons .login-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.login-required-buttons .login-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.login-required-buttons .register-btn {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.login-required-buttons .register-btn:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-required-container {
        margin: 20px auto;
    }
    
    .login-required-message {
        padding: 30px 20px;
    }
    
    .login-required-message h2 {
        font-size: 20px;
    }
    
    .login-required-message p {
        font-size: 14px;
    }
    
    .login-required-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .login-required-buttons .auth-btn {
        width: 100%;
        max-width: 200px;
    }
}
