body {
    font-family: 'Arial Rounded MT Bold', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f5fa;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #d796e0, #c77bdf);
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #c185d0, #a86bb8);
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
nav a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}
nav a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.auth-btn {
    background: linear-gradient(45deg, #d796e0, #c77bdf);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    color: white;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
.auth-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(45deg, #c77bdf, #d796e0);
}

.search-form {
    display: flex;
    align-items: center;
}
.search-form input {
    padding: 0.5rem 1rem;
    border: 2px solid #e8d0ec;
    border-radius: 25px 0 0 25px;
    outline: none;
}
.search-form button {
    padding: 0.5rem 1rem;
    background: #c77bdf;
    border: none;
    border-radius: 0 25px 25px 0;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}
.search-form button:hover {
    background: #d796e0;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
}

.sidebar {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.sidebar h3 {
    color: #a86bb8;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar li {
    margin: 0.7rem 0;
}
.sidebar a {
    display: block;
    padding: 1rem;
    background: linear-gradient(45deg, #e8d0ec, #f5e9f8);
    color: #7a4b85;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.sidebar a:hover {
    transform: translateX(5px);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

.content {
    display: grid;
    gap: 2rem;
}

article {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    position: relative; /* Додаємо, якщо ще не було */
}

article:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}



h2 {
    color: #7a4b85;
    margin-top: 0;
    padding-left: 1.5rem;
    position: relative;
}
h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #d796e0;
    border-radius: 50%;
}

/* Стилі для футера */
footer {
    background: linear-gradient(135deg, #d796e0, #c77bdf);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20px;
}

.footer-content p {
    margin: 0;
    font-size: 14px;
}

/* Стилі для іконок соціальних мереж */
.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50%;
    padding: 6px;
    transition: transform 0.3s, background 0.3s;
    text-decoration: none;
}

.social-icon svg {
    width: 100%;
    height: 100%;
    fill: #6b2d7e; /* Колір іконок за замовчуванням */
    transition: fill 0.3s;
}

.social-icon.facebook:hover {
    background: #3b5998; /* Колір Facebook */
    transform: scale(1.1);
}

.social-icon.facebook:hover svg {
    fill: white;
}

.social-icon.twitter:hover {
    background: #1da1f2; /* Колір Twitter */
    transform: scale(1.1);
}

.social-icon.twitter:hover svg {
    fill: white;
}

.social-icon.telegram:hover {
    background: #0088cc; /* Колір Telegram */
    transform: scale(1.1);
}

.social-icon.telegram:hover svg {
    fill: white;
}

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

.resource-card {
    padding: 1.5rem;
    background: #f8f5fa;
    border-radius: 8px;
    transition: transform 0.3s ease;
    position: relative;
    border: 1px solid #e8d0ec;
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-tag {
    position: absolute;
    right: -10px;
    top: -10px;
    background: #c77bdf;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8em;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(45deg, #d796e0, #c77bdf);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 1rem;
    transition: opacity 0.3s ease;
}
.download-btn:hover {
    opacity: 0.9;
}

.file-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9em;
    color: #666;
}

/* Стилі для заголовка автора */
.author-header {
    margin-bottom: 30px;
}

.author-header h1 {
    color: #6b2d7e;
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Стилі для секції "Про автора" */
.author-bio {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.author-bio h3 {
    color: #6b2d7e;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.author-bio p {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.filters {
    margin-bottom: 20px;
}

.filters form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters select, .filters input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.filters button {
    background: #d796e0;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.filters button:hover {
    background: #b56cc3;
}

.tag-cloud {
    text-align: center;
    padding: 15px 0;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

.tag-cloud a {
    color: #6b2d7e;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.tag-cloud a:hover {
    color: #d796e0;
}

.related-posts {
    margin-top: 30px;
}

.related-posts h3 {
    color: #6b2d7e;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.related-posts article {
    margin-bottom: 15px;
}

.related-posts h4 {
    margin: 0;
    font-size: 1.2rem;
}

.related-posts a {
    color: #6b2d7e;
    text-decoration: none;
}

.related-posts a:hover {
    color: #d796e0;
}

.stats {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.stats h3 {
    color: #6b2d7e;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.stats p {
    font-size: 16px;
    margin: 5px 0;
    color: #333;
}

.sidebar .filters {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar .filters h3 {
    color: #6b2d7e;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.sidebar .filters form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar .filters label {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.sidebar .filters select,
.sidebar .filters input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.sidebar .filters select:focus,
.sidebar .filters input[type="text"]:focus {
    border-color: #d796e0;
    outline: none;
}

.sidebar .filters button {
    background: #d796e0;
    color: white;
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.sidebar .filters button:hover {
    background: #b56cc3;
}

.pagination {
    margin-top: 2rem;
    text-align: center;
}
.pagination a {
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    background: #e8d0ec;
    color: #7a4b85;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.pagination a:hover {
    background: #d796e0;
    color: white;
}

.article-link {
    color: #7a4b85;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
}
.article-link:hover {
    color: #d796e0;
    transform: translateX(5px);
}
.article-link::after {
    content: " →";
    opacity: 0;
    transition: opacity 0.3s ease;
}
.article-link:hover::after {
    opacity: 1;
}

.social-sharing {
    margin: 3rem 0 2rem;
    padding: 2rem 0;
    border-top: 2px solid #f8f5fa;
    border-bottom: 2px solid #f8f5fa;
    text-align: center;
}
.social-sharing h3 {
    font-size: 1.5em;
    color: #7a4b85;
    margin-bottom: 1.5rem;
}
.social-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.social-button {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: white !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.social-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}
.social-button.facebook { background: #3b5998; }
.social-button.twitter { background: #1da1f2; }
.social-button.telegram { background: #0088cc; }
.social-button.copy { background: #7a4b85; }

.article-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #f8f5fa;
    padding-bottom: 1.5rem;
}
.back-link {
    padding: 0.8rem 1.5rem;
    background: #f8f5fa;
    color: #7a4b85;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e8d0ec;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.back-link:hover {
    background: #d796e0;
    color: white;
    transform: translateX(-5px);
}
.article-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7a4b85;
    font-size: 0.9em;
}
.meta-icon {
    width: 24px;
    height: 24px;
    fill: #c77bdf;
}

.auth-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f8f5fa, #e8d0ec);
}

.admin-form {
    max-width: 400px;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}
.admin-form h2 {
    color: #7a4b85;
    margin-bottom: 1.5rem;
}
.admin-form input, .admin-form textarea, .admin-form select {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 2px solid #e8d0ec;
    border-radius: 8px;
    box-sizing: border-box;
}
.admin-form button {
    background: linear-gradient(45deg, #d796e0, #c77bdf);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
}
.admin-form button:hover {
    opacity: 0.9;
}

.admin-content {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.admin-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.admin-content th, .admin-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.admin-content th {
    background: #e8d0ec;
    color: #7a4b85;
}
.admin-content a {
    color: #7a4b85;
    text-decoration: none;
}
.admin-content a:hover {
    color: #d796e0;
}

/* Стилі для повідомлень */
.messages {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 8px;
    max-width: 70%;
}

.message.sent {
    background: #d796e0;
    color: white;
    margin-left: auto;
}

.message.received {
    background: #f0f0f0;
    color: #333;
    margin-right: auto;
}

.message.unread {
    background: #e0f7e4;
    border-left: 4px solid #28a745;
}

.message-meta {
    font-size: 12px;
    margin-bottom: 5px;
}

.message-meta strong {
    color: inherit;
}

.message-meta span {
    font-style: italic;
}

.message p {
    margin: 0;
    font-size: 14px;
}

.message-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-size: 14px;
}

.message-form button {
    background: #d796e0;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.message-form button:hover {
    background: #b56cc3;
}

/* Стилі для тегів */
.tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #f0e4f7;
    color: #6b2d7e;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: #d796e0;
    color: white;
}

.author-link {
    color: #6b2d7e;
    font-weight: 600;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.author-link:hover {
    background-color: #d796e0;
    color: white;
}

/* Стилі для сповіщень у хедері */
.new-messages {
    background: #ff4d4d;
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 12px;
    vertical-align: middle;
}

/* Стилі для коментарів */
.comments {
    margin-top: 20px;
}

.comment {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.comment-meta {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

.comment-meta strong {
    color: #6b2d7e;
}

.comment-meta span {
    font-style: italic;
}

.comment p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.delete-comment {
    color: #ff4d4d;
    font-size: 12px;
    text-decoration: none;
    margin-top: 5px;
    display: inline-block;
}

.delete-comment:hover {
    text-decoration: underline;
}

.comment-form {
    margin-top: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-size: 14px;
}

.comment-form button {
    background: #d796e0;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.comment-form button:hover {
    background: #b56cc3;
}

/* Стилі для інформації про файл */
.file-info {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.file-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Стилі для попереднього перегляду файлу */
.file-preview {
    margin-top: 20px;
}

.file-preview iframe {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Оновлення стилю кнопки завантаження */
.download-btn {
    background: #d796e0;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #b56cc3;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    nav {
        flex-direction: column;
    }
    .search-form {
        margin: 0.5rem 0;
    }
    .auth-btn {
        margin: 0.5rem 0;
    }
    .sidebar {
        order: -1;
    }
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .social-icons {
        justify-content: center;
    }
    .sidebar .filters {
        padding: 10px;
    }

    .sidebar .filters h3 {
        font-size: 1rem;
    }

    .sidebar .filters select,
    .sidebar .filters input[type="text"],
    .sidebar .filters button {
        font-size: 12px;
    }
}

/* Додаємо до вже існуючого CSS */
@media (max-width: 768px) {
    .admin-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .admin-content th, .admin-content td {
        min-width: 100px;
        padding: 0.5rem;
    }
    .admin-content {
        padding: 1rem;
    }
}