* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

nav {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s;
    display: block;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

main {
    padding: 2rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    align-self: flex-start;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #2d3748;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover {
    color: #667eea;
}

.article-excerpt {
    color: #666;
    margin-bottom: 1rem;
    flex: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.article-full {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-full h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.article-full img {
    width: 100%;
    border-radius: 8px;
    margin: 2rem 0;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-tags {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.tag {
    display: inline-block;
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin: 0.2rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2d3748;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.popular-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.popular-item a:hover {
    color: #667eea;
}

.popular-views {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.3rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud .tag {
    cursor: pointer;
    transition: all 0.3s;
}

.tag-cloud .tag:hover {
    background: #667eea;
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a, .pagination span {
    padding: 0.6rem 1rem;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination a:hover {
    background: #667eea;
    color: white;
}

.pagination .current {
    background: #667eea;
    color: white;
}

footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #cbd5e0;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Кликабельные теги */
.tag {
    display: inline-block;
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin: 0.2rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.tag-cloud .tag {
    cursor: pointer;
}

.article-tags .tag {
    background: #dbeafe;
    color: #1e40af;
}

.article-tags .tag:hover {
    background: #3b82f6;
    color: white;
}

/* Кнопки "Поделиться" */
.article-share {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.article-share strong {
    color: #4a5568;
    font-size: 0.95rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-vk {
    background: #0077ff;
    color: white;
}

.share-vk:hover {
    background: #0063d1;
}

.share-ok {
    background: #ee8208;
    color: white;
}

.share-ok:hover {
    background: #d46f00;
}

.share-tg {
    background: #0088cc;
    color: white;
}

.share-tg:hover {
    background: #006fa8;
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

/* Заголовок страницы тега */
main h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Хлебные крошки */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #64748b;
}

.breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: #cbd5e0;
    user-select: none;
}

.breadcrumbs .current {
    color: #2d3748;
    font-weight: 500;
}

/* Рейтинг статьи */
.article-rating {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    text-align: center;
}

.article-rating h3 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.5rem;
}

.article-rating .stars {
    font-size: 2.5rem;
    display: inline-flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.rating-info {
    font-size: 1.1rem;
    color: #4a5568;
}

.star {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star.full {
    color: #f59e0b;
}

.star.half {
    background: linear-gradient(90deg, #f59e0b 50%, #cbd5e0 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star.empty {
    color: #cbd5e0;
}

.star:hover {
    transform: scale(1.2);
}

.star:active {
    transform: scale(0.95);
}