/* ========================================
   Tags Page Styles
   ======================================== */

.tags-page {
    padding: 60px 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.tags-page .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.tags-page-header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.6s ease;
}

.tags-page-title {
    font-size: 3rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.tags-page-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #FF6B35;
    margin: 20px auto 0;
    border-radius: 2px;
}

.tags-page-description {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
}

/* Filter Section */
.tags-filter-section {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.tags-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.tags-search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

.tags-search-box input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.tags-search-box input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.tags-sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.tags-sort-options label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.tags-sort-options select {
    border: none;
    padding: 5px 10px;
    font-size: 1rem;
    cursor: pointer;
    background: transparent;
    color: #FF6B35;
    font-weight: 600;
}

.tags-sort-options select:focus {
    outline: none;
}

/* Tags Stats */
.tags-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.stat-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #f0f0f0;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.15);
    border-color: #FF6B35;
}

.stat-item i {
    font-size: 2.5rem;
    color: #FF6B35;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #333;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Section Title */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: #FF6B35;
}

/* Tags Cloud Section */
.tags-cloud-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s ease 0.4s both;
    border: 2px solid #f0f0f0;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.tag-cloud-item {
    display: inline-block;
    padding: 10px 20px;
    background: #FF6B35;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.tag-cloud-item:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
    background: #ff5722;
}

.tag-cloud-item.size-1 { font-size: 0.8rem; opacity: 0.7; }
.tag-cloud-item.size-2 { font-size: 0.9rem; opacity: 0.8; }
.tag-cloud-item.size-3 { font-size: 1rem; opacity: 0.9; }
.tag-cloud-item.size-4 { font-size: 1.2rem; opacity: 0.95; }
.tag-cloud-item.size-5 { font-size: 1.4rem; opacity: 1; }

/* Tags Grid Section */
.tags-grid-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s ease 0.5s both;
    border: 2px solid #f0f0f0;
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tag-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.5s ease;
    border: 2px solid #f0f0f0;
}

.tag-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #FF6B35;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tag-card:hover::before {
    transform: scaleX(1);
}

.tag-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.15);
    border-color: #FF6B35;
}

.tag-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tag-card-icon {
    font-size: 1.5rem;
    color: #FF6B35;
}

.tag-card-count {
    background: #fff5f2;
    color: #FF6B35;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tag-card-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    word-break: break-word;
    color: #333;
}

.tag-card-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Popular Tags Section */
.popular-tags-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s ease 0.6s both;
    border: 2px solid #f0f0f0;
}

.popular-tags-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.popular-tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-left: 4px solid #FF6B35;
}

.popular-tag-item:hover {
    background: #FF6B35;
    color: white;
    transform: translateX(5px);
}

.popular-tag-name {
    font-weight: 600;
    font-size: 1rem;
}

.popular-tag-count {
    background: white;
    color: #FF6B35;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.popular-tag-item:hover .popular-tag-count {
    background: rgba(255, 255, 255, 0.9);
    color: #FF6B35;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #FF6B35;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.loading-spinner p {
    margin: 0;
    color: #666;
}

/* No Tags Message */
.no-tags-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-tags-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #999;
}

.no-tags-message p {
    font-size: 1.1rem;
    margin: 0;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tags-page {
        padding: 40px 0;
    }

    .tags-page-title {
        font-size: 2rem;
    }

    .tags-page-description {
        font-size: 1rem;
    }

    .tags-filter-section {
        flex-direction: column;
    }

    .tags-sort-options {
        justify-content: space-between;
    }

    .tags-cloud-section,
    .tags-grid-section,
    .popular-tags-section {
        padding: 25px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .tags-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tags-page-title {
        font-size: 1.5rem;
    }

    .tags-stats {
        grid-template-columns: 1fr;
    }

    .popular-tags-list {
        grid-template-columns: 1fr;
    }
}
