/* Comments Modal Styles */
.comments-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comments-modal.show {
    opacity: 1;
}

.comments-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 212, 255, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.comments-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

/* Comment Form */
.comment-form {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.comment-input {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    background: var(--surface-2);
    color: var(--text);
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.comment-input:focus {
    border-color: var(--primary);
    background: var(--bg);
}

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

.comment-char-count {
    font-size: 13px;
    color: var(--text-dim);
}

.btn-comment {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-comment:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.btn-comment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-prompt {
    padding: 20px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.login-prompt p {
    color: var(--text-dim);
    margin: 0;
}

/* Comments List */
.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.loading-comments,
.empty-comments,
.error-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
}

/* Individual Comment */
.comment {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-avatar:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

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

.comment-author {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    transition: color 0.2s;
}

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

.comment-time {
    color: var(--text-dim);
    font-size: 13px;
}

.comment-delete {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.comment-delete:hover {
    background: rgba(255, 51, 102, 0.1);
    color: var(--danger);
}

.comment-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 8px 0;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.comment-actions {
    display: flex;
    gap: 12px;
}

.comment-like {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: none;
    background: transparent;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-dim);
    transition: all 0.2s ease;
}

.comment-like:hover {
    background: rgba(255, 51, 102, 0.1);
}

.comment-like.liked {
    color: var(--danger);
}

.like-icon {
    font-size: 16px;
}

.like-count {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    .comments-modal-content {
        max-width: 95%;
        max-height: 90vh;
    }

    .comment-form {
        padding: 16px;
    }

    .comments-list {
        padding: 16px;
    }
}