.comment-avatar, .reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-badge {
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 30px;
    margin-left: 8px;
    font-weight: 600;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-delete {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.comment-delete:hover {
    color: var(--danger);
    background: rgba(239, 71, 111, 0.1);
}

.reply-form {
    margin: 15px 0 15px 40px;
    padding: 15px;
    background: var(--background);
    border-radius: 12px;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    font-family: inherit;
}

.reply-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.reply-actions button {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
}

.reply-actions button[type="button"] {
    background: var(--background);
    color: var(--text);
}

.replies-list {
    margin-left: 40px;
    margin-top: 15px;
}

.reply-item {
    padding: 15px;
    background: var(--background);
    border-radius: 12px;
    margin-bottom: 10px;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.reply-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-delete {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.reply-delete:hover {
    color: var(--danger);
    background: rgba(239, 71, 111, 0.1);
}

.reply-author {
    font-weight: 600;
    font-size: 14px;
}

.reply-date {
    font-size: 12px;
    color: var(--text-light);
}

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

.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: var(--background);
    cursor: pointer;
    transition: all 0.2s;
}

.faq-question:hover {
    background: var(--primary-light);
}

.faq-question i {
    color: var(--primary);
    font-size: 20px;
    transition: transform 0.2s;
}

.faq-question h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.faq-answer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--card);
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
    font-size: 15px;
}

.comment-login-prompt {
    text-align: center;
    padding: 30px;
    background: var(--background);
    border-radius: 16px;
    margin-bottom: 30px;
}

.comment-login-prompt a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.comment-login-prompt a:hover {
    text-decoration: underline;
}

.description-text p {
    margin-bottom: 15px;
}

.description-text strong {
    color: var(--text);
    font-weight: 600;
}

.description-text ul, 
.description-text ol {
    margin: 15px 0;
    padding-left: 25px;
}

.description-text li {
    margin-bottom: 8px;
    color: var(--text-light);
}

.description-text h1, 
.description-text h2, 
.description-text h3, 
.description-text h4 {
    margin: 20px 0 10px;
    color: var(--text);
}

.tutorial-text {
    line-height: 1.8;
}

.tutorial-text p {
    margin-bottom: 15px;
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.reply-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 30px;
    transition: all 0.2s;
}

.reply-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.reply-btn-left {
    margin-right: auto;
}

.reply-btn-right {
    margin-left: auto;
}

.view-replies-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 30px;
    transition: all 0.2s;
}

.view-replies-btn:hover {
    background: var(--background);
    border-color: var(--primary);
    color: var(--primary);
}

.view-replies-btn i:last-child {
    transition: transform 0.3s;
    font-size: 12px;
}

.download-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.download-overlay.show {
    opacity: 1;
    visibility: visible;
}

.download-card {
    background: var(--card);
    border-radius: 30px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: all 0.3s;
}

.download-overlay.show .download-card {
    transform: translateY(0);
}

.download-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: all 0.3s;
}

.download-icon.checking {
    background: var(--primary-light);
    color: var(--primary);
    animation: pulse 1.5s infinite;
}

.download-icon.verifying {
    background: var(--warning);
    color: var(--dark);
    animation: pulse 1.5s infinite;
}

.download-icon.downloading {
    background: var(--primary);
    color: white;
}

.download-icon.success {
    background: var(--success);
    color: white;
}

.download-icon.error {
    background: var(--danger);
    color: white;
}

.download-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.download-message {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 15px;
}

.download-progress {
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    display: none;
}

.download-progress.show {
    display: block;
}

.download-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
    border-radius: 10px;
}

.download-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.download-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.download-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -10px;
    width: 20px;
    height: 2px;
    background: var(--border);
}

.download-step.completed .step-icon {
    background: var(--success);
    color: white;
}

.download-step.active .step-icon {
    background: var(--primary);
    color: white;
    animation: pulse 1.5s infinite;
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--background);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.step-label {
    font-size: 11px;
    color: var(--text-light);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.ai-overview-container {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.ai-overview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.ai-header-icon {
    color: var(--primary);
    font-size: 18px;
}

.ai-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.ai-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

.ai-loading {
    padding: 16px;
    background: var(--background);
    border-radius: 12px;
}

.ai-skeleton {
    margin-bottom: 16px;
}

.ai-skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, var(--border) 25%, var(--primary-light) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: ai-skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

@keyframes ai-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ai-typing-container {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
}

.ai-typing-text {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    max-width: fit-content;
}

.ai-typing-text::before {
    content: "AI is generating overview";
    animation: ai-typing-words 8s infinite;
}

@keyframes ai-typing-words {
    0%, 30% { content: "AI is generating overview"; }
    31%, 60% { content: "Analyzing code structure"; }
    61%, 90% { content: "Extracting key information"; }
    91%, 100% { content: "AI is generating overview"; }
}

.ai-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 16px;
    background: var(--primary);
    animation: ai-cursor-blink 1s infinite;
    margin-left: 2px;
}

@keyframes ai-cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.ai-overview-content {
    background: var(--background);
    border-radius: 12px;
    padding: 16px;
    animation: ai-fade-in 0.3s ease;
}

@keyframes ai-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-text {
    color: var(--text);
    line-height: 1.7;
    font-size: 14px;
    margin-bottom: 12px;
}

.ai-text strong {
    color: var(--primary);
    font-weight: 600;
}

.ai-disclaimer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.ai-disclaimer i {
    color: var(--primary);
    font-size: 12px;
}

.original-description-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.original-description-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.original-header-icon {
    color: var(--primary);
    font-size: 16px;
}

.original-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.description-text {
    color: var(--text);
    line-height: 1.7;
    font-size: 14px;
}

.description-text p {
    margin-bottom: 15px;
}

.description-text p:last-child {
    margin-bottom: 0;
}

.no-description {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: var(--background);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 14px;
}

.no-description i {
    color: var(--text-light);
    font-size: 16px;
}

.description-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 13px;
}

.description-note i {
    color: var(--primary);
    font-size: 14px;
}

@media (max-width: 640px) {
    .ai-overview-container,
    .original-description-container {
        padding: 16px;
    }
}

#tidio-chat,
#tidio-chat-iframe,
iframe[src*="tidio"],
[class*="tidio"],
[id*="tidio"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}
.modal-close-btn {
    position: absolute !important;
    top: 18px !important;
    right: 16px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: white !important;
    font-size: 18px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    z-index: 10001 !important;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.5) !important;
}

.modal-close-btn i {
    font-size: 16px !important;
    color: white !important;
}

.modal-cancel-btn {
    background: #ef476f !important;
    border: none !important;
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 50px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin: 20px auto 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    min-width: 160px !important;
    transition: none !important;
}

.modal-cancel-btn:hover {
    background: #d64161 !important;
}

.modal-cancel-btn i {
    font-size: 16px !important;
    color: white !important;
}

@media (max-width: 480px) {
    .modal-close-btn {
        top: 18px !important;
        right: 16px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
    }
    
    .modal-close-btn i {
        font-size: 14px !important;
    }
    
    .modal-cancel-btn {
        width: 100% !important;
        max-width: 200px !important;
    }
}
.pinned-badge {
    background: #4361ee;
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.featured-badge {
    background: #ffd166;
    color: #1e293b;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ai-text code {
    background: var(--background);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

.ai-text pre {
    background: var(--background);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
    border: 1px solid var(--border);
}

.ai-text pre code {
    background: none;
    padding: 0;
    color: var(--text);
}

.ai-text ul, .ai-text ol {
    margin: 10px 0 10px 20px;
    color: var(--text-light);
}

.ai-text li {
    margin-bottom: 5px;
}

.ai-text em {
    color: var(--text-light);
    font-style: italic;
}