/* 全局样式 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white-color: #ffffff;
    --muted-color: #6c757d;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white-color);
}
/*.container, .container-lg, .container-md, .container-sm, .container-xl {
        max-width: 1440px;
    }*/
/* 导航栏样式 */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand i {
    font-size: 1.8rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* 搜索框样式 */
.input-group-text {
    border-color: var(--border-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 英雄区域样式 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white-color);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="gift" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23gift)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 分类区域样式 */
.category-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.category-section:last-child {
    border-bottom: none;
}

.category-section h2 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.category-section p {
    color: var(--muted-color);
    font-size: 0.95rem;
}

/* GIF卡片样式 */
.gif-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.gif-card .card-img-top {
    /*height: 200px;*/
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gif-card:hover .card-img-top {
    transform: scale(1.05);
}

.gif-card .card-body {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.gif-card .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* 徽章样式 */
.badge-secondary {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

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

/* 链接样式 */
.text-primary {
    color: var(--primary-color) !important;
}

.text-primary:hover {
    color: #0056b3 !important;
    text-decoration: none;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

footer h5 {
    color: var(--dark-color);
    font-weight: 600;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .category-section h2 {
        font-size: 1.5rem;
    }
    
    .gif-card .card-img-top {
        height: 150px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .category-section {
        padding: 1.5rem 0;
    }
    
    .gif-card .card-img-top {
       /* height: 120px;*/
       height: auto;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation: fadeInUp 0.6s ease-out;
}

.gif-card {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 6px;
}

/* 模态框样式 */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
}

/* 按钮样式增强 */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* 卡片悬停效果增强 */
.card {
    transition: all 0.3s ease;
}

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

/* 图片懒加载占位符 */
.img-placeholder {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .input-group {
        margin: 1rem 0;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .category-section {
        margin-bottom: 2rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .btn,
    .badge {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: var(--dark-color) !important;
    }
    
    .gif-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* GIF详情页面样式 */
.max-w-4xl {
    max-width: 1200px;
}

.space-y-4 > * + * {
    margin-top: 1.5rem;
}

.space-y-4 > *:first-child {
    margin-top: 0;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.flex-fill {
    flex: 1 1 auto;
}

.object-cover {
    object-fit: cover;
}

/* 按钮样式增强 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-outline-secondary {
    background-color: transparent;
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.badge-secondary {
    background-color: #007bff;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.badge-pill {
    border-radius: 50rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.badge-primary {
    background-color: #007bff;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.badge-outline-secondary {
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 卡片样式增强 */
.card {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

.gif-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gif-card img {
    transition: transform 0.3s ease;
}

.gif-card:hover img {
    transform: scale(1.05);
}

/* 图片容器样式 */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.bottom-0 {
    bottom: 0;
}

.right-0 {
    right: 0;
}

.m-2 {
    margin: 0.5rem;
}

/* 文本样式 */
.text-decoration-none {
    text-decoration: none;
}

.text-decoration-none:hover {
    text-decoration: none;
}

/* 背景样式 */
.bg-light {
    background-color: #f8f9fa !important;
}

/* 圆角样式 */
.rounded {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* 阴影样式 */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* 间距样式 */
.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

/* 字体样式 */
.font-weight-bold {
    font-weight: 700;
}

.font-weight-medium {
    font-weight: 500;
}

.h2 {
    font-size: 2rem;
    font-weight: 700;
}

.h3 {
    font-size: 1.75rem;
    font-weight: 700;
}

.h5 {
    font-size: 1.25rem;
    font-weight: 700;
}

.h6 {
    font-size: 1rem;
    font-weight: 700;
}

/* 颜色样式 */
.text-primary {
    color: #007bff !important;
}

.text-muted {
    color: #6c757d !important;
    
}

.text-danger {
    color: #dc3545 !important;
}

/* 布局样式 */
.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
    gap:5px;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .max-w-4xl {
        max-width: 100%;
    }
    
    .space-y-4 > * + * {
        margin-top: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .h2 {
        font-size: 1.5rem;
    }
    
    .h3 {
        font-size: 1.25rem;
    }
}

/* 图片占位符样式 */
.img-placeholder {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 3rem;
}

/* 社交媒体按钮样式 */
.btn-outline-secondary .fab,
.btn-outline-secondary .fas {
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover .fab,
.btn-outline-secondary:hover .fas {
    transform: scale(1.1);
}

/* 统计信息样式 */
.text-muted.small {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 标签容器样式 */
.d-flex.flex-wrap.gap-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 按钮组样式 */
.d-flex.flex-wrap.gap-3 {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.d-flex.gap-2.flex-wrap {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 统计信息容器样式 */
.d-flex.align-items-center.gap-4 {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .d-flex.flex-wrap.gap-3 {
        flex-direction: column;
    }
    
    .d-flex.align-items-center.gap-4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
}

/* 博客卡片样式 */
.blog-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-card .card-title a:hover {
    color: #007bff !important;
}

.blog-card .card-img-top {
    transition: transform 0.3s ease;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

/* 博客页面特定样式 */
.display-4 {
    font-size: 2.5rem;
    font-weight: 700;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

/* 博客徽章样式 */
.blog-card .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

/* 响应式博客布局 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .blog-card .card-title {
        font-size: 1.1rem;
    }
}

/* 博客详情页面样式 */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ol {
    padding-left: 1.5rem;
}

.article-content ol li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.article-content .bg-light {
    background-color: #f8f9fa !important;
    border-left: 4px solid #007bff;
}

/* 博客详情页面响应式 */
@media (max-width: 768px) {
    .article-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
        margin-top: 1.25rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
}
a:link, a:visited, a:hover, a:active {
  text-decoration: none;
}
.detail-img{
    object-fit: cover;
    border-radius: 10px;
}

/* Share button styles */
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.share-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
    text-decoration: none;
}

.share-btn i {
    margin-right: 6px;
    font-size: 16px;
}

/* Platform-specific colors */
.share-btn[data-share="facebook"]:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.share-btn[data-share="twitter"]:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.share-btn[data-share="whatsapp"]:hover {
    background: #25d366;
    border-color: #25d366;
    color: white;
}

.share-btn[data-share="telegram"]:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: white;
}

.share-btn[data-share="email"]:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Copy success message animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.copy-success-msg {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Responsive share buttons */
@media (max-width: 576px) {
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .share-btn i {
        font-size: 14px;
    }
}

/* GIF detail page share buttons */
.gif-detail .share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gif-detail .share-buttons button {
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Share button hover effects for GIF detail page */
.btn-outline-secondary[data-share]:hover,
.btn-outline-secondary[data-copy-link]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Platform-specific colors for share buttons */
.btn-outline-secondary[data-share="facebook"]:hover {
    background-color: #1877f2;
    border-color: #1877f2;
    color: white;
}

.btn-outline-secondary[data-share="twitter"]:hover {
    background-color: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.btn-outline-secondary[data-share="whatsapp"]:hover {
    background-color: #25d366;
    border-color: #25d366;
    color: white;
}

.btn-outline-secondary[data-copy-link]:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.star-icon.filled {
    color: #ffc107;
}
.star-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
    cursor: pointer;
    display: inline-block;
    transition: color 0.2s ease;
}