/**
 * 蔬食心得列表頁面樣式
 */

/* 頁面標題區 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header .header-content {
    flex: 1;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title i {
    color: #27ae60;
}

.page-subtitle {
    color: #7f8c8d;
    font-size: 16px;
}

/* 空狀態 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.empty-state i {
    font-size: 64px;
    color: #bdc3c7;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.empty-state p {
    color: #7f8c8d;
    margin-bottom: 24px;
}

/* 心得卡片網格 */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* 心得卡片 */
.story-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.story-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.story-cover {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f5f5f5;
}

.story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.story-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.story-cover-placeholder i {
    font-size: 48px;
    color: rgba(255,255,255,0.8);
}

.story-content {
    padding: 20px;
}

.story-mood {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.story-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-excerpt {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.benefit-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #e8f5e9;
    color: #27ae60;
    border-radius: 12px;
    font-size: 12px;
}

.benefit-tag i {
    font-size: 10px;
}

.benefit-more {
    padding: 4px 8px;
    background: #f0f0f0;
    color: #7f8c8d;
    border-radius: 12px;
    font-size: 12px;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.story-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #bdc3c7;
}

.author-name {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.story-stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #95a5a6;
}

.story-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 分頁 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.page-link:hover {
    background: #27ae60;
    color: #fff;
}

.page-link.active {
    background: #27ae60;
    color: #fff;
}

/* 我的心得列表樣式 */
.stories-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.story-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.story-item-main {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.story-item-cover {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.story-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-item-content {
    flex: 1;
    min-width: 0;
}

.story-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.story-item-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.story-item-title a {
    color: #2c3e50;
    text-decoration: none;
}

.story-item-title a:hover {
    color: #27ae60;
}

.story-item-badges {
    display: flex;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.badge-private {
    background: #ffeaa7;
    color: #d68910;
}

.story-item-excerpt {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-item-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #95a5a6;
}

.story-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.story-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-outline {
    background: transparent;
    border: 1px solid #e0e0e0;
    color: #666;
}

.btn-outline:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.btn-danger {
    color: #e74c3c;
    border-color: #e74c3c;
}

.btn-danger:hover {
    background: #e74c3c;
    color: #fff;
}

/* 響應式 */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .story-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .story-item-main {
        flex-direction: column;
        width: 100%;
    }
    
    .story-item-cover {
        width: 100%;
        height: 160px;
    }
    
    .story-item-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
    }
}
