


/* Blog System Styles */
.blog-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    margin-top: 7rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(46, 213, 115, 0.15);
    border-left: 4px solid #2ed573;
    color: #20bf6b;
}

.alert-error {
    background-color: rgba(255, 71, 87, 0.15);
    border-left: 4px solid #ff4757;
    color: #ff4757;
}

.alert ul {
    margin: 0.5rem 0 0 1.5rem;
}

/* Blog Header */
.blog-header {
    margin-bottom: 2rem;
    text-align: center;
}

.blog-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Blog Filters */
.blog-filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
}

.filter-form {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    min-width: 150px;
}

.search-group {
    flex-grow: 1;
    max-width: 400px;
    position: relative;
}

.search-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    color: var(--text-primary);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Blog Card */
.blog-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.blog-card-image {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.blog-card-category {
    color: var(--accent-color);
    font-weight: 500;
}

.blog-card-date {
    color: var(--text-secondary);
}

.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-title a:hover {
    color: var(--accent-color);
}

.blog-card-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-card-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.blog-card-link:hover {
    gap: 0.5rem;
}

.blog-card-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.edit-btn:hover {
    background: #3498db;
}

.delete-btn:hover {
    background: #e74c3c;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.no-posts i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.no-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-posts p {
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.pagination-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease;
}

.pagination-number:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pagination-number.active {
    background: var(--accent-color);
    color: white;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

















/* Single Blog Post */
.blog-single {
    max-width: 900px;
    margin: 0 auto;
}

.blog-single .blog-header {
    text-align: left;
    margin-bottom: 1.5rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-color);
}

.blog-category {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent-color);
}

.blog-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.blog-title {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.blog-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.blog-featured-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    max-height: 200px;
}


.blog-featured-image img {
    width: 100%;
    height: auto;
    max-height: 200px;
    display: block;
    object-fit: contain;
}
.blog-content {
    line-height: 1.8;
    color: white;
    margin-bottom: 2rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2, .blog-content h3, .blog-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.blog-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-content ul, .blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.blog-content table th, .blog-content table td {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-content table th {
    background: rgba(255, 255, 255, 0.05);
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.blog-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.blog-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.blog-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.share-btn.twitter:hover {
    background: #1da1f2;
    color: white;
}

.share-btn.facebook:hover {
    background: #4267B2;
    color: white;
}

.share-btn.discord:hover {
    background: #5865F2;
    color: white;
}

.share-btn.copy:hover {
    background: #6c5ce7;
    color: white;
}

/* Blog Form */
.blog-form-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
}

.blog-form-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.blog-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group label {
    font-weight: 500;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.current-image {
    margin-bottom: 1rem;
}

.current-image img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.current-image p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* Buttons */
.btn-primary, 
.btn-secondary, 
.btn-danger {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-color-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.3);
    transform: translateY(-2px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--background-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-filters .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .search-group {
        max-width: 100%;
    }
    
    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .blog-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .blog-actions a, .blog-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .blog-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .blog-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
}

/* TinyMCE Editor Customization */
.tox-tinymce {
    border-radius: 6px !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.tox .tox-toolbar, 
.tox .tox-toolbar__overflow, 
.tox .tox-toolbar__primary {
    background: var(--background-color) !important;
}

.tox .tox-tbtn {
    color: var(--text-primary) !important;
}

.tox .tox-tbtn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.tox .tox-edit-area__iframe {
    background: rgba(255, 255, 255, 0.05) !important;
}

.tox .tox-statusbar {
    background: var(--background-color) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.tox .tox-statusbar a, 
.tox .tox-statusbar__path-item, 
.tox .tox-statusbar__wordcount {
    color: var(--text-secondary) !important;
}

.tox .tox-mbtn {
    color: var(--text-primary) !important;
}

.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active) {
    background: rgba(255, 255, 255, 0.1) !important;
}

.tox .tox-mbtn--active {
    background: rgba(255, 255, 255, 0.15) !important;
}

.tox .tox-collection__item-label {
    color: var(--text-primary) !important;
}

.tox .tox-collection__item--active {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.tox .tox-collection__item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}
