/* ===== MODERN TRENDING UI DESIGN ===== */

/* Skeuomorphic Trending Header */
.modern-trending-header {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.12),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.1);
    border: 3px solid #c0c4c8;
    position: relative;
}

.modern-trending-header::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 18px 18px 0 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.trending-title-section {
    flex: 1;
    min-width: 300px;
}

.trending-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Baloo 2', cursive;
}

.trending-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.header-stats {
    display: flex;
    gap: 20px;
}

/* Skeuomorphic Trending Stats */
.trending-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(145deg, #ff6b35, #f7931e, #ff8c42);
    border-radius: 12px;
    box-shadow: 
        0 8px 20px rgba(255, 107, 53, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #e55a00;
    min-width: 140px;
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2), rgba(255,255,255,0.6));
    border-radius: 10px 10px 0 0;
}

.stat-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Featured Trending Banner */
.featured-trending-banner {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff8c42 100%);
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 
        0 12px 30px rgba(255, 107, 53, 0.3),
        0 6px 15px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border: 2px solid #e55a00;
    position: relative;
    overflow: visible;
    min-height: 140px;
}

.featured-trending-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
    min-height: 120px;
}

.banner-text {
    flex: 1;
    min-width: 300px;
}

.banner-text h2 {
    font-size: 1.8rem;
    color: white;
    margin: 0 0 8px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.banner-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.trending-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1.1rem;
}

.refresh-btn {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.refresh-btn:hover {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    transform: translateY(1px);
}

.refresh-btn:active {
    background: linear-gradient(145deg, #d9d9d9, #f0f0f0);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.2),
        inset 0 -2px 4px rgba(255,255,255,0.8);
    transform: translateY(2px);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Trending Navigation Tabs */
.trending-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.trending-tab {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.trending-tab::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 10px 10px 0 0;
}

.trending-tab:hover {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    transform: translateY(1px);
}

.trending-tab.active {
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    color: white;
    border-color: #e55a00;
    box-shadow: 
        0 6px 15px rgba(255, 107, 53, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-text {
    font-size: 0.9rem;
}

/* Filter Container - Skeuomorphic */
.filter-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
    align-items: stretch;
}

.filter-toggle-section {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    width: 100%;
}

.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(145deg, #ffffff, #f0f2f5, #e8eaed);
    border: 2px solid #c0c4c8;
    border-radius: 12px;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Baloo 2', cursive;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    min-width: auto;
    max-width: 140px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
}

.filter-toggle-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 10px 10px 0 0;
}

.filter-toggle-btn:hover {
    background: linear-gradient(145deg, #f8fafc, #e8eaed, #ddd);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.2),
        0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    border-color: #adb5bd;
}

.filter-toggle-btn:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 -2px 4px rgba(255, 255, 255, 0.8);
}

.filter-toggle-btn.active {
    background: linear-gradient(145deg, #3b82f6, #2563eb, #1d4ed8);
    color: white;
    border-color: #1e40af;
    box-shadow: 
        0 6px 15px rgba(59, 130, 246, 0.4),
        0 3px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.filters-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
    border-radius: 18px;
    border: 3px solid #c0c4c8;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.15),
        0 3px 8px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.filters-panel::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 15px 15px 0 0;
    z-index: 1;
}

.filters-panel.open {
    max-height: 500px;
    padding: 15px;
    margin-bottom: 15px;
}

.primary-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #c0c4c8;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    background: linear-gradient(145deg, #ffffff, #f0f2f5, #e8eaed);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    color: #1e293b;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
}

.filter-select:hover {
    background: linear-gradient(145deg, #f8fafc, #e8eaed, #ddd);
    border-color: #adb5bd;
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.2),
        0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        0 6px 12px rgba(59, 130, 246, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.filter-select:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 -2px 4px rgba(255, 255, 255, 0.8);
}

.search-container {
    flex: 1;
    margin-bottom: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: 'Baloo 2', cursive;
    border-radius: 14px;
    border: 2px solid #c0c4c8;
    background: linear-gradient(145deg, #ffffff, #f0f2f5, #e8eaed);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    color: #1e293b;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.filter-search-input:hover {
    border-color: #adb5bd;
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.2),
        0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.filter-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        0 6px 12px rgba(59, 130, 246, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.clear-filters-btn {
    padding: 12px 16px;
    background: linear-gradient(145deg, #ffffff, #f0f2f5, #e8eaed);
    border: 2px solid #c0c4c8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    color: #dc3545;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.clear-filters-btn:hover {
    background: linear-gradient(145deg, #fee, #fdd);
    border-color: #dc3545;
    transform: translateY(-1px);
    box-shadow: 
        0 6px 12px rgba(220, 53, 69, 0.3),
        0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 
        0 3px 6px rgba(59, 130, 246, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid #1d4ed8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.remove-filter-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-filter-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Trending Content Grid */
.trending-content-grid {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
    border: 3px solid #c0c4c8;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.15),
        0 3px 8px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 20px;
}

.trending-content-grid::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 15px 15px 0 0;
}

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

/* Projects per row options */
.trending-list.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.trending-list.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.trending-list.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.trending-list.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.trending-list.cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Trending Project Cards - Enhanced Skeuomorphic */
.trending-project-card {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
    border: 3px solid #c0c4c8;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 4px 10px rgba(0, 0, 0, 0.15),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.trending-project-card::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 13px 13px 0 0;
    z-index: 1;
}

.trending-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.25),
        0 6px 15px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(255, 255, 255, 1),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2),
        inset 1px 0 2px rgba(255, 255, 255, 0.8),
        inset -1px 0 2px rgba(0, 0, 0, 0.15);
    border-color: #ff6b35;
}

.trending-project-card:active {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(0, 0, 0, 0.2),
        inset 0 -3px 6px rgba(255, 255, 255, 0.8);
}

.project-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 
        0 6px 15px rgba(0, 0, 0, 0.2),
        0 3px 8px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #c0c4c8;
    background: linear-gradient(145deg, #f0f2f5, #e8eaed);
    position: relative;
}

.project-thumbnail .trending-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

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

.trending-project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(255,255,255,0.9);
    font-family: 'Baloo 2', cursive;
}

.project-category {
    font-size: 0.9rem;
    color: #1e293b;
    background: linear-gradient(145deg, #ffffff, #f0f2f5, #e8eaed);
    border: 2px solid #c0c4c8;
    padding: 6px 12px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
}

.project-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #c0c4c8;
    background: linear-gradient(90deg, transparent, rgba(192, 196, 200, 0.1), transparent);
}

.stat-group {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stat-icon {
    font-size: 1rem;
}

.trending-rank {
    background: linear-gradient(145deg, #ff6b35, #f7931e, #e55a00);
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: 'Baloo 2', cursive;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 6px 12px rgba(255, 107, 53, 0.5),
        0 3px 6px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        inset 1px 0 2px rgba(255, 255, 255, 0.4),
        inset -1px 0 2px rgba(0, 0, 0, 0.2);
    border: 2px solid #e55a00;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.trending-rank::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.3), rgba(255,255,255,0.6));
    border-radius: 8px 8px 0 0;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.spinner-icon {
    font-size: 3rem;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.1rem;
    margin: 0;
    color: #6b7280;
}

/* No Trending Message */
.no-trending {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-trending-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
    display: block;
}

.no-trending h3 {
    font-size: 1.5rem;
    color: #495057;
    margin: 0 0 10px 0;
}

.no-trending p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
    display: block;
}

.error-state h3 {
    font-size: 1.5rem;
    color: #dc3545;
    margin: 0 0 10px 0;
}

.error-state p {
    font-size: 1rem;
    margin: 0 0 20px 0;
    opacity: 0.8;
}

.retry-button {
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    border: 2px solid #e55a00;
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: white;
    box-shadow: 
        0 4px 8px rgba(255, 107, 53, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.retry-button:hover {
    background: linear-gradient(145deg, #f7931e, #ff6b35);
    box-shadow: 
        0 6px 12px rgba(255, 107, 53, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.retry-button:active {
    transform: translateY(1px);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 -2px 4px rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .trending-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    /* Responsive per-row options for tablets */
    .trending-list.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trending-list.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trending-list.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trending-list.cols-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trending-list.cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Responsive per-row options for tablets */
    .trending-list.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trending-list.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trending-list.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trending-list.cols-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trending-list.cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trending-title {
        font-size: 2.4rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .trending-title {
        font-size: 2rem;
    }
    
    .trending-subtitle {
        font-size: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .trending-stats {
        justify-content: center;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }
    
    .banner-text {
        min-width: auto;
        width: 100%;
    }
    
    .banner-text h2 {
        font-size: 1.5rem;
    }
    
    .trending-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .trending-tab {
        width: 200px;
        justify-content: center;
    }
    
    .trending-list {
        grid-template-columns: 1fr;
    }
    
    /* Mobile: force single column regardless of per-row setting */
    .trending-list.cols-2,
    .trending-list.cols-3,
    .trending-list.cols-4,
    .trending-list.cols-5,
    .trending-list.cols-6 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .modern-trending-header,
    .featured-trending-banner,
    .trending-content-grid {
        padding: 20px;
    }
    
    .trending-title {
        font-size: 1.8rem;
    }
    
    .stat-item {
        padding: 12px 16px;
        min-width: 120px;
    }
    
    .trending-tab {
        width: 100%;
        max-width: 200px;
    }
}