/* Popular Page Styles */

/* Hero Section */
.popular-hero {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.03) 0%, 
        rgba(139, 92, 246, 0.05) 50%, 
        rgba(37, 99, 235, 0.02) 100%);
    padding: 3rem 0 2rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

body.dark .popular-hero {
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.05) 0%, 
        rgba(139, 92, 246, 0.08) 50%, 
        rgba(37, 99, 235, 0.03) 100%);
    border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.popular-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.popular-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

body.dark .popular-title {
    color: #ffffff;
}

.popular-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

body.dark .popular-subtitle {
    color: #e5e5e5;
}

/* Stats Bar */
.popular-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.popular-stat {
    text-align: center;
}

.popular-stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.popular-stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

body.dark .popular-stat-label {
    color: #a3a3a3;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

body.dark .filter-tab {
    background: #111111;
    border-color: #1a1a1a;
    color: #e5e5e5;
}

body.dark .filter-tab:hover,
body.dark .filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Popular Websites Grid */
.popular-websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.popular-website-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 420px; /* Fixed height for consistency */
}

.popular-website-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.popular-website-card:hover::before {
    transform: scaleX(1);
}

.popular-website-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--gray-300);
}

body.dark .popular-website-card {
    background: #111111;
    border-color: #1a1a1a;
}

body.dark .popular-website-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: #2a2a2a;
}

.popular-rank {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 10;
}

/* Screenshot Section */
.popular-website-screenshot {
    width: 100%;
    height: 160px; /* Reduced height */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem; /* Reduced margin */
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0; /* Prevent shrinking */
}

body.dark .popular-website-screenshot {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.popular-website-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-website-screenshot .screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 2.5rem; /* Reduced size */
}

body.dark .popular-website-screenshot .screenshot-placeholder {
    color: #a3a3a3;
}

.popular-website-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.popular-website-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

body.dark .popular-website-info h3 {
    color: #ffffff;
}

.popular-website-domain {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.popular-website-description {
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
}

body.dark .popular-website-description {
    color: #e5e5e5;
}

.popular-website-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: auto; /* Push to bottom */
}

body.dark .popular-website-stats {
    border-top-color: #1a1a1a;
}

.popular-stats-left {
    display: flex;
    gap: 1rem;
}

.popular-stat-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray-500);
    font-size: 0.75rem;
}

body.dark .popular-stat-item {
    color: #a3a3a3;
}

.popular-category-tag {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

body.dark .popular-category-tag {
    background: #0a0a0a;
    color: #e5e5e5;
}

/* Top Categories Section */
.top-categories-section {
    padding: 3rem 0;
    background: var(--gray-50);
}

body.dark .top-categories-section {
    background: #0a0a0a;
}

.top-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.top-category-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.top-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--gray-300);
}

body.dark .top-category-card {
    background: #111111;
    border-color: #1a1a1a;
}

body.dark .top-category-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: #2a2a2a;
}

.top-category-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.top-category-card:hover .top-category-icon {
    transform: scale(1.1) rotate(5deg);
}

.top-category-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

body.dark .top-category-name {
    color: #ffffff;
}

.top-category-count {
    color: var(--gray-500);
    font-size: 0.875rem;
}

body.dark .top-category-count {
    color: #a3a3a3;
}

/* Responsive */
@media (max-width: 768px) {
    .popular-title {
        font-size: 2rem;
    }
    
    .popular-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .popular-websites-grid,
    .top-categories-grid {
        grid-template-columns: 1fr;
    }
}
/* CTA Button Styles */
.cta-btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}