/* ===== Common Component Styles ===== */

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(10, 15, 30, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* Back Button */
.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    padding: 12px 24px;
    border-radius: 30px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    font-size: 12px;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    text-shadow: 0 0 10px #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Page Containers */
.trending-container, .tools-container {
    padding: 80px 0 60px;
    min-height: 100vh;
}

.trending-header, .tools-header {
    text-align: center;
    margin-bottom: 40px;
}

.trending-title, .tools-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.trending-subtitle, .tools-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    opacity: 0.8;
    text-transform: uppercase;
}

/* Filters and Tabs */
.source-tabs, .time-filter, .category-filter, .category-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.source-tab, .time-btn, .category-btn, .tab {
    padding: 10px 18px;
    border: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    font-weight: 400;
}

.source-tab:hover, .time-btn:hover, .category-btn:hover, .tab:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.source-tab.active, .time-btn.active, .category-btn.active, .tab.active {
    border-color: #ffffff;
    background: #ffffff;
    color: #000000;
}

/* Grid Layout */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Cards */
.trending-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.trending-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.trending-card:hover::before {
    opacity: 1;
}

.trending-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.trending-card-content {
    position: relative;
    z-index: 2;
}

/* Card Detail Styles */
.model-header, .repo-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.model-icon, .repo-icon {
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #000000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.model-info h3, .repo-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.model-info p, .repo-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.model-link, .repo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    background: transparent;
    padding: 8px 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.model-link:hover, .repo-link:hover {
    color: #ffffff;
    transform: translateX(5px);
    text-decoration: underline;
}

/* Error and Loading Handlers */
.error-message {
    text-align: center;
    padding: 60px 0;
    color: var(--secondary-color);
}

.refresh-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--gradient-secondary);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .trending-title, .tools-title {
        font-size: 2rem;
    }

    .trending-grid {
        grid-template-columns: 1fr;
    }

    .back-button {
        top: 12px;
        left: 12px;
        padding: 8px 12px;
        font-size: 14px;
    }
}
