/* 標籤系統樣式 */

/* ===== 標籤列表頁 ===== */
.tags-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tags-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.tags-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tags-subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
}

.tags-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-back,
.btn-home {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid #667eea;
    transition: all 0.3s ease;
}

.btn-back:hover,
.btn-home:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 標籤雲 */
.tags-cloud {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.tag-cloud-item:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.tag-count {
    font-size: 0.875em;
    opacity: 0.9;
}

/* 標籤統計 */
.tags-stats {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stats-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.tags-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.tag-list-item {
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tag-list-item:hover {
    background: #eff6ff;
    transform: translateX(4px);
}

.tag-list-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: inherit;
}

.tag-list-name {
    font-weight: 600;
    color: #667eea;
}

.tag-list-count {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 無標籤提示 */
.no-tags {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.no-tags p {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.btn-create {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ===== 標籤文章列表頁 ===== */
.tag-articles-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tag-header {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 2rem;
}

.tag-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tag-icon {
    font-size: 2rem;
}

.tag-description {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.tag-count {
    font-size: 1rem;
    opacity: 0.9;
}

.tag-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 文章列表中的標籤 */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tag-current {
    background: #4ade80;
    font-weight: 600;
}

/* 文章詳情頁標籤 */
.article-tags-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    text-decoration: none;
    border: 2px dashed #a5b4fc;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.08);
}

.tag-link:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
    border-style: solid;
    color: #5b6dd6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
    .tags-title {
        font-size: 2rem;
    }

    .tags-cloud {
        padding: 2rem 1rem;
        gap: 1rem;
    }

    .tag-cloud-item {
        font-size: 0.875rem !important;
    }

    .tags-list {
        grid-template-columns: 1fr;
    }

    .tag-title {
        font-size: 2rem;
        flex-direction: column;
    }

    .tag-navigation {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tags-header {
        padding: 1.5rem 1rem;
    }

    .tags-title {
        font-size: 1.5rem;
    }

    .tag-header {
        padding: 2rem 1rem;
    }

    .tag-title {
        font-size: 1.5rem;
    }
}
