/* ========== iart.city 全局样式 ========== */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #fff;
    min-height: 100vh;
}

/* ========== 首页样式 ========== */

.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.search-wrapper {
    width: 100%;
    max-width: 680px;
    padding: 0 20px;
}

/* Logo */
.site-title {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 8px;
}

.result-logo {
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -1px;
}

.title-i {
    color: #4285F4;
}

.title-art {
    color: #EA4335;
}

.title-dot {
    color: #FBBC05;
}

.title-city {
    color: #34A853;
}

.site-slogan {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

/* 搜索框 */
.search-box .input-group {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.search-box .input-group:focus-within {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.search-input {
    border: none;
    font-size: 16px;
    padding: 12px 24px;
    height: auto;
    box-shadow: none;
}

.search-input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.btn-search {
    background: #fff;
    border: none;
    padding: 0 24px;
    color: #4285F4;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search:hover {
    background: #f8f9fa;
    color: #1a73e8;
}

/* 快捷标签 */
.quick-tags {
    margin-top: 20px;
}

.tag-label {
    color: #999;
    font-size: 14px;
    margin-right: 8px;
}

.tag-link {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    background: #f1f3f4;
    border-radius: 16px;
    transition: all 0.2s;
}

.tag-link:hover {
    background: #e8eaed;
    color: #4285F4;
    text-decoration: none;
}

/* 分类导航 */
.category-item {
    padding: 20px 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.category-item:hover {
    transform: translateY(-4px);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.category-name {
    font-size: 14px;
    color: #555;
}

/* 导航栏 */
.nav-links .nav-link {
    font-size: 14px;
    padding: 8px 12px;
}

/* ========== 搜索结果页样式 ========== */

.search-header {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
    z-index: 100;
}

.search-header .search-input {
    background: transparent;
    border-radius: 24px 0 0 24px;
    border: 1px solid #dfe1e5;
}

.search-header .input-group {
    border-radius: 24px;
    overflow: hidden;
}

.search-header .input-group:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.15);
}

.search-header .btn-search {
    background: #f8f9fa;
    border: 1px solid #dfe1e5;
    border-left: none;
    border-radius: 0 24px 24px 0;
}

.result-tabs {
    padding: 0 15px;
}

.result-tabs .nav-link {
    color: #5f6368;
    font-size: 14px;
    padding: 12px 16px;
    border-bottom: 3px solid transparent;
}

.result-tabs .nav-link.active {
    color: #4285F4;
    border-bottom: 3px solid #4285F4;
    background: transparent;
}

.result-tabs .nav-link:hover {
    color: #4285F4;
}

/* 搜索结果列表 */
.result-count {
    padding: 0 8px;
}

.result-item {
    padding: 0 8px;
}

.result-title {
    font-size: 20px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.result-title a {
    text-decoration: none;
    color: #1a0dab;
}

.result-title a:hover {
    text-decoration: underline;
    color: #1a0dab;
}

.result-url {
    color: #006621;
}

.result-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #4d5156;
    margin-bottom: 8px;
}

.result-tags .badge {
    font-weight: normal;
    font-size: 12px;
    padding: 4px 8px;
    margin-right: 4px;
    background: #f1f3f4;
    color: #555;
    border-radius: 4px;
}

/* 带图片的结果 */
.result-image-wrap {
    border-radius: 8px;
    overflow: hidden;
    background: #f1f3f4;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 艺术家卡片 */
.artist-card {
    border: 1px solid #e8eaed;
    border-radius: 12px;
}

.artist-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f3f4;
}

.artist-stats {
    border-top: 1px solid #f1f3f4;
    padding-top: 12px;
}

.stat-number {
    font-size: 18px;
    font-weight: 600;
}

/* 相关搜索 */
.related-searches li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.related-searches li:last-child {
    border-bottom: none;
}

.related-searches a {
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.related-searches a:hover {
    color: #4285F4;
}

/* 分页 */
.pagination .page-link {
    color: #4285F4;
    border: 1px solid #dadce0;
    margin: 0 2px;
    border-radius: 4px !important;
}

.pagination .page-item.active .page-link {
    background: #4285F4;
    border-color: #4285F4;
}

/* 底部 */
.footer {
    color: #9aa0a6;
}

/* ========== 响应式 ========== */

@media (max-width: 768px) {
    .site-title {
        font-size: 42px;
    }
    
    .result-tabs .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .result-title {
        font-size: 18px;
    }
    
    .result-sidebar {
        margin-top: 20px;
    }
    
    .result-logo {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .site-title {
        font-size: 36px;
    }
    
    .search-box .input-group {
        border-radius: 24px;
    }
    
    .result-title {
        font-size: 16px;
    }
}

/* ========== 搜索高亮 ========== */
.highlight {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

.result-title-link {
    text-decoration: none;
    color: #1a0dab;
}

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

/* 热门关键词 */
.hot-keyword {
    font-size: 13px;
    text-decoration: none;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s;
}

.hot-keyword:hover {
    background: #e9ecef;
    text-decoration: none;
}

/* ========== 艺术家详情页 ========== */
.artist-cover {
    position: relative;
    color: #fff;
}

.artist-detail-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.artist-name {
    font-size: 42px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.artist-title {
    font-size: 16px;
    opacity: 0.95;
}

.tag-pill {
    display: inline-block;
    padding: 4px 14px;
    margin: 4px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    font-size: 13px;
}

.stats-bar {
    position: sticky;
    top: 66px;
    z-index: 99;
}

.stats-number {
    font-size: 24px;
    font-weight: 700;
}

.stats-label {
    font-size: 13px;
}

.artist-tabs {
    border-bottom: 2px solid #e8eaed;
}

.artist-tabs .nav-link {
    color: #5f6368;
    font-size: 15px;
    padding: 12px 20px;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.artist-tabs .nav-link.active {
    color: #4285F4;
    border-bottom-color: #4285F4;
    background: transparent;
    font-weight: 500;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #202124;
}

.border-left-primary {
    border-left: 4px solid #4285F4;
}

.artist-story {
    line-height: 1.9;
    font-size: 15px;
    text-indent: 2em;
}

/* 作品卡片 */
.work-card {
    border: 1px solid #e8eaed;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.work-image-wrap {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.work-image-wrap .work-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.3s;
}

.work-image-wrap:hover .work-image {
    transform: scale(1.05);
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.work-image-wrap:hover .work-overlay {
    opacity: 1;
}

.view-icon {
    color: #fff;
    font-size: 14px;
}

/* 时间线 (展览) */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 16px;
    width: 12px;
    height: 12px;
    background: #4285F4;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #4285F4;
}

/* 资讯链接 */
.news-link:hover {
    text-decoration: none;
}

.news-link h6:hover {
    color: #4285F4 !important;
}

/* 社交图标 */
.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.social-link:hover {
    opacity: 0.8;
}

/* 相关艺术家 */
.related-artist-item {
    transition: background 0.2s;
    border-radius: 8px;
}

.related-artist-item:hover {
    background: #f8f9fa;
}

/* 关注按钮 */
.follow-btn.followed {
    background: #28a745;
    border-color: #28a745;
}

.follow-btn.followed:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* 面包屑 */
.breadcrumb {
    font-size: 13px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #999;
}

.breadcrumb-item a {
    color: #5f6368;
}

.breadcrumb-item.active {
    color: #202124;
}

/* 返回顶部按钮已在 main.js 中动态添加 */

/* 模态框 */
#imageModal .modal-content {
    max-width: 90vw;
}

#imageModal .modal-body img {
    max-height: 80vh;
}

/* 艺术家详情页响应式 */
@media (max-width: 768px) {
    .artist-detail-avatar {
        width: 120px;
        height: 120px;
    }
    
    .artist-name {
        font-size: 30px;
    }
    
    .stats-bar {
        top: 110px;
    }
    
    .artist-tabs .nav-link {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .artist-detail-avatar {
        width: 100px;
        height: 100px;
    }
    
    .artist-name {
        font-size: 24px;
    }
    
    .stats-number {
        font-size: 18px;
    }
}

/* ========== 搜索结果 - 视图切换控件 ========== */
.view-toggle {
    display: flex;
    border: 1px solid #dadce0;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

.view-btn {
    padding: 6px 10px;
    border: none;
    background: #fff;
    color: #5f6368;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-btn:hover {
    background: #f8f9fa;
    color: #202124;
}

.view-btn.active {
    background: #4285F4;
    color: #fff;
}

/* ========== 卡片视图 ========== */
.result-view.card-view > .row {
    width: 100%;
    margin: 0;
}

.art-card {
    border: 1px solid #e8eaed;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
    display: flex;
    flex-direction: column;
}

.art-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    border-color: #4285F4;
}

/* 封面 */
.art-card-img-wrap {
    position: relative;
    display: block;
    padding-top: 100%;   /* 1:1 正方形 */
    overflow: hidden;
    background: #f1f3f4;
    text-decoration: none;
}

.art-card-img {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.art-card:hover .art-card-img {
    transform: scale(1.08);
}

.art-card-img-placeholder {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: #fff;
}

/* 类型徽章 */
.art-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    backdrop-filter: blur(6px);
}

/* 颜色体系 */
.color-blue   { background: rgba(66,133,244,0.9); }
.color-red     { background: rgba(234,67,53,0.9); }
.color-green   { background: rgba(52,168,83,0.9); }
.color-purple  { background: rgba(156,39,176,0.9); }
.color-orange  { background: rgba(255,152,0,0.9); }
.color-gray    { background: rgba(120,120,120,0.9); }

/* 卡片内容 */
.art-card-body {
    padding: 14px 16px 10px;
    flex: 1;
}

.art-card-title {
    font-size: 15px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.art-card-title a {
    color: #202124;
    text-decoration: none;
}

.art-card-title a:hover {
    color: #4285F4;
}

.art-card-url {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.art-card-desc {
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.art-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag-chip {
    display: inline-block;
    padding: 2px 8px;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 11px;
    border-radius: 10px;
}

/* 卡片底部 */
.art-card-footer {
    padding: 0 16px 14px;
}

.art-card-footer .btn-outline-primary {
    border-radius: 20px;
    font-size: 13px;
}

/* ========== 列表视图 ========== */
.result-view.list-view {
    max-width: 1100px;
    margin: 0 auto;
}

.art-list-item {
    border: 1px solid #e8eaed;
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 16px 20px;
    transition: all 0.2s;
}

.art-list-item:hover {
    border-color: #4285F4;
    box-shadow: 0 4px 16px rgba(66,133,244,0.1);
    text-decoration: none;
}

.art-list-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.art-list-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: #fff;
    flex-shrink: 0;
}

.art-list-title {
    font-size: 17px;
    color: #202124;
}

.art-list-item:hover .art-list-title {
    color: #4285F4;
}

/* 搜索高亮 */
.highlight {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

/* 响应式 */
@media (max-width: 992px) {
    .art-card-img-wrap { padding-top: 80%; }
}

@media (max-width: 576px) {
    .view-btn { padding: 5px 8px; }

    .art-list-item { padding: 12px; }
    .art-list-img, .art-list-placeholder { width: 80px; height: 80px; font-size: 30px; }
}
