/* 基础样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #9b59b6;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #7f8c8d;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --success-color: #27ae60;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

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

/* 导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-brand i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
}

.nav-link.admin-link {
    color: var(--danger-color);
    background: rgba(231, 76, 60, 0.1);
}

.nav-link.admin-link:hover {
    background: rgba(231, 76, 60, 0.2);
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
}

/* 控制区域 */
.controls-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.search-box {
    margin-bottom: 25px;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--light-color);
    border-radius: 12px;
    padding: 5px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-color);
    background: white;
}

.search-input-wrapper i {
    color: var(--gray-color);
    margin: 0 15px;
    font-size: 1.2rem;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: none;
    padding: 15px 10px;
    font-size: 1.1rem;
    outline: none;
    color: var(--dark-color);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.search-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
}

.clear-search {
    color: var(--danger-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-search:hover {
    text-decoration: underline;
}

/* 筛选控制 */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-controls label {
    font-weight: 500;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-select {
    padding: 12px 20px;
    border: 2px solid var(--light-color);
    border-radius: 10px;
    background: white;
    color: var(--dark-color);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 180px;
}

.sort-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

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

.order-btn {
    padding: 10px 20px;
    border: 2px solid var(--light-color);
    border-radius: 10px;
    background: white;
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.view-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.items-count {
    font-weight: 500;
    color: var(--dark-color);
    background: var(--light-color);
    padding: 10px 20px;
    border-radius: 10px;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    width: 45px;
    height: 45px;
    border: 2px solid var(--light-color);
    border-radius: 10px;
    background: white;
    color: var(--gray-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

/* 标签区域 */
.tags-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.tags-section h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--light-color);
    color: var(--dark-color);
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.tag-count {
    background: rgba(255, 255, 255, 0.3);
    color: inherit;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 全景卡片 - 网格视图 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.panorama-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.panorama-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

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

.panorama-thumbnail {
    height: 220px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    position: relative;
    overflow: hidden;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panorama-card:hover .thumbnail-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.overlay-content span {
    font-size: 1.2rem;
    font-weight: 500;
}

.thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
}

.thumbnail-placeholder i {
    font-size: 5rem;
    opacity: 0.8;
}

.card-body {
    padding: 25px;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.meta-date, .meta-views {
    display: flex;
    align-items: center;
    gap: 6px;
}

.panorama-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--dark-color);
    line-height: 1.3;
}

.panorama-description {
    color: var(--gray-color);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-small {
    padding: 6px 12px;
    background: var(--light-color);
    color: var(--dark-color);
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.view-btn {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.view-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.share-btn, .favorite-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--light-color);
    color: var(--gray-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

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

.favorite-btn:hover {
    background: var(--danger-color);
    color: white;
}

.favorite-btn.active {
    background: var(--danger-color);
    color: white;
}

/* 列表视图 */
.gallery-list .panorama-card {
    flex-direction: row;
    height: 200px;
}

.gallery-list .panorama-thumbnail {
    width: 300px;
    height: 100%;
    flex-shrink: 0;
}

.gallery-list .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-list .card-footer {
    flex-direction: column;
    justify-content: center;
    width: 150px;
    flex-shrink: 0;
    border-left: 1px solid #eee;
}

/* 空状态 */
.empty-gallery {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.empty-icon {
    font-size: 5rem;
    color: var(--light-color);
    margin-bottom: 25px;
}

.empty-gallery h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.empty-gallery p {
    color: var(--gray-color);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-back {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

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

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    color: var(--dark-color);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.page-ellipsis {
    padding: 0 10px;
    color: var(--gray-color);
    font-weight: 600;
}

.page-info {
    margin-left: 30px;
    padding: 12px 25px;
    background: var(--light-color);
    border-radius: 10px;
    font-weight: 500;
    color: var(--dark-color);
}

/* 页脚 */
.footer {
    margin-top: 80px;
    padding-top: 50px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p {
    color: var(--gray-color);
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

/* 缩略图样式 */

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-color);
    cursor: pointer;
    transition: color 0.3s;
}

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

.modal-body {
    padding: 30px;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.share-option {
    display: flex;
    gap: 15px;
}

.share-option input {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--light-color);
    border-radius: 10px;
    font-size: 1rem;
    background: #f9f9f9;
}

.copy-btn {
    padding: 15px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background: #2980b9;
}

.social-share {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.social-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn.facebook {
    background: #3b5998;
}

.social-btn.twitter {
    background: #1da1f2;
}

.social-btn.weibo {
    background: #e6162d;
}

.social-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 卡片链接样式 */
.panorama-thumbnail-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.panorama-thumbnail-link:hover .thumbnail-overlay {
    opacity: 1;
}

.panorama-thumbnail-link:hover .thumbnail-image {
    transform: scale(1.1);
}

.title-link {
    text-decoration: none;
    color: var(--dark-color);
    transition: color 0.3s;
}

.title-link:hover {
    color: var(--primary-color);
}

/* 改进卡片悬停效果 */
.panorama-card {
    position: relative;
    overflow: hidden;
}

.panorama-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 1;
}

.panorama-card:hover::before {
    transform: scaleX(1);
}

/* 改进缩略图样式 */
.panorama-thumbnail {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.panorama-thumbnail-link:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.overlay-content span {
    font-size: 1.2rem;
    font-weight: 500;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: white;
}

.thumbnail-placeholder i {
    font-size: 5rem;
    opacity: 0.8;
}

/* 改进卡片悬停动画 */
.panorama-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* 改进卡片内容区域 */
.card-body {
    padding: 25px;
    flex-grow: 1;
    position: relative;
}

.card-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25px;
    right: 25px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--light-color), transparent);
}

/* 改进按钮样式 */
.view-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transition: left 0.3s;
    z-index: -1;
}

.view-btn:hover::before {
    left: 0;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

/* 改进分享和收藏按钮 */
.share-btn, .favorite-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--light-color);
    color: var(--gray-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    position: relative;
    overflow: hidden;
}

.share-btn::before, .favorite-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s;
    z-index: -1;
}

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

.favorite-btn::before {
    background: var(--danger-color);
}

.share-btn:hover::before, .favorite-btn:hover::before {
    transform: scale(1);
}

.share-btn:hover, .favorite-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-controls, .view-controls {
        justify-content: space-between;
    }
    
    .gallery-list .panorama-card {
        flex-direction: column;
        height: auto;
    }
    
    .gallery-list .panorama-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .gallery-list .card-footer {
        width: 100%;
        border-left: none;
        border-top: 1px solid #eee;
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .page-header {
        padding: 30px 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .social-share {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .search-input-wrapper {
        flex-direction: column;
        padding: 15px;
    }
    
    .search-input-wrapper input {
        width: 100%;
        margin: 15px 0;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .order-buttons {
        width: 100%;
    }
    
    .order-btn {
        flex: 1;
        justify-content: center;
    }
}