
#blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}


.dark #blog-modal {
    background: rgba(0, 0, 0, 0.9);
}

#blog-modal.active {
    opacity: 1;
    visibility: visible;
}

#blog-modal.active .modal-content-wrapper {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content-wrapper {
    background: white;
    border-radius: 1rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    word-wrap: break-word;
    word-break: break-word;
}

.dark .modal-content-wrapper {
    background: #0f0f0f;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}


.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.dark .modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg) scale(1.1);
}

.dark .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #1f2937;
}

.dark .modal-close::before,
.dark .modal-close::after {
    background: white;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}


.article-header {
    margin-bottom: 2rem;
}

.article-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-category {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.article-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.dark .article-date {
    color: #9ca3af;
}

.article-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1f2937;
}

.dark .article-title {
    color: white;
}

.article-excerpt {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.dark .article-excerpt {
    color: #d1d5db;
}

.article-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
}

.dark .article-content {
    color: #e5e7eb;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.dark .article-content h2 {
    color: white;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.dark .article-content h3 {
    color: white;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.article-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #6b7280;
    font-style: italic;
}

.dark .article-content blockquote {
    color: #9ca3af;
}


.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: #6b7280;
}

.dark .modal-loading {
    color: #9ca3af;
}

.modal-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.dark .modal-loading-spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: #3b82f6;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.modal-error {
    text-align: center;
    padding: 4rem 2rem;
    color: #dc2626;
}

.dark .modal-error {
    color: #ef4444;
}


.dark #blog-modal .bg-white\/5 {
    background: rgba(255, 255, 255, 0.05);
}

.dark #blog-modal .border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark #blog-modal .text-white {
    color: white;
}

.dark #blog-modal .text-gray-300 {
    color: #d1d5db;
}
