/* 商铺订阅数据展示系统 - 样式文件 */

/* 基础样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    position: relative;
}

/* 商铺详情页容器 */
.shop-detail-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    position: relative;
}

/* 水印样式 */
.watermark {
    position: fixed;
    top: 25px;
    right: 10px;
    width: 100px;
    height: auto;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1000;
    border-radius: 45%;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #007bff;
    margin: 0;
    font-size: 28px;
}

/* 更新日期 */
.update-date {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

/* 规则筛选器样式 */
.rule-filter {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.rule-filter h3 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 16px;
}

.rule-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rule-tab {
    display: inline-block;
    padding: 8px 12px;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.rule-tab:hover {
    background: #e9ecef;
    color: #333;
}

.rule-tab.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 标签页样式 */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.tab {
    background: #007bff;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tab:hover {
    background: #0056b3;
    transform: scale(1.05);
    text-decoration: none;
    color: #ffffff;
}

.tab.active {
    background: #0056b3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 商铺列表样式 */
.shop-list h2 {
    color: #007bff;
    margin-bottom: 20px;
    font-size: 22px;
}

/* 商铺条目样式 */
.entry {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.entry:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.entry-header {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 10px;
}

.entry-body p {
    margin: 8px 0;
    font-size: 14px;
}

.entry-body strong {
    color: #333;
}

.entry-body a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.entry-body a:hover {
    text-decoration: underline;
}

/* 确保查看详情按钮的文字颜色正确显示 */
.entry-body .page-btn {
    color: #ffffff !important;
    background-color: #007bff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.entry-body .page-btn:hover {
    background-color: #0056b3;
    color: #ffffff !important;
    text-decoration: none;
}

/* 图片区域头部样式 */
.images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.images-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

/* 下载按钮样式 */
.download-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 140px;
    justify-content: center;
}

.download-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea080);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.download-btn:disabled {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.download-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .images-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .download-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* 图片样式 */
.entry-image {
    text-align: center;
    margin-top: 15px;
}

.image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.05);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.page-btn {
    background: #007bff;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.page-btn:hover {
    background: #0056b3;
    text-decoration: none;
    color: #ffffff;
}

.page-info {
    color: #666;
    font-size: 14px;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* 商铺详情页样式 */
.back-link {
    margin-bottom: 20px;
}

.back-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.back-link a:hover {
    text-decoration: underline;
}

.shop-header h2 {
    color: #007bff;
    font-size: 24px;
    margin-bottom: 20px;
}

.shop-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.shop-info p {
    margin: 10px 0;
    font-size: 16px;
}

.shop-info strong {
    color: #333;
}

/* 状态标签 */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-转让中 {
    background-color: #28a745;
    color: white;
}

.status-已下架 {
    background-color: #dc3545;
    color: white;
}

/* 地图和图片区域 */
.map-section, .images-section {
    margin: 30px 0;
}

.map-section h3, .images-section h3 {
    color: #007bff;
    margin-bottom: 15px;
}

/* 详情链接 */
.detail-link {
    text-align: center;
    margin-top: 30px;
}

.detail-btn {
    background: #007bff;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s ease;
}

.detail-btn:hover {
    background: #0056b3;
    text-decoration: none;
    color: #ffffff;
}

/* 错误页面样式 */
.error-container {
    text-align: center;
    padding: 40px 20px;
}

.error-header h1 {
    color: #dc3545;
    font-size: 36px;
    margin-bottom: 20px;
}

.error-message {
    margin: 30px 0;
    font-size: 18px;
    color: #666;
}

.error-actions {
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 0 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #0056b3;
    text-decoration: none;
    color: #ffffff;
}

.btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #545b62;
    text-decoration: none;
    color: #ffffff;
}

/* 首页样式 */
.welcome-message {
    text-align: center;
    margin: 30px 0;
}

.welcome-message h2 {
    color: #007bff;
    margin-bottom: 20px;
}

.welcome-message code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.instructions {
    margin-top: 30px;
}

.instructions h3 {
    color: #007bff;
    margin-bottom: 15px;
}

.instructions ul {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.instructions li {
    margin: 10px 0;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container, .shop-detail-container {
        margin: 10px;
        padding: 15px;
        max-width: none;
    }
    
    .watermark {
        width: 80px;
        top: 15px;
        right: 5px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .entry {
        padding: 12px;
    }
    
    .entry-header {
        font-size: 16px;
    }
    
    .entry-body p {
        font-size: 13px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .shop-info {
        padding: 15px;
    }
    
    .shop-info p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container, .shop-detail-container {
        margin: 5px;
        padding: 10px;
    }
    
    .watermark {
        width: 60px;
        top: 10px;
        right: 5px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .entry-header {
        font-size: 15px;
    }
    
    .entry-body p {
        font-size: 12px;
    }
    
    .shop-info p {
        font-size: 13px;
    }
}