/* Annotation Demo Styles */
.annotation-demo {
    width: 200px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.annotation-example {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8) rotateY(180deg);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.annotation-example.active {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
}

/* Bounding Box Example */
.bounding-box {
    width: 120px;
    height: 80px;
    border: 3px solid var(--blue-accent);
    border-radius: 8px;
    position: relative;
    background: rgba(37, 99, 235, 0.1);
    animation: boundingBoxPulse 2s ease-in-out infinite;
}

.box-label {
    position: absolute;
    top: -25px;
    left: 0;
    background: var(--blue-accent);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    animation: labelSlide 1.5s ease-in-out infinite;
}

.confidence {
    position: absolute;
    bottom: -20px;
    right: 0;
    background: var(--green-accent);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    animation: confidenceGlow 2s ease-in-out infinite;
}

/* Segmentation Mask Example */
.segmentation-mask {
    width: 140px;
    height: 100px;
    position: relative;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    overflow: hidden;
    animation: maskGlow 2.5s ease-in-out infinite;
}

.mask-region {
    position: absolute;
    border-radius: 50%;
    animation: regionPulse 3s ease-in-out infinite;
}

.region-1 {
    width: 40px;
    height: 40px;
    background: var(--light-purple);
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.region-2 {
    width: 30px;
    height: 30px;
    background: var(--accent-purple);
    top: 50px;
    right: 30px;
    animation-delay: 0.5s;
}

.region-3 {
    width: 25px;
    height: 25px;
    background: var(--bright-purple);
    bottom: 20px;
    left: 50px;
    animation-delay: 1s;
}

.mask-label {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--light-purple);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    animation: maskLabelFloat 2s ease-in-out infinite;
}

/* Sentiment Analysis Example */
.text-sample {
    width: 160px;
    padding: 16px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--green-accent);
    animation: sentimentGlow 2s ease-in-out infinite;
}

.text-line {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.sentiment-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 8px;
}

.sentiment-label.positive {
    background: var(--green-accent);
    color: white;
    animation: sentimentPulse 1.5s ease-in-out infinite;
}

.sentiment-score {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--green-accent);
    animation: scoreGlow 2s ease-in-out infinite;
}

/* Named Entity Recognition Example */
.text-entities {
    width: 180px;
    padding: 12px;
    background: rgba(234, 88, 12, 0.1);
    border-radius: 8px;
    border: 2px solid var(--orange-accent);
    animation: nerGlow 2.5s ease-in-out infinite;
}

.entity {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    animation: entityHighlight 2s ease-in-out infinite;
}

.entity.person {
    background: var(--blue-accent);
    color: white;
    animation-delay: 0s;
}

.entity.org {
    background: var(--green-accent);
    color: white;
    animation-delay: 0.5s;
}

.entity.location {
    background: var(--orange-accent);
    color: white;
    animation-delay: 1s;
}

/* Animations */
@keyframes boundingBoxPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.1);
    }
}

@keyframes labelSlide {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes confidenceGlow {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes maskGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(139, 92, 246, 0.1);
    }
}

@keyframes regionPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes maskLabelFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-2px);
    }
}

@keyframes sentimentGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(5, 150, 105, 0.1);
    }
}

@keyframes sentimentPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes scoreGlow {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 8px var(--green-accent);
    }
}

@keyframes nerGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.3);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(234, 88, 12, 0.1);
    }
}

@keyframes entityHighlight {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .annotation-demo {
        width: 150px;
        height: 150px;
    }
    
    .bounding-box {
        width: 90px;
        height: 60px;
    }
    
    .segmentation-mask {
        width: 105px;
        height: 75px;
    }
    
    .text-sample {
        width: 120px;
        padding: 12px;
    }
    
    .text-entities {
        width: 135px;
        padding: 8px;
    }
}
