/* AI Demo Animation Styles */

/* Scanning animation for paragraphs */
.essay-content .paragraph {
    position: relative;
    transition: all 0.5s ease;
}

.essay-content .paragraph.scanning {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.1) 10%,
        rgba(99, 102, 241, 0.1) 90%,
        transparent 100%
    );
    animation: scanPulse 1s ease infinite;
}

@keyframes scanPulse {
    0%, 100% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0.8;
        transform: translateX(2px);
    }
}

/* Highlighted state after scanning */
.essay-content .paragraph.highlighted {
    animation: highlightFade 0.5s ease;
}

@keyframes highlightFade {
    0% {
        background-color: rgba(99, 102, 241, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

/* Original content highlight */
.essay-content .paragraph.original.highlighted {
    border-left: 3px solid #10b981;
    padding-left: 12px;
}

/* AI-generated content highlight */
.essay-content .paragraph.ai-generated.highlighted {
    border-left: 3px solid #6366f1;
    padding-left: 12px;
}

/* Plagiarized content highlight */
.essay-content .paragraph.plagiarized.highlighted {
    border-left: 3px solid #f59e0b;
    padding-left: 12px;
}

/* Mixed content highlight */
.essay-content .paragraph.mixed.highlighted {
    border-left: 3px solid #8b5cf6;
    padding-left: 12px;
}

/* Existing indicators should pulse when highlighted */
.paragraph.highlighted .ai-indicator,
.paragraph.highlighted .source-indicator,
.paragraph.highlighted .mixed-indicator {
    animation: indicatorPulse 2s ease infinite;
}

@keyframes indicatorPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Status dot animation */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 6px;
    animation: statusPulse 2s ease infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

/* Score circle animation */
.score-progress {
    stroke-dasharray: 565.48; /* 2 * PI * 90 */
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 1s ease;
    stroke: #6366f1;
    stroke-width: 8;
    fill: none;
    transform: rotate(-90deg);
    transform-origin: center;
}

.score-bg {
    stroke: #f3f4f6;
    stroke-width: 8;
    fill: none;
}

/* Progress bars animation */
.detection-bar .bar-fill {
    transition: width 1.5s ease;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.detection-bar .bar-fill.ai {
    background: linear-gradient(90deg, #6366f1 0%, #4f46e5 100%);
}

.detection-bar .bar-fill.plagiarized {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.detection-bar .bar-fill.mixed {
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Refresh button animation */
.refresh-btn:hover .refresh-icon {
    animation: rotate 0.5s ease;
}

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