/**
 * 凸包算法可视化样式
 * @author changyadai
 */

.container {
    max-width: 800px;
    padding: 25px;
}

.nav-link {
    position: absolute;
    top: 25px;
    left: 25px;
}

.section-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

/* 画布 */
.canvas-section {
    margin-bottom: 20px;
    text-align: center;
}

#canvas {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: crosshair;
}

.canvas-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

/* 栈显示 */
.stack-section {
    margin-bottom: 20px;
}

.stack-content {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 45px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    align-items: center;
}

.stack-item {
    padding: 8px 14px;
    background: rgba(132, 204, 22, 0.2);
    border: 1px solid rgba(132, 204, 22, 0.5);
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.stack-item.current {
    background: rgba(251, 191, 36, 0.4);
    border-color: #fbbf24;
    transform: scale(1.1);
}

.stack-item.checking {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.stack-item.pop {
    animation: popOut 0.3s ease-out forwards;
}

@keyframes popOut {
    to {
        transform: scale(0);
        opacity: 0;
    }
}

.stack-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}
