
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #7209b7;
    --text-color: #2b2d42;
    --text-light: #8d99ae;
    --background-color: #ffffff;
    --card-background: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.header {
    background: var(--gradient);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title i {
    margin-right: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.search-toggle, .view-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-toggle:hover, .view-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.search-bar {
    margin-top: 1rem;
    display: none;
}

.search-bar.active {
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
}

.search-btn {
    background: var(--accent-color);
    border: none;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #5a08a0;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: white;
    font-size: 0.9rem;
}

/* Article Cards */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.article-card {
    background: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.article-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(45deg, #4361ee, #3a0ca3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
}

.article-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.article-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
}

.article-author i {
    font-size: 0.8rem;
}

/* List View */
.articles-container.list-view {
    grid-template-columns: 1fr;
}

.articles-container.list-view .article-card {
    display: flex;
    flex-direction: row;
    height: 150px;
}

.articles-container.list-view .article-image {
    width: 120px;
    height: 100%;
    flex-shrink: 0;
}

.articles-container.list-view .article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.articles-container.list-view .article-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.articles-container.list-view .article-description {
    -webkit-line-clamp: 2;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .articles-container {
        grid-template-columns: 1fr;
    }
    
    .articles-container.list-view .article-card {
        flex-direction: column;
        height: auto;
    }
    
    .articles-container.list-view .article-image {
        width: 100%;
        height: 150px;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 1rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .search-bar input {
        font-size: 0.9rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeIn 0.5s ease-out;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}
